Feature #14707 ยป class.tslib_content.diff
class.tslib_content.php (Arbeitskopie) | ||
---|---|---|
if (strpos($addQueryParams, '&cHash=') !== false) {
|
||
$conf['useCacheHash'] = 1;
|
||
}
|
||
if (substr($addQueryParams,0,1)!='&') {
|
||
$addQueryParams = '';
|
||
} elseif ($conf['useCacheHash']) { // cache hashing:
|
||
$addQueryParams = preg_replace('/&cHash=[0-9A-Za-z]+/', '', $addQueryParams); // cHash parameter is wiped before being rebuilt...
|
||
$pA = t3lib_div::cHashParams($GLOBALS['TSFE']->linkVars . $addQueryParams); // Added '.$this->linkVars' dec 2003: The need for adding the linkVars is that they will be included in the link, but not the cHash. Thus the linkVars will always be the problem that prevents the cHash from working. I cannot see what negative implications in terms of incompatibilities this could bring, but for now I hope there are none. So here we go... (- kasper)
|
||
if (count($pA) > 1) { // Only if there is more than one parameter (1st one is always the encryptionKey)
|
||
$addQueryParams.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
|
||
//prevents $addQueryParams=&
|
||
$addQueryParams = ($addQueryParams == '&') ? null : preg_replace('/&cHash=[0-9A-Za-z]+/', '', $addQueryParams); // cHash parameter is wiped before being rebuilt...
|
||
//prevents faulty cHash calculations
|
||
if($GLOBALS['TSFE']->linkVars || $addQueryParams) {
|
||
$pA = t3lib_div::cHashParams($GLOBALS['TSFE']->linkVars . $addQueryParams); // Added '.$this->linkVars' dec 2003: The need for adding the linkVars is that they will be included in the link, but not the cHash. Thus the linkVars will always be the problem that prevents the cHash from working. I cannot see what negative implications in terms of incompatibilities this could bring, but for now I hope there are none. So here we go... (- kasper)
|
||
if (count($pA) > 1) { // Only if there is more than one parameter (1st one is always the encryptionKey)
|
||
$addQueryParams.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
|
||
}
|
||
}
|
||
}
|
||