Project

General

Profile

Bug #18084 » 0007333_post.patch

Administrator Admin, 2008-02-11 14:14

View differences:

typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
* Lock the page generation process
* The lock is used to queue page requests until this page is successfully stored in the cache.
*
* @param object Reference to a locking object
* @param t3lib_lock Reference to a locking object
* @param string String to identify the lock in the system
* @return boolean Returns true if the lock could be obtained, false otherwise (= process had to wait for existing lock to be released)
* @see releasePageGenerationLock()
......
/**
* Release the page generation lock
*
* @param object Reference to a locking object
* @param t3lib_lock Reference to a locking object
* @return boolean Returns true on success, false otherwise
* @see acquirePageGenerationLock()
*/
function releasePageGenerationLock(&$lockObj) {
if ($this->no_cache || $this->headerNoCache()) {
return true; // No locking is needed if caching is disabled
}
$success = false;
if (is_object($lockObj)) {
// If lock object is set and was aquired (may also happen if no_cache was enabled during runtime):
if (is_object($lockObj) && $lockObj instanceof t3lib_lock && $lockObj->getLockStatus()) {
$success = $lockObj->release();
unset($lockObj);
// Otherwise, if caching is disabled, no locking is required:
} elseif ($this->no_cache || $this->headerNoCache()) {
$success = true;
}
return $success;
}
(3-3/4)