/** * Calculates a hash string based on additional parameters in the url. This is used to cache pages with more parameters than just id and type * * @return void * @see reqCHash() */ function makeCacheHash() { $GET = t3lib_div::_GET(); /** * */ $myExtParams = t3lib_div::GPvar('tx_myext_pi1'); if(sizeof($myExtParams) >= 1) { $myExtQstring = '&id='.$this->id; $GET = array('id' => $this->id); $GET['tx_myext_pi1'] = array(); foreach ($myExtParams as $varName => $varValue) { $GET['tx_myext_pi1'][$varName] = $varValue; $myExtQstring .= '&tx_myext_pi1['.$varName.']='.$varValue; } $cHash_array = t3lib_div::cHashParams($myExtQstring); $this->cHash = t3lib_div::shortMD5(serialize($cHash_array)); } /**/ if ($this->cHash && is_array($GET)) { $this->cHash_array = t3lib_div::cHashParams(t3lib_div::implodeArrayForUrl('',$GET)); $cHash_calc = t3lib_div::shortMD5(serialize($this->cHash_array)); if ($cHash_calc!=$this->cHash) { if ($this->TYPO3_CONF_VARS['FE']['pageNotFoundOnCHashError']) { $this->pageNotFoundAndExit('Request parameters could not be validated (&cHash comparison failed)'); } else { $this->set_no_cache(); $GLOBALS['TT']->setTSlogMessage('The incoming cHash "'.$this->cHash.'" and calculated cHash "'.$cHash_calc.'" did not match, so caching was disabled. The fieldlist used was "'.implode(',',array_keys($this->cHash_array)).'"',2); } } } }