ソースを参照

fixed some more warning messages

Luke Ehresman 24 年 前
コミット
63bb5ec59c
3 ファイル変更12 行追加8 行削除
  1. 4 1
      functions/date.php
  2. 1 0
      functions/i18n.php
  3. 7 7
      functions/imap_mailbox.php

+ 4 - 1
functions/date.php

@@ -124,7 +124,10 @@
          return getGMTSeconds(strtotime($string), $dateParts[4]);
       }
       $string = $dateParts[0] . " " . $dateParts[1] . " " . $dateParts[2] . " " . $dateParts[3] . " " . $dateParts[4];
-      return getGMTSeconds(strtotime($string), $dateParts[5]);
+	  if (isset($dateParts[5]))
+      	return getGMTSeconds(strtotime($string), $dateParts[5]);
+	  else 
+	  	return getGMTSeconds(strtotime($string), "");
    }
 
    // I use this function for profiling. Should never be called in

+ 1 - 0
functions/i18n.php

@@ -13,6 +13,7 @@
  **/
 
    $i18n_php = true;
+   if (! isset($squirrelmail_language)) { $squirrelmail_language = ""; }
 
    // This array specifies the available languages.
    $languages["en"]["NAME"]    = "English";

+ 7 - 7
functions/imap_mailbox.php

@@ -245,7 +245,7 @@
       for ($i = 0; $i < count($boxes); $i++) {
          if (strtolower($boxes[$i]["unformatted"]) == "inbox") {
             $boxesnew[] = $boxes[$i];
-            $boxes[$i]["used"] = true;
+            $used[$i] = true;
             $i = count($boxes);
          }
       }
@@ -258,22 +258,22 @@
 	        eregi("^" . quotemeta($trash_folder) . "(" .
 		quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) {
                $boxesnew[] = $boxes[$i];
-               $boxes[$i]["used"] = true;
+               $used[$i] = true;
             }
             elseif ($move_to_sent &&
 	        eregi("^" . quotemeta($sent_folder) . "(" .
 		quotemeta($dm) . ".*)?$", $boxes[$i]["unformatted"])) {
                $boxesnew[] = $boxes[$i];
-               $boxes[$i]["used"] = true;
+               $used[$i] = true;
             }
          }
 
          // Put INBOX.* folders ahead of the rest
          for ($i = 0; $i < count($boxes); $i++) {
             if (eregi("^inbox\.", $boxes[$i]["unformatted"]) &&
-                (!isset($boxes[$i]["used"]) || $boxes[$i]["used"] == false)) {
+                (!isset($used[$i]) || $used[$i] == false)) {
                $boxesnew[] = $boxes[$i];
-               $boxes[$i]["used"] = true;
+               $used[$i] = true;
             }
          }
 
@@ -282,9 +282,9 @@
       // Rest of the folders
       for ($i = 0; $i < count($boxes); $i++) {
          if ((strtolower($boxes[$i]["unformatted"]) != "inbox") &&
-             ($boxes[$i]["used"] == false))  {
+             (!isset($used[$i]) || $used[$i] == false))  {
             $boxesnew[] = $boxes[$i];
-            $boxes[$i]["used"] = true;
+            $used[$i] = true;
          }
       }