Ignore:
Timestamp:
Nov 23, 2005 9:29:33 PM (19 years ago)
Author:
scdev
Message:

More bugs and shifting things about.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/RecordLock.inc.php

    r21 r22  
    3333    {
    3434        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         }
    3935               
    4036        if (!isset($instances[$auth_object->getVal('auth_name')])) {
     
    5248    function RecordLock($auth_object)
    5349    {
     50        if (!is_a($auth_object, 'Auth_SQL')) {
     51            trigger_error('Constructor not provided a valid Auth_SQL object.', E_USER_ERROR);
     52        }
     53
    5454        $this->_auth = $auth_object;
    5555       
     
    168168        }
    169169        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?
    171172            $this->data['editor'] = $this->_auth->getUsername($this->data['set_by_admin_id']);
    172173            return true;
     
    275276            WHERE lock_id = '" . addslashes($this->data['lock_id']) . "'
    276277        ");
     278       
     279        App::logMsg(sprintf('Removing lock: %s', $this->data['lock_id']), LOG_DEBUG, __FILE__, __LINE__);
    277280    }
    278281
Note: See TracChangeset for help on using the changeset viewer.