X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=www%2Findex.php;fp=www%2Findex.php;h=64b403d2309dbbcbdb1f790938e71dd8a80d27ab;hb=4adf3d2450a0fbcd4ec1aa5a5c78afb2088847f3;hp=ae8b5a11318131c5014732bdcf734fe398ec7e76;hpb=009c426bb2c9a34e5e7d7527242536da3bea7aaa;p=readifood.git diff --git a/www/index.php b/www/index.php index ae8b5a1..64b403d 100644 --- a/www/index.php +++ b/www/index.php @@ -8,10 +8,10 @@ $root = join(DIRECTORY_SEPARATOR, array($_SERVER['DOCUMENT_ROOT'], "..")); $propel_root = join(DIRECTORY_SEPARATOR, array($root, "propel")); $lib_root = join(DIRECTORY_SEPARATOR, array($root, "lib")); - require_once "propel/Propel.php"; + require_once(join(DIRECTORY_SEPARATOR, array("propel", "Propel.php"))); Propel::init("$propel_root/build/conf/$propel_project-conf.php"); - set_include_path(join(PATH_SEPARATOR, array("$propel_root/build/classes", get_include_path()))); + set_include_path(join(PATH_SEPARATOR, array(join(DIRECTORY_SEPARATOR, array($propel_root, "build", "classes")), get_include_path()))); $request = preg_replace('!^/branches/[^/]+/!', "", $_SERVER['REQUEST_URI']); $request = preg_replace('!^/+!', "", $request); @@ -30,10 +30,10 @@ $http = (isset($_SERVER['HTTPS'])) ? "https" : "http"; $username = $_SERVER['REMOTE_USER']; - include_once("$lib_root/constants.php"); - include_once("$lib_root/functions.php"); - include_once("$lib_root/session.php"); - include_once("$lib_root/header.php"); + include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "constants.php"))); + include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "functions.php"))); + include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "session.php"))); + include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "header.php"))); $q = new UserQuery; $user = $q->findOneByUsername($username); if (! $q->count()) { @@ -46,10 +46,10 @@ $admin_level = $user->getAdmin(); if ($module) { echo "

$charity $module

\n"; - include_once("$lib_root/$module.php"); + include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "$module.php"))); } - #else include_once("$lib_root/menu.php"); + #else include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "menu.php"))); } - include_once("$lib_root/footer.php"); + include_once(join(DIRECTORY_SEPARATOR, array($lib_root, "footer.php"))); ?>