Have a single menu->apps definition for IMP
authorMichael M Slusarz <slusarz@curecanti.org>
Sat, 15 Aug 2009 19:47:30 +0000 (13:47 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sat, 15 Aug 2009 20:06:24 +0000 (14:06 -0600)
imp/config/conf.xml
imp/lib/Dimp.php

index 1b2894e..5b8a826 100644 (file)
     before displaying an informational message to users that the message list is
     still being built. Set to 0 to disable messages.">12</configinteger>
    </configsection>
-
-   <configsection name="menu" desc="Menu Settings">
-    <configheader>Menu Settings</configheader>
-    <configmultienum name="apps" desc="Select any applications that should be
-    linked in DIMP's menu">
-     <values>
-      <configspecial name="list-horde-apps" />
-     </values>
-    </configmultienum>
-   </configsection>
   </configsection>
  </configtab>
 
index 5ba80b9..0b20303 100644 (file)
@@ -287,13 +287,11 @@ class IMP_Dimp
      */
     static public function menuList()
     {
-        if (isset($GLOBALS['conf']['dimp']['menu']['apps'])) {
-            $apps = $GLOBALS['conf']['dimp']['menu']['apps'];
-            if (is_array($apps) && count($apps)) {
-                return $apps;
-            }
-        }
-        return array();
+        return (isset($GLOBALS['conf']['menu']['apps']) &&
+                is_array($GLOBALS['conf']['menu']['apps']) &&
+                count($GLOBALS['conf']['menu']['apps']))
+            ? $GLOBALS['conf']['menu']['apps']
+            : array();
     }
 
     /**