Changeset 22 for trunk/lib/RecordLock.inc.php
- Timestamp:
- Nov 23, 2005 9:29:33 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/RecordLock.inc.php
r21 r22 33 33 { 34 34 static $instances = array(); 35 36 if (!is_a($auth_object, 'Auth_SQL')) {37 trigger_error('Constructor not provided a valid Auth_SQL object.', E_USER_ERROR);38 }39 35 40 36 if (!isset($instances[$auth_object->getVal('auth_name')])) { … … 52 48 function RecordLock($auth_object) 53 49 { 50 if (!is_a($auth_object, 'Auth_SQL')) { 51 trigger_error('Constructor not provided a valid Auth_SQL object.', E_USER_ERROR); 52 } 53 54 54 $this->_auth = $auth_object; 55 55 … … 168 168 } 169 169 if ($this->data = mysql_fetch_assoc($qid)) { 170 App::logMsg(sprintf('Found locked record: %s %s %s', $record_table_or_lock_id, $record_key, $record_val), LOG_DEBUG, __FILE__, __LINE__); 170 App::logMsg(sprintf('Selecting %slocked record: %s %s %s', ($this->data['set_by_admin_id'] == $this->_auth->getVal('user_id') ? 'self-' : ''), $record_table_or_lock_id, $record_key, $record_val), LOG_DEBUG, __FILE__, __LINE__); 171 /// FIX ME: What if admin set lock, but public user is current lock user? 171 172 $this->data['editor'] = $this->_auth->getUsername($this->data['set_by_admin_id']); 172 173 return true; … … 275 276 WHERE lock_id = '" . addslashes($this->data['lock_id']) . "' 276 277 "); 278 279 App::logMsg(sprintf('Removing lock: %s', $this->data['lock_id']), LOG_DEBUG, __FILE__, __LINE__); 277 280 } 278 281
Note: See TracChangeset
for help on using the changeset viewer.