From 0ded734ab58b1a91766c776e3d94950ccc287aa9 Mon Sep 17 00:00:00 2001
From: cfoe <cfoe@ispconfig3>
Date: Thu, 19 Jul 2012 04:25:09 -0400
Subject: [PATCH] changed menu item generation from users current to all installed themes in the admin module

---
 interface/web/admin/lib/module.conf.php |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/interface/web/admin/lib/module.conf.php b/interface/web/admin/lib/module.conf.php
index 72e4197..3c564d0 100644
--- a/interface/web/admin/lib/module.conf.php
+++ b/interface/web/admin/lib/module.conf.php
@@ -78,6 +78,20 @@
                     'link'	=> 'admin/system_config_edit.php?id=1',
                     'html_id'   => 'interface_config');
 
+//**** Load the settings pages of all installed themes
+$menu_dir = ISPC_WEB_PATH.'/admin/lib/interface.d';
+
+if (is_dir($menu_dir)) {
+    if ($dh = opendir($menu_dir)) {
+        //** Go through all files in the menu dir
+        while (($file = readdir($dh)) !== false) {
+            if ($file != '.' && $file != '..' && substr($file, -9, 9) == '.menu.php') {
+                include_once($menu_dir . '/' . $file);
+            }
+        }
+    }
+}
+
 include_once(ISPC_WEB_PATH.'/tools/lib/interface.d/' . $_SESSION['s']['user']['app_theme'] . '.menu.php');
 
 $module['nav'][] = array(   'title'     => 'Interface',

--
Gitblit v1.9.1