X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmailbox_display.php;h=8924617f2638878131c3af186b87d1ac828b262a;hb=b93e186d39c7c0350d29b0c476edce2efee04998;hp=ac5ba8e47e86dc2cb2626fb060a7ecbccd31f0e1;hpb=8442ac0819d9e82e8c8bd8ac67f8cabedef9ca3f;p=squirrelmail.git
diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php
index ac5ba8e4..8924617f 100644
--- a/functions/mailbox_display.php
+++ b/functions/mailbox_display.php
@@ -19,7 +19,7 @@
$senderName = sqimap_find_displayable_name($msg["FROM"]);
$urlMailbox = urlencode($mailbox);
- $subject = trim(stripslashes($msg["SUBJECT"]));
+ $subject = trim($msg["SUBJECT"]);
echo "
\n";
if ($msg["FLAG_FLAGGED"] == true) { $flag = ""; $flag_end = " "; }
@@ -27,15 +27,17 @@
if ($mailbox == $sent_folder) { $italic = ""; $italic_end = " "; }
for ($i=0; $i < count($message_highlight_list); $i++) {
- if ($message_highlight_list[$i]["match_type"] == "to_cc") {
- if (eregi($message_highlight_list[$i]["value"],$msg["TO"]) || eregi($message_highlight_list[$i]["value"],$msg["CC"])) {
+ if (trim($message_highlight_list[$i]["value"]) != "") {
+ if ($message_highlight_list[$i]["match_type"] == "to_cc") {
+ if (strpos("^^".strtolower($msg["TO"]), strtolower($message_highlight_list[$i]["value"])) || strpos("^^".strtolower($msg["CC"]), strtolower($message_highlight_list[$i]["value"]))) {
+ $hlt_color = $message_highlight_list[$i]["color"];
+ continue;
+ }
+ } else if (strpos("^^".strtolower($msg[strtoupper($message_highlight_list[$i]["match_type"])]),strtolower($message_highlight_list[$i]["value"]))) {
$hlt_color = $message_highlight_list[$i]["color"];
continue;
- }
- } else if (eregi($message_highlight_list[$i]["value"],$msg[strtoupper($message_highlight_list[$i]["match_type"])])) {
- $hlt_color = $message_highlight_list[$i]["color"];
- continue;
- }
+ }
+ }
}
if (!$hlt_color)
@@ -48,10 +50,11 @@
echo " \n";
echo " $italic$bold$flag$senderName$flag_end$bold_end$italic_end \n";
echo " $bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end \n";
- if ($msg["FLAG_ANSWERED"] == true) echo " A ";
- elseif (ereg("(1|2)",substr($msg["PRIORITY"],0,1))) echo " ! ";
- else echo " ";
- echo " $bold$flag$subject$flag_end $bold_end \n";
+
+ if ($msg["FLAG_ANSWERED"] == true) echo " A \n";
+ elseif (ereg("(1|2)",substr($msg["PRIORITY"],0,1))) echo " ! \n";
+ else echo " \n";
+ echo " $bold$flag$subject$flag_end $bold_end \n";
echo " \n";
}
@@ -182,7 +185,6 @@
} else {
$endMessage = $numMessages;
}
-
if ($endMessage < $startMessage) {
$startMessage = $startMessage - $show_num;
@@ -295,7 +297,7 @@
if ($numMessages == 0) { // if there's no messages in this folder
echo "". _("THIS FOLDER IS EMPTY") ." ";
} else if ($startMessage == $endMessage) { // if there's only one message in the box, handle it different.
- $i = $startMessage - 1;
+ $i = $startMessage;
reset($msort);
do {
$key = key($msort);