Changeset 334 for trunk/lib/ACL.inc.php
- Timestamp:
- May 13, 2008 4:14:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/ACL.inc.php
r280 r334 21 21 var $_params = array( 22 22 23 // If false nothing will be cached or retr eived. Useful for testing realtime data requests.23 // If false nothing will be cached or retrieved. Useful for testing realtime data requests. 24 24 'enable_cache' => true, 25 25 … … 178 178 trigger_error(sprintf('Database table %s has invalid columns. Please update this table manually.', "{$a_o}_tbl"), E_USER_ERROR); 179 179 } else { 180 // Insert root node data if nonexist ant.180 // Insert root node data if nonexistent. 181 181 $qid = $db->query("SELECT 1 FROM {$a_o}_tbl WHERE name = 'root'"); 182 182 if (mysql_num_rows($qid) == 0) { … … 247 247 $qid = $db->query("SELECT rgt FROM $tbl WHERE name = '" . $db->escapeString($parent) . "'"); 248 248 if (!list($parent_rgt) = mysql_fetch_row($qid)) { 249 $app->logMsg(sprintf('Cannot add %s node to nonexist ant parent: %s', $type, $parent), LOG_WARNING, __FILE__, __LINE__);249 $app->logMsg(sprintf('Cannot add %s node to nonexistent parent: %s', $type, $parent), LOG_WARNING, __FILE__, __LINE__); 250 250 return false; 251 251 } … … 325 325 $qid = $db->query("SELECT lft, rgt FROM $tbl WHERE name = '" . $db->escapeString($name) . "'"); 326 326 if (!list($lft, $rgt) = mysql_fetch_row($qid)) { 327 $app->logMsg(sprintf('Cannot delete nonexist ant %s name: %s', $type, $name), LOG_NOTICE, __FILE__, __LINE__);327 $app->logMsg(sprintf('Cannot delete nonexistent %s name: %s', $type, $name), LOG_NOTICE, __FILE__, __LINE__); 328 328 return false; 329 329 } … … 412 412 $qid = $db->query("SELECT lft, rgt FROM $tbl WHERE name = '" . $db->escapeString($name) . "'"); 413 413 if (!list($lft, $rgt) = mysql_fetch_row($qid)) { 414 $app->logMsg(sprintf('Cannot move nonexist ant %s name: %s', $type, $name), LOG_NOTICE, __FILE__, __LINE__);414 $app->logMsg(sprintf('Cannot move nonexistent %s name: %s', $type, $name), LOG_NOTICE, __FILE__, __LINE__); 415 415 return false; 416 416 } … … 422 422 $qid = $db->query("SELECT rgt FROM $tbl WHERE name = '" . $db->escapeString($new_parent) . "'"); 423 423 if (!list($new_parent_rgt) = mysql_fetch_row($qid)) { 424 $app->logMsg(sprintf('Cannot move %s node to nonexist ant parent: %s', $type, $new_parent), LOG_WARNING, __FILE__, __LINE__);424 $app->logMsg(sprintf('Cannot move %s node to nonexistent parent: %s', $type, $new_parent), LOG_WARNING, __FILE__, __LINE__); 425 425 return false; 426 426 } … … 661 661 if (!list($access) = mysql_fetch_row($qid)) { 662 662 $this->cache->set($cache_hash, 'deny'); 663 $app->logMsg(sprintf('Access den yed: %s -> %s -> %s. No records found.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);663 $app->logMsg(sprintf('Access denied: %s -> %s -> %s. No records found.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__); 664 664 return false; 665 665 } … … 671 671 return true; 672 672 } else { 673 $app->logMsg(sprintf('Access den yed: %s -> %s -> %s.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);673 $app->logMsg(sprintf('Access denied: %s -> %s -> %s.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__); 674 674 return false; 675 675 }
Note: See TracChangeset
for help on using the changeset viewer.