Bug #18456 ยป 0007874.patch
t3lib/class.t3lib_lock.php (Arbeitskopie) | ||
---|---|---|
}
|
||
/**
|
||
* Destructor:
|
||
* Releases locks automatically when instance gets finished/unloaded.
|
||
*
|
||
* @return void
|
||
*/
|
||
function __destruct() {
|
||
$this->release();
|
||
}
|
||
/**
|
||
* Acquire a lock and return when successful. If the lock is already open, the client will be
|
||
*
|
||
* It is important to know that the lock will be acquired in any case, even if the request was blocked first. Therefore, the lock needs to be released in every situation.
|
typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie) | ||
---|---|---|
* @return boolean Returns true on success, false otherwise
|
||
* @see acquirePageGenerationLock()
|
||
*/
|
||
function releasePageGenerationLock(&$lockObj) {
|
||
function releasePageGenerationLock(&$lockObj) {
|
||
$success = false;
|
||
// If lock object is set and was aquired (may also happen if no_cache was enabled during runtime), release it:
|
||
if (is_object($lockObj) && $lockObj instanceof t3lib_lock && $lockObj->getLockStatus()) {
|
||
$success = $lockObj->release();
|
||
$lockObj->sysLog('Released lock');
|
||
unset($lockObj);
|
||
$lockObj = null;
|
||
// Otherwise, if caching is disabled, no locking is required:
|
||
} elseif ($this->no_cache || $this->headerNoCache()) {
|
||
$success = true;
|