From 283db905a4ee927eee96513dec2054a35264302d Mon Sep 17 00:00:00 2001 From: lkehresman Date: Wed, 31 Jan 2001 02:34:44 +0000 Subject: [PATCH] fixed some more warning messages git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@992 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/date.php | 5 ++++- functions/i18n.php | 1 + functions/imap_mailbox.php | 14 +++++++------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/functions/date.php b/functions/date.php index c258fc94..d814c513 100644 --- a/functions/date.php +++ b/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 diff --git a/functions/i18n.php b/functions/i18n.php index 641d2d72..18a5319c 100644 --- a/functions/i18n.php +++ b/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"; diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index dad18801..5c6f851f 100755 --- a/functions/imap_mailbox.php +++ b/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; } } -- 2.25.1