From d76f6440e2754a3726669f2abf3d6609a1799905 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Tue, 8 Aug 2000 13:54:37 +0000 Subject: [PATCH] - fixed bug with word wrapping deleting last word - renamed wordWrap() to sqWordWrap() Applied patches: - fix html errors in mailbox_display.php - add a urlencode() in page_header.php git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@683 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 9 +++++---- functions/page_header.php | 2 +- functions/strings.php | 6 +++--- src/webmail.php | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 0b67db0c..f8aa4db0 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -50,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"; } diff --git a/functions/page_header.php b/functions/page_header.php index 9822e7e7..ee5c6652 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -89,7 +89,7 @@ echo "\n"; echo " \n"; echo "
\n"; - $urlMailbox = $mailbox; + $urlMailbox = urlencode($mailbox); displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right"); echo "  \n"; displayInternalLink ("src/addressbook.php", _("Addresses"), "right"); diff --git a/functions/strings.php b/functions/strings.php index 9a4bb5c0..32bac75d 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -45,7 +45,7 @@ } // Wraps text at $wrap characters - function wordWrap($passed, $wrap) { + function sqWordWrap($passed, $wrap) { $passed = str_replace(">", ">", $passed); $passed = str_replace("<", "<", $passed); @@ -54,7 +54,7 @@ $line_len = strlen($words[$i])+1; $line = ""; if (count($words) > 1) { - while ($i < count($words)-1) { + while ($i < count($words)) { while ($line_len < $wrap) { $line = "$line$words[$i] "; $i++; @@ -125,7 +125,7 @@ $line = charset_decode($charset, $line); if (strlen($line) - 2 >= $wrap_at) { - $line = wordWrap($line, $wrap_at); + $line = sqWordWrap($line, $wrap_at); } $line = str_replace(" ", " ", $line); diff --git a/src/webmail.php b/src/webmail.php index 2831999e..dcfaec86 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -64,7 +64,7 @@ echo ""; $ishelp = substr(getenv(REQUEST_URI),-8); // If calling help, set left frame to 300 if ($ishelp == "help.php") { - echo ""; + echo ""; } else { echo ""; } -- 2.25.1