- 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 0b67db0cf17ffb3a4879e0113cde938adbf31ff4..f8aa4db0bd366a053263ad9f6369c922c92564b0 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";
       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";
    }
 
       echo "</tr>\n";
    }
index 9822e7e7b4ea4bc1d0d7ae2f95ddc9f40f1b58c4..ee5c66524ef17fe94074723d093ab4d913c03d41 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";
       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");
       displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right");
       echo "&nbsp;&nbsp;\n";
       displayInternalLink ("src/addressbook.php", _("Addresses"), "right");
index 9a4bb5c0cf943d0c6cf8e0d6c5c5971693ee2b4d..32bac75d6d32e104659ce2801489991c74206bde 100644 (file)
@@ -45,7 +45,7 @@
    }
 
    // Wraps text at $wrap characters
    }
 
    // Wraps text at $wrap characters
-   function wordWrap($passed, $wrap) {
+   function sqWordWrap($passed, $wrap) {
       $passed = str_replace("&gt;", ">", $passed);
       $passed = str_replace("&lt;", "<", $passed);
 
       $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) {   
       $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(" ", "&nbsp;", $line);
          }
          
          $line = str_replace(" ", "&nbsp;", $line);
index 2831999e267d1267d933b038016c192482bd8f51..dcfaec86dfa90f81a34b9c8d219564ea6bae5a61 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 "</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>";
    }