Followup to #6472: Some small changes to the new hooks
authorOliver Hader <oliver.hader@typo3.org>
Mon, 4 Feb 2008 23:06:09 +0000 (23:06 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 4 Feb 2008 23:06:09 +0000 (23:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3067 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms_inline.php

index 0411000..b8c572b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2008-02-05  Oliver Hader  <oh@inpublica.de>
+
+       * (tweak) Followup to #6472: Some small changes to the new hooks 
 
 2008-02-04  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index 9904fbd..6392a65 100755 (executable)
@@ -142,16 +142,17 @@ class t3lib_TCEforms_inline {
                $this->hookObjects = array();
                if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['tceformsInlineHook'])) {
                        $tceformsInlineHook =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['tceformsInlineHook'];
-                       foreach($tceformsInlineHook as $classData) {
-                               $processObject = &t3lib_div::getUserObj($classData);
+                       if (is_array($tceformsInlineHook)) {
+                               foreach($tceformsInlineHook as $classData) {
+                                       $processObject = &t3lib_div::getUserObj($classData);
+       
+                                       if(!($processObject instanceof t3lib_tceformsInlineHook)) {
+                                               throw new UnexpectedValueException('$processObject must implement interface t3lib_tceformsInlineHook', 1202072000);
+                                       }
 
-                               if(!($processObject instanceof t3lib_tceformsInlineHook)) {
-                                       throw new UnexpectedValueException('$processObject must implement interface t3lib_tceformsInlineHook', 1202072000);
+                                       $processObject->init($this);
+                                       $this->hookObjects[] = $processObject;
                                }
-
-                               $parameters = array();
-                               $processObject->init($this);
-                               $this->hookObjects[] = $processObject;
                        }
                }
        }
@@ -583,7 +584,7 @@ class t3lib_TCEforms_inline {
                );
                        // Hook: Can disable/enable single controls for specific child records:
                foreach ($this->hookObjects as $hookObj)        {
-                       $hookObj->renderForeignRecordHeaderControl_preProcess($parentUid, $foreign_table, $rec, $config, $isVirtual, &$enabledControls);
+                       $hookObj->renderForeignRecordHeaderControl_preProcess($parentUid, $foreign_table, $rec, $config, $isVirtual, $enabledControls);
                }
 
                        // Icon to visualize that a required field is nested in this inline level:
@@ -682,7 +683,7 @@ class t3lib_TCEforms_inline {
 
                        // Hook: Post-processing of single controls for specific child records:
                foreach ($this->hookObjects as $hookObj)        {
-                       $hookObj->renderForeignRecordHeaderControl_postProcess($parentUid, $foreign_table, $rec, $config, $isVirtual, &$cells);
+                       $hookObj->renderForeignRecordHeaderControl_postProcess($parentUid, $foreign_table, $rec, $config, $isVirtual, $cells);
                }
                        // Compile items into a DIV-element:
                return '