- fixed bug with word wrapping deleting last word
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 8 Aug 2000 13:54:37 +0000 (13:54 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 8 Aug 2000 13:54:37 +0000 (13:54 +0000)
- 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
functions/page_header.php
functions/strings.php
src/webmail.php

index 0b67db0..f8aa4db 100644 (file)
       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%>&nbsp;</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%>&nbsp;</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 "</tr>\n";
    }
index 9822e7e..ee5c665 100644 (file)
@@ -89,7 +89,7 @@
       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 "&nbsp;&nbsp;\n";
       displayInternalLink ("src/addressbook.php", _("Addresses"), "right");
index 9a4bb5c..32bac75 100644 (file)
@@ -45,7 +45,7 @@
    }
 
    // Wraps text at $wrap characters
-   function wordWrap($passed, $wrap) {
+   function sqWordWrap($passed, $wrap) {
       $passed = str_replace("&gt;", ">", $passed);
       $passed = str_replace("&lt;", "<", $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++;
          $line = charset_decode($charset, $line);
          
          if (strlen($line) - 2 >= $wrap_at) {
-            $line = wordWrap($line, $wrap_at);  
+            $line = sqWordWrap($line, $wrap_at);  
          }
          
          $line = str_replace(" ", "&nbsp;", $line);
index 2831999..dcfaec8 100644 (file)
@@ -64,7 +64,7 @@
    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>";
    }