From f3bc099dbf4aceb595a4b5069c078908f2ee4c9b Mon Sep 17 00:00:00 2001 From: graf25 Date: Sat, 6 Apr 2002 22:44:48 +0000 Subject: [PATCH] A fix for my fix of src/src. Now all basename-deriving code is located in functions/display_messages.php, so only one edit is needed. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2696 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/login.php | 5 ++++- src/redirect.php | 5 ++++- src/signout.php | 5 ++++- src/webmail.php | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/login.php b/src/login.php index 93aa3e37..1ae8bd84 100644 --- a/src/login.php +++ b/src/login.php @@ -69,7 +69,10 @@ set_up_language($squirrelmail_language, TRUE); /** * Find out the base URI to set cookies. */ -$base_uri = dirname(dirname($PHP_SELF)) . "/"; +if (!function_exists('sqm_baseuri')){ + require_once('../functions/display_messages.php'); +} +$base_uri = sqm_baseuri(); @session_destroy(); /* diff --git a/src/redirect.php b/src/redirect.php index 34e8a568..f5eb22e9 100644 --- a/src/redirect.php +++ b/src/redirect.php @@ -36,7 +36,10 @@ if (get_magic_quotes_gpc()) { /* Before starting the session, the base URI must be known. Assuming */ /* that this file is in the src/ subdirectory (or something). */ -$base_uri = dirname(dirname($PHP_SELF)) . "/"; +if (!function_exists('sqm_baseuri')){ + require_once('../functions/display_messages.php'); +} +$base_uri = sqm_baseuri(); header('Pragma: no-cache'); $location = get_location(); diff --git a/src/signout.php b/src/signout.php index 79e21768..d2e46f76 100644 --- a/src/signout.php +++ b/src/signout.php @@ -35,7 +35,10 @@ if (!isset($frame_top)) { /* If a user hits reload on the last page, $base_uri isn't set * because it was deleted with the session. */ if (!isset($base_uri)) { - $base_uri = dirname(dirname($PHP_SELF)) . "/"; + if (!function_exists('sqm_baseuri')){ + require_once('../functions/display_messages.php'); + } + $base_uri = sqm_baseuri(); } do_hook('logout'); diff --git a/src/webmail.php b/src/webmail.php index 72f0c078..51d22bed 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -21,7 +21,10 @@ require_once('../functions/plugin.php'); require_once('../functions/i18n.php'); require_once('../functions/auth.php'); -$base_uri = dirname(dirname($PHP_SELF)) . "/"; +if (!function_exists('sqm_baseuri')){ + require_once('../functions/display_messages.php'); +} +$base_uri = sqm_baseuri(); session_start(); is_logged_in(); -- 2.25.1