From: Michael M Slusarz Date: Fri, 29 May 2009 05:22:24 +0000 (-0600) Subject: Remove unnecessary mailbox name escaping X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0feb3b7d2923d5996e3376fa44ac92ab27bd26a6;p=horde.git Remove unnecessary mailbox name escaping --- diff --git a/imp/folders.php b/imp/folders.php index 3a5b689da..334018d41 100644 --- a/imp/folders.php +++ b/imp/folders.php @@ -351,8 +351,13 @@ if ($_SESSION['imp']['file_upload'] && ($actionID == 'import_mbox')) { } /* Build the folder tree. */ -list($raw_rows, $newmsgs, $displayNames) = $imaptree->build(); +list($raw_rows, $newmsgs) = $imaptree->build(); +/* Build the list of display names. */ +reset($raw_rows); +while (list(,$r) = each($raw_rows)) { + $displayNames[] = $r['display']; +} IMP::addInlineScript(array( 'ImpFolders.displayNames = ' . Horde_Serialize::serialize($displayNames, Horde_Serialize::JSON, $charset) )); diff --git a/imp/lib/Imap/Tree.php b/imp/lib/Imap/Tree.php index 09e251b97..38f376db7 100644 --- a/imp/lib/Imap/Tree.php +++ b/imp/lib/Imap/Tree.php @@ -1586,9 +1586,8 @@ class IMP_Imap_Tree * different icon whether the folder is opened or * closed. * - * @return array An array with three elements: the folder list, the total - * number of new messages, and a list with folder names - * suitable for user interaction. + * @return array An array with two elements: the folder list and the + * total number of new messages. * The folder list array contains the following added * entries on top of the entries provided by element(): *
@@ -1598,7 +1597,7 @@ class IMP_Imap_Tree
      */
     public function build($mask = 0, $open = true)
     {
-        $displayNames = $newmsgs = $rows = array();
+        $newmsgs = $rows = array();
         $this->_forceopen = $open;
 
         /* Start iterating through the list of mailboxes, displaying them. */
@@ -1616,13 +1615,12 @@ class IMP_Imap_Tree
             /* Hide folder prefixes from the user. */
             if ($row['level'] >= 0) {
                 $rows[] = $row;
-                $displayNames[] = addslashes($row['display']);
             }
         } while (($mailbox = $this->next($mask)));
 
         $this->_forceopen = false;
 
-        return array($rows, $newmsgs, $displayNames);
+        return array($rows, $newmsgs);
     }
 
     /**