Feature #17667 ยป class.tslib_content.diff

Administrator Admin, 2007-10-10 18:58

View differences:

class.tslib_content.php (Arbeitskopie)
5340 5340
						if (strpos($addQueryParams, '&cHash=') !== false) {
5341 5341
							$conf['useCacheHash'] = 1;
5342 5342
						}
5343

  
5343 5344
						if (substr($addQueryParams,0,1)!='&')		{
5344 5345
							$addQueryParams = '';
5345 5346
						} elseif ($conf['useCacheHash']) {	// cache hashing:
5346
							$addQueryParams = preg_replace('/&cHash=[0-9A-Za-z]+/', '', $addQueryParams);	// cHash parameter is wiped before being rebuilt...
5347
							$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)
5348
							if (count($pA) > 1) {	// Only if there is more than one parameter (1st one is always the encryptionKey)
5349
								$addQueryParams.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
5347
								//prevents $addQueryParams=&
5348
							$addQueryParams = ($addQueryParams == '&') ? null : preg_replace('/&cHash=[0-9A-Za-z]+/', '', $addQueryParams);	// cHash parameter is wiped before being rebuilt...
5349
								//prevents faulty cHash calculations 
5350
							if($GLOBALS['TSFE']->linkVars || $addQueryParams) {
5351
								$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)
5352
								if (count($pA) > 1) {	// Only if there is more than one parameter (1st one is always the encryptionKey)
5353
									$addQueryParams.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
5354
								}
5350 5355
							}
5351 5356
						}
5352 5357

  
    (1-1/1)