From: <jl...@us...> - 2002-05-26 11:57:47
|
Update of /cvsroot/mantisbt/web In directory usw-pr-cvs1:/tmp/cvs-serv20903 Modified Files: guidelines.php3 Log Message: Updated coding guidelines. Added information about $c_ prefix. Index: guidelines.php3 =================================================================== RCS file: /cvsroot/mantisbt/web/guidelines.php3,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- guidelines.php3 19 May 2002 20:42:17 -0000 1.12 +++ guidelines.php3 26 May 2002 11:57:44 -0000 1.13 @@ -18,9 +18,10 @@ <li>Count variables should follow the format $*_count. eg $bug_count <li>Global variables should be prefixed with g_ <li>Temporary variables should be prefixed with t_ - <li>Function parameter variables should be prefixed with p_ - <li>Variables passed from forms should be prefixed with f_ - <li>Other variables are prefixed with v_, v2_, etc + <li>Parameters and variables passed from forms that have been cleaned of any special SQL chars (i.e. slashes) should be prefixed with c_ + <li>Uncleaned function parameters should be prefixed with p_ + <li>Uncleaned variables passed from forms should be prefixed with f_ + <li>Other variables are prefixed with v_, v2_, etc. <li>Never prefix with lee_ or O_ or queue_ (visually confusing) <li>$query and $result should be used for SQL query and results respectively </ul> @@ -66,7 +67,7 @@ <ul> <li>Use TABS with a size of 4 to make the code easily readable while not wasting too much space <li>Follow the table formatting of existing pages - <li>Use <? ?&goto; for php delimiters. We will be moving to <?php ?&goto; + <li>Use <?php ?> for php delimiters. <li>Try not to print/echo HTML unless it's short or in a function loop <li>Do not use the EOF construct. </ul> |