[Jaws-commits] r13303 - branches/0.8/html/include/Jaws/Widgets

afz at jaws-project.com afz at jaws-project.com
Mon Aug 6 21:26:28 UTC 2012


Author: afz
Date: 2012-08-06 21:26:28 +0000 (Mon, 06 Aug 2012)
New Revision: 13303

Modified:
   branches/0.8/html/include/Jaws/Widgets/CKEditor.php
Log:
[CKEditor]: Fixed json_encode and reindex toolbars array keys

Modified: branches/0.8/html/include/Jaws/Widgets/CKEditor.php
===================================================================
--- branches/0.8/html/include/Jaws/Widgets/CKEditor.php	2012-08-06 21:05:58 UTC (rev 13302)
+++ branches/0.8/html/include/Jaws/Widgets/CKEditor.php	2012-08-06 21:26:28 UTC (rev 13303)
@@ -262,7 +262,7 @@
         $extraToolbars = $GLOBALS['app']->Registry->Get('/config/editor_ckeditor_toolbar');
         $extraToolbars = array_filter(explode('|', $extraToolbars));
         foreach ($extraToolbars as $key => $items) {
-            $items = array_filter(array_map('trim', explode(',', $items)));
+            $items = array_values(array_filter(array_map('trim', explode(',', $items))));
             if (!empty($items)) {
                 $this->_BaseToolbar[] = array('name'  => "extra$key",
                                               'items' => $items);
@@ -325,7 +325,7 @@
             } elseif ($sValue === false) {
                 $sParams .= $sKey . ': false';
             } elseif (is_array($sValue)) {
-                $sParams .= $sKey . " : " . json_encode($sValue);
+                $sParams .= $sKey . " : " . Jaws_UTF8::json_encode($sValue);
             } else {
                 $sParams .= $sKey . " : '" . $sValue . "'";
             }



More information about the Jaws-commits mailing list