From ceac7a2fb0b1d5bc6b5f9a60060202dd8ec90c42 Mon Sep 17 00:00:00 2001 From: fidian Date: Tue, 6 Feb 2001 18:30:47 +0000 Subject: [PATCH] * Very minor bugfixes * Removed warnings git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1061 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/i18n.php | 2 +- src/load_prefs.php | 2 ++ src/signout.php | 14 +++++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/functions/i18n.php b/functions/i18n.php index e7a9a8e9..d7b46809 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -763,7 +763,7 @@ if (isset($sm_language) && $use_gettext && $squirrelmail_language != '' && - $languages[$sm_language]['CHARSET']) { + isset($languages[$sm_language]['CHARSET'])) { if ((ini_get('safe_mode') == FALSE) && (getenv('LC_ALL') != $sm_language)) { putenv('LC_ALL=' . $sm_language); } diff --git a/src/load_prefs.php b/src/load_prefs.php index 0380b4de..31389dfc 100644 --- a/src/load_prefs.php +++ b/src/load_prefs.php @@ -19,6 +19,8 @@ include("../functions/plugin.php"); $load_prefs_php = true; + if (!isset($username)) + $username = ''; checkForPrefs($data_dir, $username); $chosen_theme = getPref($data_dir, $username, "chosen_theme"); diff --git a/src/signout.php b/src/signout.php index c3f1f8bc..d77db43b 100644 --- a/src/signout.php +++ b/src/signout.php @@ -13,6 +13,9 @@ session_start(); + if (!isset($strings_php)) + include("../functions/strings.php"); + include ("../src/load_prefs.php"); if (!isset($config_php)) @@ -26,6 +29,14 @@ set_up_language(getPref($data_dir, $username, "language")); + // 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)) + { + ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs); + $base_uri = $regs[1]; + } + do_hook("logout"); setcookie("username", "", 0, $base_uri); setcookie("key", "", 0, $base_uri); @@ -40,7 +51,8 @@ $theme_css); echo "\n"; } - echo "$title - Signout\n"; + + echo "$org_title - Signout\n"; echo "\n"; echo "

"; echo " "; -- 2.25.1