From 3138464abf41c7ce2adba63eaf7e5324feae92ff Mon Sep 17 00:00:00 2001 From: rurban Date: Sat, 6 Nov 2004 16:37:58 +0000 Subject: [PATCH] Without the dir check it might fail for index.php via DirectoyIndex git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4104 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 76651e761..ffec93632 100644 --- a/index.php +++ b/index.php @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once (dirname(__FILE__).'/lib/prepend.php'); -rcs_id('$Id: index.php,v 1.144 2004-05-02 15:10:04 rurban Exp $'); +rcs_id('$Id: index.php,v 1.145 2004-11-06 16:37:58 rurban Exp $'); require_once(dirname(__FILE__).'/lib/IniConfig.php'); IniConfig(dirname(__FILE__)."/config/config.ini"); @@ -51,7 +51,8 @@ IniConfig(dirname(__FILE__)."/config/config.ini"); // If any page is empty, comment the if ... line out, // to force include "lib/main.php". -if (SCRIPT_FILENAME == __FILE__) +// Without the dir check it might fail for index.php via DirectoyIndex +if (@is_dir(SCRIPT_FILENAME) or SCRIPT_FILENAME == __FILE__) include(dirname(__FILE__)."/lib/main.php"); // (c-file-style: "gnu") -- 2.45.0