Project

General

Profile

Bug #20845 » bug_11663_part1.diff

Administrator Admin, 2009-08-07 16:17

View differences:

t3lib/class.t3lib_stdgraphic.php (Arbeitskopie)
'cache_typo3temp_log',
'md5hash=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($md5Hash, 'cache_typo3temp_log') . ' AND tstamp>' . ($GLOBALS['EXEC_TIME'] - 30)
);
if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // If there was a record, the image is being generated by another proces (we assume)
if (is_object($GLOBALS['TSFE'])) $GLOBALS['TSFE']->set_no_cache(); // ...so we set no_cache, because we dont want this page (which will NOT display an image...!) to be cached! (Only a page with the correct image on...)
if (is_object($GLOBALS['TT'])) $GLOBALS['TT']->setTSlogMessage('typo3temp_log: Assume this file is being rendered now: '.$output);
return 2; // Return 'success - 2'
} else { // If the current time is more than 30 seconds since this record was written, we clear the record, write a new and render the image.
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
if ($row) { // If there was a record, the image is being generated by another proces (we assume)
if (is_object($GLOBALS['TSFE'])) {
// ...so we set no_cache, because we dont want this page (which will NOT display an image...!) to be cached! (Only a page with the correct image on...)
// Note: This will not work if $TYPO3_CONF_VARS['FE']['disableNoCacheParameter'] is enabled.
// TODO: Drop this feature? Anyone using it?
$GLOBALS['TSFE']->set_no_cache();
}
if (is_object($GLOBALS['TT'])) {
$GLOBALS['TT']->setTSlogMessage('typo3temp_log: Assume this file is being rendered now: '.$output);
}
// Return 'success - 2'
return 2;
} else {
// If the current time is more than 30 seconds since this record was written, we clear the record, write a new and render the image.
$insertFields = array(
'md5hash' => $md5Hash,
'tstamp' => $GLOBALS['EXEC_TIME'],
typo3/sysext/cms/tslib/class.tslib_fe.php (Arbeitskopie)
$this->statistics_init_pagename();
}
// No cache
if ($this->config['config']['no_cache']) { $this->set_no_cache(); } // Set $this->no_cache true if the config.no_cache value is set!
// Set $this->no_cache true if the config.no_cache value is set!
if ($this->config['config']['no_cache']) {
$this->set_no_cache();
}
// Hook for postProcessing the configuration array
......
*/
function generatePage_postProcessing() {
// This is to ensure, that the page is NOT cached if the no_cache parameter was set before the page was generated. This is a safety precaution, as it could have been unset by some script.
if ($this->no_cacheBeforePageGen) $this->set_no_cache();
if ($this->no_cacheBeforePageGen) {
$this->set_no_cache();
}
// Tidy up the code, if flag...
if ($this->TYPO3_CONF_VARS['FE']['tidy_option'] == 'all') {
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
if ($conf['stdWrap.']) {
$content=$this->stdWrap($content, $conf['stdWrap.']);
}
// returning
// Note that this does not work if $TYPO3_CONF_VARS['FE']['disableNoCacheParameter'] is set. In such a case, just wrap this element inside a COA_INT object.
$GLOBALS['TSFE']->set_no_cache();
return $content;
}
(1-1/7)