X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmailbox_display.php;h=d35acce3a5ee9848c1f36efb241f0bc68eeed51b;hb=245a6892bf5c780904ef9677f24d624ea17e0749;hp=23c08e1719a29461b14d5b0aafe97759261cb31d;hpb=58da09bd578fce3d20833444e2feb6220f0e4ac5;p=squirrelmail.git
diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php
index 23c08e17..d35acce3 100644
--- a/functions/mailbox_display.php
+++ b/functions/mailbox_display.php
@@ -6,6 +6,7 @@
** This contains functions that display mailbox information, such as the
** table row that has sender, date, subject, etc...
**
+ ** $Id$
**/
$mailbox_display_php = true;
@@ -27,10 +28,46 @@
echo "
\n";
- if ($msg["FLAG_FLAGGED"] == true) { $flag = ""; $flag_end = ""; }
- if ($msg["FLAG_SEEN"] == false) { $bold = ""; $bold_end = ""; }
- if ($mailbox == $sent_folder) { $italic = ""; $italic_end = ""; }
- if ($msg["FLAG_DELETED"]) { $fontstr = ""; $fontstr_end = ""; }
+ if (isset($msg['FLAG_FLAGGED']) && $msg["FLAG_FLAGGED"] == true)
+ {
+ $flag = "";
+ $flag_end = "";
+ }
+ else
+ {
+ $flag = "";
+ $flag_end = "";
+ }
+ if (isset($msg['FLAG_SEEN']) && $msg["FLAG_SEEN"] == false)
+ {
+ $bold = "";
+ $bold_end = "";
+ }
+ else
+ {
+ $bold = "";
+ $bold_end = "";
+ }
+ if ($mailbox == $sent_folder)
+ {
+ $italic = "";
+ $italic_end = "";
+ }
+ else
+ {
+ $italic = "";
+ $italic_end = "";
+ }
+ if (isset($msg['FLAG_DELETED']) && $msg["FLAG_DELETED"])
+ {
+ $fontstr = "";
+ $fontstr_end = "";
+ }
+ else
+ {
+ $fontstr = "";
+ $fontstr_end = "";
+ }
for ($i=0; $i < count($message_highlight_list); $i++) {
if (trim($message_highlight_list[$i]["value"]) != "") {
@@ -46,7 +83,7 @@
}
}
- if (!$hlt_color)
+ if (!isset($hlt_color))
$hlt_color = $color[4];
if ($where && $what) {
@@ -70,12 +107,18 @@
echo " $bold$flag$fontstr".$msg["DATE_STRING"]."$fontstr_end$flag_end$bold_end | \n";
break;
case 4: # subject
- echo " $bold$flag$subject$flag_end$bold_end | \n";
+ echo " $bold";
+ if (! isset($search_stuff))
+ $search_stuff = "";
+ echo "$flag$subject$flag_end$bold_end | \n";
break;
case 5: # flags
$stuff = false;
echo " \n";
- if ($msg["FLAG_ANSWERED"] == true) {
+ if (isset($msg['FLAG_ANSWERED']) &&
+ $msg["FLAG_ANSWERED"] == true) {
echo "A\n";
$stuff = true;
}
@@ -87,7 +130,7 @@
echo "!\n";
$stuff = true;
}
- if ($msg["FLAG_DELETED"]) {
+ if (isset($msg['FLAG_DELETED']) && $msg["FLAG_DELETED"]) {
echo "D\n";
$stuff = true;
}
@@ -186,6 +229,7 @@
} else {
$end = $numMessages;
}
+ if ($end > $numMessages) $end = $numMessages;
while ($j < $end) {
$date[$j] = ereg_replace(" ", " ", $date[$j]);
$tmpdate = explode(" ", trim($date[$j]));
@@ -231,7 +275,8 @@
/* Only ignore messages flagged as deleted if we are using a
* trash folder or auto_expunge */
- if (($move_to_trash || $auto_expunge) && $sort != 6)
+ if (((isset($move_to_trash) && $move_to_trash)
+ || (isset($auto_expunge) && $auto_expunge)) && $sort != 6)
{
/** Find and remove the ones that are deleted */
$i = 0;
@@ -248,6 +293,8 @@
}
$numMessages = $i;
} else {
+ if (! isset($messages))
+ $messages = array();
$msgs = $messages;
}
}
@@ -338,6 +385,8 @@
$More .= "". _("Next") ."\n";
}
+ if (! isset($msg))
+ $msg = "";
mail_message_listing_beginning($imapConnection,
"move_messages.php?msg=$msg&mailbox=$urlMailbox&startMessage=$startMessage",
$mailbox, $sort, $Message, $More, $startMessage);
@@ -367,6 +416,7 @@
else
$i = 1;
reset($msort);
+ $k = 0;
do {
$key = key($msort);
next($msort);
@@ -400,9 +450,9 @@
echo "$More | \n";
if (!$startMessage) $startMessage=1;
if ( $checkall == "1")
- echo "\n" . _("Unselect All") . "\n";
+ echo "\n" . _("Unselect All") . "\n";
else
- echo "\n" . _("Select All") . "\n";
+ echo "\n" . _("Select All") . "\n";
echo " |
";
echo "";
@@ -438,9 +488,9 @@
echo "";
echo "";
@@ -471,7 +521,7 @@
echo " \n";
echo " \n";
echo " \n";
- if (! $move_to_trash && ! $auto_expunge) {
+ if (! $auto_expunge) {
echo " ". _("mailbox") ." \n";
}
echo " ". _("checked messages") ."\n";
|