From ed30c60150ffda0301eb1f8d30c93cac94de41df Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 25 Jul 2011 10:38:22 -0400
Subject: [PATCH] Fixed some warnings in the installer.

---
 interface/web/designer/form_list.php |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/interface/web/designer/form_list.php b/interface/web/designer/form_list.php
index 5103216..6bd8bc6 100644
--- a/interface/web/designer/form_list.php
+++ b/interface/web/designer/form_list.php
@@ -30,11 +30,8 @@
 require_once('../../lib/config.inc.php');
 require_once('../../lib/app.inc.php');
 
-// Checking permissions for the module
-if(!stristr($_SESSION['s']['user']['modules'],$_SESSION['s']['module']['name'])) {
-	header('Location: ../index.php');
-	exit;
-}
+//* Check permissions for module
+$app->auth->check_module_permissions('designer');
 
 $app->uses('tpl');
 
@@ -59,7 +56,7 @@
 while ($file = @readdir ($handle)) { 
     if ($file != '.' && $file != '..') {
         if(@is_dir(ISPC_WEB_PATH."/$file")) {
-            if(ISPC_WEB_PATH.'/'.$file.'/lib/module.conf.php') and $file != 'login') {
+            if(is_file(ISPC_WEB_PATH.'/'.$file.'/lib/module.conf.php') and $file != 'login') {
 				if(@is_dir(ISPC_WEB_PATH."/$file/form")) {
 					$handle2 = opendir(ISPC_WEB_PATH."/$file/form");
 					while ($form_file = @readdir ($handle2)) {

--
Gitblit v1.9.1