From 0238b662ac2bea7f79e2cb1c66b2ccaff72284b8 Mon Sep 17 00:00:00 2001 From: floam Date: Wed, 2 Nov 2005 07:35:58 +0000 Subject: lots of changes git-svn-id: svn://svn.icculus.org/quake3/trunk@224 edf5b092-35ff-0310-97b2-ce42778d08ea --- web/include/thebrain.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'web/include/thebrain.php') diff --git a/web/include/thebrain.php b/web/include/thebrain.php index eb36a73..0baf3d0 100644 --- a/web/include/thebrain.php +++ b/web/include/thebrain.php @@ -6,12 +6,14 @@ $navlist = array( ); function include_safe($file) { - if (strpos(realpath("include/$file"), realpath($_SERVER['DOCUMENT_ROOT'])) !== 0) { - $code = 403; - require("errors.php"); - } - elseif (file_exists("include/$file")) { - include($file); + if (file_exists("include/$file")) { + if (strpos(realpath("include/$file"), realpath($_SERVER['DOCUMENT_ROOT'])) !== 0) { + $code = 403; + require("errors.php"); + } + else { + include($file); + } } else { $code = 404; @@ -24,5 +26,5 @@ if (!$_GET['page']) { } else { $page = $_GET['page']; - +} ?> -- cgit v1.2.3