Project

General

Profile

Feature #66255 ยป cHash.patch

Philip Weweler, 2015-04-03 00:02

View differences:

C:\Users\Philip\PhpstormProjects\TYPO3 Core Patch\xampp\htdocs\typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 2015-04-02 23:56:39.629470300 +0200
if ($addQueryParams === '&' || $addQueryParams[0] !== '&') {
$addQueryParams = '';
}
if ($conf['useCacheHash']) {
// Mind the order below! See http://forge.typo3.org/issues/17070
$params = $GLOBALS['TSFE']->linkVars . $addQueryParams;
if (trim($params, '& ') != '') {
/** @var $cacheHash \TYPO3\CMS\Frontend\Page\CacheHashCalculator */
$cacheHash = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\CacheHashCalculator');
$cHash = $cacheHash->generateForParameters($params);
$addQueryParams .= $cHash ? '&cHash=' . $cHash : '';
}
unset($params);
}
// Mind the order below! See http://forge.typo3.org/issues/17070
$params = $GLOBALS['TSFE']->linkVars . $addQueryParams;
if (trim($params, '& ') != '') {
/** @var $cacheHash \TYPO3\CMS\Frontend\Page\CacheHashCalculator */
$cacheHash = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\CacheHashCalculator');
if ($conf['useCacheHash'] || $cacheHash->doParametersRequireCacheHash($params)) {
$cHash = $cacheHash->generateForParameters($params);
$addQueryParams .= $cHash ? '&cHash=' . $cHash : '';
}
}
unset($params);
$targetDomain = '';
$currentDomain = $this->getEnvironmentVariable('HTTP_HOST');
// Mount pages are always local and never link to another domain
C:\Users\Philip\PhpstormProjects\TYPO3 Core Patch\xampp\htdocs\typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php 2015-04-02 23:51:50.493285900 +0200
if (empty($this->requireCacheHashPresenceParameters)) {
return FALSE;
}
$hasRequiredParameter = FALSE;
$parameterNames = array_keys($this->splitQueryStringToArray($queryString));
foreach ($parameterNames as $parameterName) {
if (in_array($parameterName, $this->requireCacheHashPresenceParameters)) {
$hasRequiredParameter = TRUE;
return TRUE;
}
}
return $hasRequiredParameter;
return FALSE;
}
/**
    (1-1/1)