Ignore:
Timestamp:
Jun 3, 2006 7:47:48 PM (18 years ago)
Author:
scdev
Message:

Q - Merged branches/2.0singleton into trunk. Completed updating classes to use singleton methods. Implemented tests. Fixed some bugs. Changed some interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/services/lock.php

    r53 r136  
    99
    1010$auth->requireLogin();
    11 App::sslOn();
     11$app->sslOn();
    1212
    1313if (getFormData('boomerang', false)) {
    1414    // We remember which page we came from so we can go back there.
    1515    $boom_url = strpos(getFormData('boomerang'), '/') !== false ? getFormData('boomerang') : $_SERVER['HTTP_REFERER'];
    16     App::setBoomerangURL($boom_url, 'lock');
     16    $app->setBoomerangURL($boom_url, 'lock');
    1717    if (isset($_SERVER['HTTP_REFERER'])) {
    18         App::setBoomerangURL($_SERVER['HTTP_REFERER'], 'cancel-lock');
     18        $app->setBoomerangURL($_SERVER['HTTP_REFERER'], 'cancel-lock');
    1919    }
    2020}
     
    2626
    2727if (!$lock->isLocked()) {
    28     App::logMsg('Lock not found with lock_id: ' . getFormData('lock_id') . ', from referrer: ' . $_SERVER['HTTP_REFERER'], LOG_WARNING, __FILE__, __LINE__);
    29     App::dieBoomerangURL('lock');
     28    $app->logMsg('Lock not found with lock_id: ' . getFormData('lock_id') . ', from referrer: ' . $_SERVER['HTTP_REFERER'], LOG_WARNING, __FILE__, __LINE__);
     29    $app->dieBoomerangURL('lock');
    3030}
    3131
     
    3333if (getFormData('unlock', false)) {
    3434    $lock->remove();
    35     App::raiseMsg(sprintf(_("The record <strong>%s</strong> has been unlocked, and can now be modified."), $lock->getTitle('title')), MSG_NOTICE, __FILE__, __LINE__);
    36     App::dieBoomerangURL('lock');
     35    $app->raiseMsg(sprintf(_("The record <strong>%s</strong> has been unlocked, and can now be modified."), $lock->getTitle('title')), MSG_NOTICE, __FILE__, __LINE__);
     36    $app->dieBoomerangURL('lock');
    3737} else if (getFormData('cancel', false)) {
    3838    // Since the boomerang URL will go back to the locked record, and the record was not unlocked, we must delete the boomerang URL otherwise we'll come back here.
    39     App::deleteBoomerangURL('lock');
    40     App::dieBoomerangURL('cancel-lock');
     39    $app->deleteBoomerangURL('lock');
     40    $app->dieBoomerangURL('cancel-lock');
    4141}
    4242
Note: See TracChangeset for help on using the changeset viewer.