From 95b89b5b595d688b54abc98158623ecdea40d330 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 13 Aug 2008 11:14:37 +0000 Subject: Removed page handler default errors git-svn-id: https://code.elgg.org/elgg/trunk@1886 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/pagehandler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/lib/pagehandler.php') diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php index 97357b19f..a2bee1bc5 100644 --- a/engine/lib/pagehandler.php +++ b/engine/lib/pagehandler.php @@ -106,14 +106,14 @@ $script = str_replace("..","",$script); $callpath = $CONFIG->path . $handler . "/" . $page; - if (!@include($callpath)) { - if (substr_count($callpath,'.php') == 0) { + if (!file_exists($callpath) || is_dir($callpath) || substr_count($callpath,'.php') == 0) { if (substr($callpath,strlen($callpath) - 1, 1) != "/") $callpath .= "/"; $callpath .= "index.php"; if (!include($callpath)) return false; - } + } else { + include($callpath); } return true; -- cgit v1.2.3