From ed3796edefc8266aa2a3a71639a194deceffc3d5 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 10 Sep 2010 14:49:50 +0000
Subject: [PATCH] Fixed a small bug in the nav.php which tries to lookup a
 custom module config file even if no module is selected and  enabled the
 dashboard module for the admin user by default after installation.

---
 install/sql/ispconfig3.sql | 2 +-
 interface/web/nav.php      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 906177cc32..3394449bc7 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -1328,7 +1328,7 @@ INSERT INTO `sys_ini` (`sysini_id`, `config`) VALUES (1, '');
 -- Dumping data for table `sys_user`
 -- 
 
-INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,client,mail,monitor,sites,dns,tools,help', 'mail', 'default', 'admin', 1, 'en', '1,2', 1, 0);
+INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'dashboard,admin,client,mail,monitor,sites,dns,tools,help', 'dashboard', 'default', 'admin', 1, 'en', '1,2', 1, 0);
 
 -- --------------------------------------------------------
 
diff --git a/interface/web/nav.php b/interface/web/nav.php
index 89b2f560af..d563bb5348 100644
--- a/interface/web/nav.php
+++ b/interface/web/nav.php
@@ -80,7 +80,7 @@ if(isset($_GET['nav']) && $_GET['nav'] == 'top') {
 //** Side Naviation
 if(isset($_GET['nav']) && $_GET['nav'] == 'side') {
 
-	if(is_file($_SESSION['s']['module']['name'].'/lib/custom_menu.inc.php')) {
+	if(isset($_SESSION['s']['module']['name']) && is_file($_SESSION['s']['module']['name'].'/lib/custom_menu.inc.php')) {
 		include_once($_SESSION['s']['module']['name'].'/lib/custom_menu.inc.php');
 	} else {
 	
-- 
GitLab