فهرست منبع

* Very minor bugfixes
* Removed warnings

Tyler Akins 24 سال پیش
والد
کامیت
7d14d61ad7
3فایلهای تغییر یافته به همراه16 افزوده شده و 2 حذف شده
  1. 1 1
      functions/i18n.php
  2. 2 0
      src/load_prefs.php
  3. 13 1
      src/signout.php

+ 1 - 1
functions/i18n.php

@@ -763,7 +763,7 @@
 
 
       if (isset($sm_language) && $use_gettext &&
       if (isset($sm_language) && $use_gettext &&
          $squirrelmail_language != '' &&
          $squirrelmail_language != '' &&
-         $languages[$sm_language]['CHARSET']) {
+	 isset($languages[$sm_language]['CHARSET'])) {
          if ((ini_get('safe_mode') == FALSE) && (getenv('LC_ALL') != $sm_language)) {
          if ((ini_get('safe_mode') == FALSE) && (getenv('LC_ALL') != $sm_language)) {
            putenv('LC_ALL=' . $sm_language);
            putenv('LC_ALL=' . $sm_language);
          }
          }

+ 2 - 0
src/load_prefs.php

@@ -19,6 +19,8 @@
       include("../functions/plugin.php");
       include("../functions/plugin.php");
       
       
    $load_prefs_php = true;
    $load_prefs_php = true;
+   if (!isset($username))
+       $username = '';
    checkForPrefs($data_dir, $username);
    checkForPrefs($data_dir, $username);
 
 
    $chosen_theme = getPref($data_dir, $username, "chosen_theme");
    $chosen_theme = getPref($data_dir, $username, "chosen_theme");

+ 13 - 1
src/signout.php

@@ -13,6 +13,9 @@
 
 
    session_start();
    session_start();
 
 
+   if (!isset($strings_php))
+      include("../functions/strings.php");
+
    include ("../src/load_prefs.php");
    include ("../src/load_prefs.php");
 
 
    if (!isset($config_php))
    if (!isset($config_php))
@@ -26,6 +29,14 @@
 
 
    set_up_language(getPref($data_dir, $username, "language"));
    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");
    do_hook("logout");
    setcookie("username", "", 0, $base_uri);
    setcookie("username", "", 0, $base_uri);
    setcookie("key", "", 0, $base_uri);
    setcookie("key", "", 0, $base_uri);
@@ -40,7 +51,8 @@
                $theme_css);
                $theme_css);
       echo "\n";
       echo "\n";
    }
    }
-   echo "<TITLE>$title - Signout</TITLE>\n";
+   
+   echo "<TITLE>$org_title - Signout</TITLE>\n";
    echo "</HEAD><BODY TEXT=$color[8] BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
    echo "</HEAD><BODY TEXT=$color[8] BGCOLOR=$color[4] LINK=$color[7] VLINK=$color[7] ALINK=$color[7]>\n";
    echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
    echo "<BR><BR><TABLE BGCOLOR=FFFFFF BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
    echo "   <TR BGCOLOR=$color[0] WIDTH=100%>";
    echo "   <TR BGCOLOR=$color[0] WIDTH=100%>";