Changeset 209
- Timestamp:
- Nov 29, 2006 1:25:59 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/coding_standards.txt
r136 r209 4 4 5 5 ====================================================================== 6 Prea ble6 Preamble 7 7 ====================================================================== 8 8 … … 142 142 143 143 ====================================================================== 144 String concat ination145 ====================================================================== 146 147 Always include a space before and after the concat onation operator '.' which144 String concatenation 145 ====================================================================== 146 147 Always include a space before and after the concatenation operator '.' which 148 148 improves readability and improves search-and-replace of adjacent elements. 149 149 … … 175 175 176 176 For large or complex blocks of HTML, using the following method is much faster 177 and safer than echo because the php process esor is bypassed and content goes177 and safer than echo because the php processor is bypassed and content goes 178 178 directly to output: 179 179 … … 313 313 314 314 All form definitions must be on their own line and either fully defined within 315 a <td></td> pair or be outside table tags. Forms must also a ways have an action315 a <td></td> pair or be outside table tags. Forms must also always have an action 316 316 parameter: 317 317 … … 365 365 When building queries referencing two-or-more tables always preface columns 366 366 with the table containing the column (admin_tbl.username, location_tbl.location_address). 367 This method is much prefer ed over using aliases of table names (a.username, l.location_address).367 This method is much preferred over using aliases of table names (a.username, l.location_address). 368 368 369 369 Table names should be singular (user_tbl instead of users_tbl). -
trunk/lib/ACL.inc.php
r208 r209 604 604 * Calculates the most specific cascading privilege found for a requested 605 605 * ARO -> ACO -> AXO entry. Returns FALSE if the entry is denied. By default, 606 * all entries are denied, unless some point in the hierarchy is set ao "allow."606 * all entries are denied, unless some point in the hierarchy is set to "allow." 607 607 * 608 608 * @access public -
trunk/lib/Auth_File.inc.php
r158 r209 307 307 } 308 308 309 /** 310 * Wrapper function for compatability with lib/Lock.inc.php. 311 * 312 * @param string $username Username to return. 313 * @return string Username, or false if none found. 314 */ 315 function getUsername($username) 316 { 317 if ('' != $username) { 318 return $username; 319 } else { 320 return false; 321 } 322 } 323 309 324 /* 310 325 * Reads the configured htpasswd file into the _users array. -
trunk/lib/DB.inc.php
r172 r209 143 143 // Die or continue without connection? 144 144 if ($this->getParam('db_die_on_failure')) { 145 echo "\n\n<!-- Script execution stopped out of embarrassment. -->";145 echo "\n\n<!-- Script execution stopped out of embarrassment. There was a database error. -->"; 146 146 die; 147 147 } else { … … 154 154 155 155 // Tell MySQL what character set we're useing. Available only on MySQL verions > 4.01.01. 156 $this->query("/*!40101 SET NAMES '" . $this->mysql_character_sets[strtolower($app->getParam('character_set'))] . "' */"); 156 if ('' != $app->getParam('character_set') && isset($this->mysql_character_sets[strtolower($app->getParam('character_set'))])) { 157 $this->query("/*!40101 SET NAMES '" . $this->mysql_character_sets[strtolower($app->getParam('character_set'))] . "' */"); 158 } else { 159 $app->logMsg(sprintf('%s is not a known character_set.', $app->getParam('character_set')), LOG_ERR, __FILE__, __LINE__); 160 } 157 161 158 162 return true;
Note: See TracChangeset
for help on using the changeset viewer.