Changeset 149 for trunk/lib/Lock.inc.php


Ignore:
Timestamp:
Jun 5, 2006 2:34:47 AM (18 years ago)
Author:
scdev
Message:

Q - while we're changing interfaces I'm going to change ->clearAuth() to ->clear().

File:
1 edited

Legend:

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

    r146 r149  
    5555        $app =& App::getInstance();
    5656
    57         if (!method_exists($auth_object, 'getVal') || !method_exists($auth_object, 'getUsername')) {
     57        if (!method_exists($auth_object, 'get') || !method_exists($auth_object, 'getUsername')) {
    5858            trigger_error('Constructor not provided a valid Auth_* object.', E_USER_ERROR);
    5959        }
     
    183183        }
    184184        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->getVal('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__);
    186186            /// FIX ME: What if admin set lock, but public user is current lock user?
    187187            $this->data['editor'] = $this->_auth->getUsername($this->data['set_by_admin_id']);
     
    218218            $qid = $db->query("SELECT * FROM " . $db->escapeString($this->getParam('db_table')) . " WHERE lock_id = '" . $db->escapeString($this->data['lock_id']) . "'");
    219219            if ($lock = mysql_fetch_assoc($qid)) {
    220                 return ($lock['set_by_admin_id'] == $this->_auth->getVal('user_id'));
     220                return ($lock['set_by_admin_id'] == $this->_auth->get('user_id'));
    221221            } else {
    222222                return false;
     
    268268                '" . $db->escapeString($record_val) . "',
    269269                '" . $db->escapeString($title) . "',
    270                 '" . $db->escapeString($this->_auth->getVal('user_id')) . "',
     270                '" . $db->escapeString($this->_auth->get('user_id')) . "',
    271271                NOW()
    272272            )
     
    318318            // Delete specific user's locks.
    319319            $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->getVal('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__);
    321321        } else {
    322322            // Delete ALL locks.
    323323            $db->query("DELETE FROM " . $db->escapeString($this->getParam('db_table')) . "");
    324             $app->logMsg(sprintf('All record locks deleted by %s %s', $this->_auth->getVal('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__);
    325325        }
    326326    }
Note: See TracChangeset for help on using the changeset viewer.