Changeset 149 for trunk/lib/Lock.inc.php
- Timestamp:
- Jun 5, 2006 2:34:47 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Lock.inc.php
r146 r149 55 55 $app =& App::getInstance(); 56 56 57 if (!method_exists($auth_object, 'get Val') || !method_exists($auth_object, 'getUsername')) {57 if (!method_exists($auth_object, 'get') || !method_exists($auth_object, 'getUsername')) { 58 58 trigger_error('Constructor not provided a valid Auth_* object.', E_USER_ERROR); 59 59 } … … 183 183 } 184 184 if ($this->data = mysql_fetch_assoc($qid)) { 185 $app->logMsg(sprintf('Selecting %slocked record: %s %s %s', ($this->data['set_by_admin_id'] == $this->_auth->get Val('user_id') ? 'self-' : ''), $record_table_or_lock_id, $record_key, $record_val), LOG_DEBUG, __FILE__, __LINE__);185 $app->logMsg(sprintf('Selecting %slocked record: %s %s %s', ($this->data['set_by_admin_id'] == $this->_auth->get('user_id') ? 'self-' : ''), $record_table_or_lock_id, $record_key, $record_val), LOG_DEBUG, __FILE__, __LINE__); 186 186 /// FIX ME: What if admin set lock, but public user is current lock user? 187 187 $this->data['editor'] = $this->_auth->getUsername($this->data['set_by_admin_id']); … … 218 218 $qid = $db->query("SELECT * FROM " . $db->escapeString($this->getParam('db_table')) . " WHERE lock_id = '" . $db->escapeString($this->data['lock_id']) . "'"); 219 219 if ($lock = mysql_fetch_assoc($qid)) { 220 return ($lock['set_by_admin_id'] == $this->_auth->get Val('user_id'));220 return ($lock['set_by_admin_id'] == $this->_auth->get('user_id')); 221 221 } else { 222 222 return false; … … 268 268 '" . $db->escapeString($record_val) . "', 269 269 '" . $db->escapeString($title) . "', 270 '" . $db->escapeString($this->_auth->get Val('user_id')) . "',270 '" . $db->escapeString($this->_auth->get('user_id')) . "', 271 271 NOW() 272 272 ) … … 318 318 // Delete specific user's locks. 319 319 $db->query("DELETE FROM " . $db->escapeString($this->getParam('db_table')) . " WHERE set_by_admin_id = '" . $db->escapeString($user_id) . "'"); 320 $app->logMsg(sprintf('Record locks owned by %s %s have been deleted', $this->_auth->get Val('auth_name'), $this->_auth->getUsername($user_id)), LOG_DEBUG, __FILE__, __LINE__);320 $app->logMsg(sprintf('Record locks owned by %s %s have been deleted', $this->_auth->get('auth_name'), $this->_auth->getUsername($user_id)), LOG_DEBUG, __FILE__, __LINE__); 321 321 } else { 322 322 // Delete ALL locks. 323 323 $db->query("DELETE FROM " . $db->escapeString($this->getParam('db_table')) . ""); 324 $app->logMsg(sprintf('All record locks deleted by %s %s', $this->_auth->get Val('auth_name'), $this->_auth->getVal('username')), LOG_DEBUG, __FILE__, __LINE__);324 $app->logMsg(sprintf('All record locks deleted by %s %s', $this->_auth->get('auth_name'), $this->_auth->get('username')), LOG_DEBUG, __FILE__, __LINE__); 325 325 } 326 326 }
Note: See TracChangeset
for help on using the changeset viewer.