[FEATURE] Generate cHash only if needed
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / tslib / class.tslib_content.php
index ed71890..90afe9e 100644 (file)
@@ -5687,7 +5687,11 @@ class tslib_cObj {
                                                                // Mind the order below! See http://bugs.typo3.org/view.php?id=5117
                                                        $params = $GLOBALS['TSFE']->linkVars . $addQueryParams;
                                                        if (trim($params, '& ') != '') {
-                                                               $addQueryParams .= '&cHash=' . t3lib_div::generateCHash($params);
+                                                               $cHashParams = t3lib_div::cHashParams($addQueryParams);
+                                                               if (count($cHashParams) > 1) {
+                                                                       $addQueryParams .= '&cHash=' . t3lib_div::calculateCHash($cHashParams);
+                                                               }
+                                                               unset($cHashParams);
                                                        }
                                                        unset($params);
                                                }