Follow-up to bug #16846: Allow external objects to modify the remapAction stack
authorOliver Hader <oliver.hader@typo3.org>
Sat, 1 Jan 2011 19:11:34 +0000 (19:11 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 1 Jan 2011 19:11:34 +0000 (19:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9979 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php

index 1bc745d..e35baa8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-01  Oliver Hader  <oliver.hader@typo3.org>
+
+       * Follow-up to bug #16846: Allow external objects to modify the remapAction stack
+
 2011-01-01  Susanne Moog  <typo3@susanne-moog.de>
 
        * Fixed bug #16308: displayEditIcons expects array, null given (Thanks to Daniel Müller)
index 78e3868..ed64cb9 100644 (file)
@@ -5008,18 +5008,31 @@ class t3lib_TCEmain {
                if (!$forceRemapStackActions && !isset($this->remapStackRecords[$table][$id]) && !isset($this->remapStackChildIds[$id])) {
                        call_user_func_array($callback, $arguments);
                } else {
-                       $this->remapStackActions[] = array(
-                               'affects' => array(
-                                       'table' => $table,
-                                       'id' => $id,
-                               ),
-                               'callback' => $callback,
-                               'arguments' => $arguments,
-                       );
+                       $this->addRemapAction($table, $id, $callback, $arguments);
                }
        }
 
        /**
+        * Adds an instruction to the remap action stack (used with IRRE).
+        *
+        * @param string $table The affected table
+        * @param integer $id The affected ID
+        * @param array $callback The callback information (object and method)
+        * @param array $arguments The arguments to be used with the callback
+        * @return void
+        */
+       public function addRemapAction($table, $id, array $callback, array $arguments) {
+               $this->remapStackActions[] = array(
+                       'affects' => array(
+                               'table' => $table,
+                               'id' => $id,
+                       ),
+                       'callback' => $callback,
+                       'arguments' => $arguments,
+               );
+       }
+
+       /**
         * Adds a table-id-pair to the reference index remapping stack.
         *
         * @param string $table