* Fixed bug: #6531: Function getUpdateJS doesn't work properly (Thanks to Philip...
authorThomas Hempel <thomas.hempel@typo3.org>
Sun, 21 Oct 2007 14:07:25 +0000 (14:07 +0000)
committerThomas Hempel <thomas.hempel@typo3.org>
Sun, 21 Oct 2007 14:07:25 +0000 (14:07 +0000)
* Fixed bug: #434: function getUpdateJS produce JS error messages

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2602 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php

index f87dfce..6a6bf66 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-
+2007-10-21     Thomas Hempel <thomas@typo3-unleashed.net>
+       
+       * Fixed bug: #6531: Function getUpdateJS doesn't work properly (Thanks to Philip Almeida)
+       * Fixed bug: #434: function getUpdateJS produce JS error messages
+       
 2007-10-20  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
        * Fixed bug #6559: Spelling error in Object Browser
index 1814615..a25dc94 100755 (executable)
@@ -6072,18 +6072,19 @@ class tslib_cObj {
        function getUpdateJS($dataArray, $formName, $arrPrefix, $fieldList)     {
                $JSPart='';
                $updateValues=t3lib_div::trimExplode(',',$fieldList);
+               reset($updateValues);
                while(list(,$fKey)=each($updateValues)) {
                        $value = $dataArray[$fKey];
                        if (is_array($value))   {
                                reset($value);
                                while(list(,$Nvalue)=each($value))      {
                                        $JSPart.="
-       updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',".t3lib_div::quoteJSvalue($Nvalue, true).")";
+       updateForm('".$formName."','".$arrPrefix."[".$fKey."][]',".t3lib_div::quoteJSvalue($Nvalue, true).");";
                                }
 
                        } else {
                                $JSPart.="
-       updateForm('".$formName."','".$arrPrefix."[".$fKey."]',".t3lib_div::quoteJSvalue($value, true).")";
+       updateForm('".$formName."','".$arrPrefix."[".$fKey."]',".t3lib_div::quoteJSvalue($value, true).");";
                        }
                }
                $JSPart='<script type="text/javascript">