Removed the tree filter toggle
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_tceforms_inline.php
index 9d3fc92..3062fe6 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,16 +584,16 @@ 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:
                $cells['required'] = '<img name="'.$nameObjectFtId.'_req" src="clear.gif" width="10" height="10" hspace="4" vspace="3" alt="" />';
 
                if (isset($rec['__create'])) {
-                       $cells['localize.isLocalizable'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/localize_green.gif','width="16" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:unHide'.($isPagesTable?'Page':''),1).'" alt="" />';
+                       $cells['localize.isLocalizable'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/localize_green.gif','width="16" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:localize.isLocalizable', 1).'" alt="" />';
                } elseif (isset($rec['__remove'])) {
-                       $cells['localize.wasRemovedInOriginal'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/localize_red.gif','width="16" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:unHide'.($isPagesTable?'Page':''),1).'" alt="" />';
+                       $cells['localize.wasRemovedInOriginal'] = '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/localize_red.gif','width="16" height="16"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:localize.wasRemovedInOriginal', 1).'" alt="" />';
                }
 
                        // "Info": (All records)
@@ -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 '
@@ -1390,7 +1391,9 @@ class t3lib_TCEforms_inline {
                        // Perform modification of the selected items array:
                foreach($itemArray as $uid) {
                                // Get the records for this uid using t3lib_transferdata:
-                       $records[$uid] = $this->getRecord($pid, $table, $uid);
+                       if ($record = $this->getRecord($pid, $table, $uid)) {
+                               $records[$uid] = $record;
+                       }
                }
                return $records;
        }