Fixed bug #10735: Wrong returnUrl with clipboard actions
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_transferdata.php
old mode 100755 (executable)
new mode 100644 (file)
index 78abec6..448e53e
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -431,13 +431,14 @@ class t3lib_transferData {
                if (intval($fieldConfig['config']['maxitems'])>1)       {
 
                                // Add regular elements:
-                       if (is_array($fieldConfig['config']['items']))  {
-                               $fieldConfig['config']['items'] = $this->procesItemArray($fieldConfig['config']['items'], $fieldConfig['config'], $TSconfig[$field], $table, $row, $field);
-                               foreach($fieldConfig['config']['items'] as $pvpv)       {
-                                       foreach($elements as $eKey => $value)   {
-                                               if (!strcmp($value,$pvpv[1]))   {
-                                                       $dataAcc[$eKey]=rawurlencode($pvpv[1]).'|'.rawurlencode($this->sL($pvpv[0]));
-                                               }
+                       if (!is_array($fieldConfig['config']['items'])) {
+                               $fieldConfig['config']['items'] = array();
+                       }
+                       $fieldConfig['config']['items'] = $this->procesItemArray($fieldConfig['config']['items'], $fieldConfig['config'], $TSconfig[$field], $table, $row, $field);
+                       foreach($fieldConfig['config']['items'] as $pvpv)       {
+                               foreach($elements as $eKey => $value)   {
+                                       if (!strcmp($value,$pvpv[1]))   {
+                                               $dataAcc[$eKey]=rawurlencode($pvpv[1]).'|'.rawurlencode($this->sL($pvpv[0]));
                                        }
                                }
                        }
@@ -1033,4 +1034,5 @@ class t3lib_transferData {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_transferdata.php'])     {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_transferdata.php']);
 }
-?>
+
+?>
\ No newline at end of file