Bug #8383: Correctly remove null from mailbox name
authorMichael M Slusarz <slusarz@curecanti.org>
Sun, 28 Jun 2009 02:35:21 +0000 (20:35 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sun, 28 Jun 2009 02:35:21 +0000 (20:35 -0600)
imp/lib/IMP.php
imp/lib/Search.php

index 38f0e5e..94591f9 100644 (file)
@@ -138,7 +138,7 @@ class IMP
      */
     static public function getLabel($mbox)
     {
-        return ($GLOBALS['imp_search']->isSearchMbox($mbox))
+        return IMP_Search::isSearchMbox($mbox)
             ? $GLOBALS['imp_search']->getLabel($mbox)
             : self::displayFolder($mbox);
     }
index d03dc3d..ba2fa3e 100644 (file)
@@ -269,7 +269,7 @@ class IMP_Search
     public function getLabel($id = null)
     {
         $id = $this->_strip($id);
-        return (isset($_SESSION['imp']['search']['q'][$id]['label']))
+        return isset($_SESSION['imp']['search']['q'][$id]['label'])
             ? $_SESSION['imp']['search']['q'][$id]['label']
             : '';
     }
@@ -666,7 +666,7 @@ class IMP_Search
         $pos = strpos($id, null);
         return ($pos === false)
             ? $id
-            : substr($id, $pos);
+            : substr($id, $pos + 1);
     }
 
     /**