From d0a177c003a7f1296cfb79fc0df03917c65bb3a8 Mon Sep 17 00:00:00 2001 From: Tom Reijnders Date: Sat, 20 Oct 2012 20:51:22 +0000 Subject: [PATCH] Replaced __DIR__ by dirname(__FILE__) (as __DIR__ needs php > 5.3 git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@455 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641 --- LTI/index.php | 2 +- website_code/php/display_library.php | 4 ++-- website_code/php/login_library.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LTI/index.php b/LTI/index.php index 39f5a2c39f..080f25a649 100644 --- a/LTI/index.php +++ b/LTI/index.php @@ -8,7 +8,7 @@ */ -require_once(__DIR__ . "/../config.php"); +require_once(dirname(__FILE__) . "/../config.php"); _load_language_file("/index.inc"); diff --git a/website_code/php/display_library.php b/website_code/php/display_library.php index 48c6c5359e..e72856ed56 100644 --- a/website_code/php/display_library.php +++ b/website_code/php/display_library.php @@ -3,8 +3,8 @@ require_once('../../../config.php'); -} elseif (file_exists(__DIR__ . '/../../config.php')) { - require_once(__DIR__ . '/../../config.php'); +} elseif (file_exists(dirname(__FILE__) . '/../../config.php')) { + require_once(dirname(__FILE__) . '/../../config.php'); } else { require_once('config.php'); diff --git a/website_code/php/login_library.php b/website_code/php/login_library.php index ad6d83e144..981a164ee0 100644 --- a/website_code/php/login_library.php +++ b/website_code/php/login_library.php @@ -353,7 +353,7 @@ function login_processing2($firstname = false, $surname = false, $username = fal $_SESSION['toolkits_surname'] = $surname == false ? $authmech->getSurname() : $surname; $_SESSION['toolkits_logon_username'] = $username == false ? $authmech->getUsername() : $username; - require_once __DIR__ . '/user_library.php'; + require_once dirname(__FILE__) . '/user_library.php'; /* * Check to see if this is a users' first time on the site