Added feature #7369: Hook for manipulating the cHash
authorOliver Hader <oliver.hader@typo3.org>
Tue, 5 Feb 2008 19:06:48 +0000 (19:06 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 5 Feb 2008 19:06:48 +0000 (19:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3082 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
NEWS.txt
t3lib/class.t3lib_div.php

index 42084ab..a4f4e6b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
 
        * (tweak) Followup to #6472: Some small changes to the new hooks
        * !!! (feature) Added feature #7370: Remove page doktypes '2' & '5' ('advanced' & 'not in menu') and merge them with 'normal' doktype '1' (patch by Steffen Kamper) 
+       * (feature) Added feature #7369: Hook for manipulating the cHash
 
 2008-02-04 Jeff Segars <jeff@webempoweredchurch.org>
 
index d3aef33..4e31cb2 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -90,6 +90,7 @@ Development
                -> Hook in TCEmain after all database operations
                -> Some Hooks for tslib_content
                -> Added hooks to t3lib_TCEforms_inline to manipulate control items for each child record
+               -> Added hook to manipulate the cHash
 
 TypoScript changes
 ==================
index dc9a3f0..0176b24 100755 (executable)
@@ -3643,6 +3643,22 @@ class t3lib_div {
                                $pA[rawurldecode($pKV[0])] = (string)rawurldecode($pKV[1]);
                        }
                }
+                       // Hook: Allows to manipulate the parameters which are taken to build the chash:
+               if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['cHashParamsHook']))   {
+                       $cHashParamsHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['cHashParamsHook'];
+                       if (is_array($cHashParamsHook)) {
+                               $hookParameters = array(
+                                       'addQueryParams' => &$addQueryParams,
+                                       'params' => &$params,
+                                       'pA' => &$pA,
+                               );
+                               $hookReference = null;
+                               foreach ($cHashParamsHook as $hookFunction)     {
+                                       t3lib_div::callUserFunction($hookFunction, $hookParameters, $hookReference);
+                               }
+                       }
+               }
+                       // Finish and sort parameters array by keys:
                $pA['encryptionKey'] = $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
                ksort($pA);