- 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
echo " <td width=1% bgcolor=$hlt_color align=center><input type=checkbox name=\"msg[$t]\" value=".$msg["ID"]."$checked></TD>\n";
echo " <td width=30% bgcolor=$hlt_color>$italic$bold$flag$senderName$flag_end$bold_end$italic_end</td>\n";
echo " <td nowrap width=1% bgcolor=$hlt_color><center>$bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end</center></td>\n";
echo " <td width=1% bgcolor=$hlt_color align=center><input type=checkbox name=\"msg[$t]\" value=".$msg["ID"]."$checked></TD>\n";
echo " <td width=30% bgcolor=$hlt_color>$italic$bold$flag$senderName$flag_end$bold_end$italic_end</td>\n";
echo " <td nowrap width=1% bgcolor=$hlt_color><center>$bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end</center></td>\n";
- if ($msg["FLAG_ANSWERED"] == true) echo " <td bgcolor=$hlt_color width=1%><b><small>A</small></b></td>";
- elseif (ereg("(1|2)",substr($msg["PRIORITY"],0,1))) echo " <td bgcolor=$hlt_color width=1%><b><small><font color=$color[1]>!</font></small></b></td>";
- else echo " <td bgcolor=$hlt_color width=1%> </td>";
- echo " <td bgcolor=$hlt_color width=%>$bold<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0$search_stuff\">$flag$subject$flag_end</a>$bold_end</td>\n";
+
+ if ($msg["FLAG_ANSWERED"] == true) echo " <td bgcolor=$hlt_color width=1%><b><small>A</small></b></td>\n";
+ elseif (ereg("(1|2)",substr($msg["PRIORITY"],0,1))) echo " <td bgcolor=$hlt_color width=1%><b><small><font color=$color[1]>!</font></small></b></td>\n";
+ else echo " <td bgcolor=$hlt_color width=1%> </td>\n";
+ echo " <td bgcolor=$hlt_color>$bold<a href=\"read_body.php?mailbox=$urlMailbox&passed_id=".$msg["ID"]."&startMessage=$startMessage&show_more=0\">$flag$subject$flag_end</a>$bold_end</td>\n";
echo "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n";
echo " <TR>\n";
echo " <TD ALIGN=left WIDTH=\"99%\">\n";
echo "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n";
echo " <TR>\n";
echo " <TD ALIGN=left WIDTH=\"99%\">\n";
- $urlMailbox = $mailbox;
+ $urlMailbox = urlencode($mailbox);
displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right");
echo " \n";
displayInternalLink ("src/addressbook.php", _("Addresses"), "right");
displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right");
echo " \n";
displayInternalLink ("src/addressbook.php", _("Addresses"), "right");
}
// Wraps text at $wrap characters
}
// Wraps text at $wrap characters
- function wordWrap($passed, $wrap) {
+ function sqWordWrap($passed, $wrap) {
$passed = str_replace(">", ">", $passed);
$passed = str_replace("<", "<", $passed);
$passed = str_replace(">", ">", $passed);
$passed = str_replace("<", "<", $passed);
$line_len = strlen($words[$i])+1;
$line = "";
if (count($words) > 1) {
$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++;
while ($line_len < $wrap) {
$line = "$line$words[$i] ";
$i++;
$line = charset_decode($charset, $line);
if (strlen($line) - 2 >= $wrap_at) {
$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);
}
$line = str_replace(" ", " ", $line);
echo "</TITLE>";
$ishelp = substr(getenv(REQUEST_URI),-8); // If calling help, set left frame to 300
if ($ishelp == "help.php") {
echo "</TITLE>";
$ishelp = substr(getenv(REQUEST_URI),-8); // If calling help, set left frame to 300
if ($ishelp == "help.php") {
- echo "<FRAMESET COLS=\"300, *\" NORESIZE BORDER=0>";
+ echo "<FRAMESET COLS=\"300, *\" NORESIZE=yes BORDER=0>";
} else {
echo "<FRAMESET COLS=\"$left_size, *\" NORESIZE BORDER=0>";
}
} else {
echo "<FRAMESET COLS=\"$left_size, *\" NORESIZE BORDER=0>";
}