Changeset 22 for trunk/services/lock.php
- Timestamp:
- Nov 23, 2005 9:29:33 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/services/lock.php
r21 r22 11 11 App::sslOn(); 12 12 13 if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {13 if (getFormData('boomerang', false)) { 14 14 // We remember which page we came from so we can go back there. 15 15 $boom_url = strpos(getFormData('boomerang'), '/') !== false ? getFormData('boomerang') : $_SERVER['HTTP_REFERER']; 16 16 App::setBoomerangURL($boom_url, 'lock'); 17 App::setBoomerangURL($_SERVER['HTTP_REFERER'], 'cancel-lock'); 17 18 } 18 19 19 $lock =& RecordLock::getInstance($GLOBALS['auth']); 20 if (!isset($lock) || !is_a($lock, 'RecordLock')) { 21 $lock =& RecordLock::getInstance($auth); 22 } 20 23 $lock->select(getFormData('lock_id')); 21 24 … … 31 34 App::dieBoomerangURL('lock'); 32 35 } else if (getFormData('cancel', false)) { 33 App::dieBoomerangURL('lock'); 36 // 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. 37 App::deleteBoomerangURL('lock'); 38 App::dieBoomerangURL('cancel-lock'); 34 39 } 35 40
Note: See TracChangeset
for help on using the changeset viewer.