From 487749595710a1cdc423adf56c11bab4537e2641 Mon Sep 17 00:00:00 2001 From: reinerj Date: Fri, 11 Jun 2004 10:36:14 +0000 Subject: [PATCH] fix from Stephen Reindl for open_restrictions error message in setup --- phpgwapi/inc/class.setup_detection.inc.php | 2 +- phpgwapi/inc/functions.inc.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.setup_detection.inc.php b/phpgwapi/inc/class.setup_detection.inc.php index 04644f61d7..040e8177c3 100644 --- a/phpgwapi/inc/class.setup_detection.inc.php +++ b/phpgwapi/inc/class.setup_detection.inc.php @@ -21,7 +21,7 @@ $d = dir(PHPGW_SERVER_ROOT); while($entry=$d->read()) { - if(!ereg('setup',$entry) && is_dir(PHPGW_SERVER_ROOT . '/' . $entry)) + if($entry != ".." && !ereg('setup',$entry) && is_dir(PHPGW_SERVER_ROOT . '/' . $entry)) { $f = PHPGW_SERVER_ROOT . '/' . $entry . '/setup/setup.inc.php'; if (@file_exists ($f)) diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php index 9019f8779a..6ffe9e5da7 100644 --- a/phpgwapi/inc/functions.inc.php +++ b/phpgwapi/inc/functions.inc.php @@ -452,7 +452,10 @@ * Load the app include files if the exists * \*************************************************************************/ /* Then the include file */ - if (! preg_match ("/phpgwapi/i", PHPGW_APP_INC) && file_exists(PHPGW_APP_INC . '/functions.inc.php') && !isset($_GET['menuaction'])) + if (PHPGW_APP_INC != "" && + ! preg_match ("/phpgwapi/i", PHPGW_APP_INC) && + file_exists(PHPGW_APP_INC . '/functions.inc.php') && + !isset($_GET['menuaction'])) { include(PHPGW_APP_INC . '/functions.inc.php'); }