Skip to content

Commit

Permalink
Merge branch 'hotfix/2.0.14'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryd committed Apr 18, 2016
2 parents 918481f + bb47c65 commit ca50af7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Classes/Encoder/UrlEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,8 +915,8 @@ protected function handleFileNameUsingGetVars() {
else {
$this->encodedUrl = rtrim($this->encodedUrl, '/');
}
$this->encodedUrl .= $fileName;
}
$this->encodedUrl .= $fileName;
$this->urlParameters = array_diff_key($this->urlParameters, $variablesToRemove);
$result = TRUE;
break;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "typo3-cms-extension",
"description": "Speaking URLs for TYPO3",
"homepage": "https://github.com/dmitryd/typo3-realurl",
"version": "2.0.13",
"version": "2.0.14",
"license": "LGPL-3.0+",
"conflict": {
"bednee/cooluri": ">0.0.1",
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'title' => 'Speaking URLs for TYPO3',
'description' => 'Makes TYPO3 URLs search engine friendly. Donations are welcome to [email protected]. They help to support the extension!',
'category' => 'services',
'version' => '2.0.13',
'version' => '2.0.14',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
Expand Down
53 changes: 0 additions & 53 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,6 @@

if (!function_exists('includeRealurlConfiguration')) {

/**
* Makes sure that some known USER_INT plugins are not included to cHash
* calculation. This will dynamically adjust variables if certain
* parameters are found in the URL. This is useful for decoding only when
* there is no URL cache entry for the URL because in such case these
* parameters will create a cHash.
*
* @return void
* @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::makeCacheHash()
*/
function tx_realurl_fixCacheHashExcludeList() {
$excludeList = &$GLOBALS['TYPO3_CONF_VARS']['FE']['cHashExcludedParameters'];
$excludeArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', (string)$excludeList, true);
$newExcludeArray = $excludeArray;

$knownUserIntParameterPrefixes = array(
'tx_felogin_pi1',
'tx_form_form',
'tx_indexedsearch',
'tx_solr'
);
$knownUserIntParameters = array(
'q', // solr
);

foreach ($knownUserIntParameterPrefixes as $userIntParameterPrefix) {
$urlParameters = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET($userIntParameterPrefix);
if (is_array($urlParameters)) {
foreach (array_keys($urlParameters) as $parameterName) {
$fullParameterName = $userIntParameterPrefix . '[' . $parameterName . ']';
if (!in_array($fullParameterName, $newExcludeArray)) {
$newExcludeArray[] = $fullParameterName;
}
}
unset($parameterName, $urlParameters);
}
}
foreach ($knownUserIntParameters as $userIntParameter) {
$urlParameter = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET($userIntParameter);
if (is_string($urlParameter) && !in_array($userIntParameter, $newExcludeArray)) {
$newExcludeArray[] = $userIntParameter;
}
}

if (count($newExcludeArray) !== count($excludeArray)) {
$excludeList = implode(',', $newExcludeArray);
if (is_array($GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'])) {
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'] = $newExcludeArray;
}
}
}

/**
* Includes RealURL configuration.
*
Expand Down Expand Up @@ -92,7 +40,6 @@ function includeRealurlConfiguration() {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc']['realurl'] = 'DmitryDulepov\\Realurl\\Decoder\\UrlDecoder->decodeUrl';

includeRealurlConfiguration();
tx_realurl_fixCacheHashExcludeList();

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['realurl_all_caches'] = 'DmitryDulepov\\Realurl\\Hooks\\Cache->clearUrlCache';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['realurl_records'] = 'DmitryDulepov\\Realurl\\Hooks\\Cache->clearUrlCacheForRecords';
Expand Down

0 comments on commit ca50af7

Please sign in to comment.