Project

General

Profile

Feature #20849 » 0011669_v3.patch

Administrator Admin, 2009-09-17 20:42

View differences:

typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
/**
* Sets the cache-flag to 1. Could be called from user-included php-files in order to ensure that a page is not cached.
*
* @param string $reason: An optional reason to be written to the syslog.
* If not set, debug_backtrace() will be used to track down the call.
* @return void
*/
function set_no_cache() {
if (function_exists('debug_backtrace')) {
function set_no_cache($reason = '') {
if (strlen($reason)) {
$warning = '$TSFE->set_no_cache() was triggered. Reason: ' . $reason . '.';
} else {
$trace = debug_backtrace();
// This is a hack to work around ___FILE___ resolving symbolic links
$PATH_site_real = str_replace('t3lib','',realpath(PATH_site.'t3lib'));
......
}
$line = $trace[0]['line'];
$trigger = $file.' on line '.$line;
} else {
$trigger = '[unknown]';
$warning = '$TSFE->set_no_cache() was triggered by ' . $trigger.'.';
}
$warning = '$TSFE->set_no_cache() was triggered by '.$trigger.'. ';
if ($this->TYPO3_CONF_VARS['FE']['disableNoCacheParameter']) {
$warning.= 'However $TYPO3_CONF_VARS[\'FE\'][\'disableNoCacheParameter\'] is set, so it will be ignored!';
$warning.= ' However, $TYPO3_CONF_VARS[\'FE\'][\'disableNoCacheParameter\'] is set, so it will be ignored!';
$GLOBALS['TT']->setTSlogMessage($warning,2);
} else {
$warning.= 'Caching is disabled!';
$warning.= ' Caching is disabled!';
$this->no_cache = 1;
}
t3lib_div::sysLog($warning, 'cms', 2);
}
(4-4/4)