fixed a problem with mailboxes not url encoded for the urls <grin>.
authornehresma <nehresma@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 23 Nov 1999 00:59:58 +0000 (00:59 +0000)
committernehresma <nehresma@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 23 Nov 1999 00:59:58 +0000 (00:59 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@19 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php3
src/right_main.php3

index ef78d7b..c970dfa 100644 (file)
       echo "NextGroup: $nextGroup -- ";
       echo "PrevGroup: $prevGroup<BR>";
 
+      $urlMailbox = urlencode($mailbox);
+
       if (($nextGroup <= $numMessages) && ($prevGroup >= 0)) {
-         echo "<A HREF=\"right_main.php3?sort=$sort&startMessage=$nextGroup&mailbox=$mailbox\" TARGET=\"right\">Next</A>\n";
-         echo "<A HREF=\"right_main.php3?sort=$sort&startMessage=$prevGroup&mailbox=$mailbox\" TARGET=\"right\">Previous</A>\n";
+         echo "<A HREF=\"right_main.php3?sort=$sort&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">Next</A>\n";
+         echo "<A HREF=\"right_main.php3?sort=$sort&startMessage=$prevGroup&mailbox=$urlMailbox\" TARGET=\"right\">Previous</A>\n";
       }
       else if (($nextGroup > $numMessages) && ($prevGroup >= 0)) {
-         echo "<A HREF=\"right_main.php3?sort=$sort&startMessage=$prevGroup&mailbox=$mailbox\" TARGET=\"right\">Previous</A>\n";
+         echo "<A HREF=\"right_main.php3?sort=$sort&startMessage=$prevGroup&mailbox=$urlMailbox\" TARGET=\"right\">Previous</A>\n";
       }
       else if (($nextGroup <= $numMessages) && ($prevGroup < 0)) {
-         echo "<A HREF=\"right_main.php3?sort=$sort&startMessage=$nextGroup&mailbox=$mailbox\" TARGET=\"right\">Next</A>\n";
+         echo "<A HREF=\"right_main.php3?sort=$sort&startMessage=$nextGroup&mailbox=$urlMailbox\" TARGET=\"right\">Next</A>\n";
       }
 
       /** This is the beginning of the message list table.  It wraps around all messages */
       echo "   <TD WIDTH=25%><FONT FACE=\"Arial,Helvetica\"><B>From</B></FONT></TD>";
       echo "   <TD WIDTH=15%><FONT FACE=\"Arial,Helvetica\"><B>Date</B></FONT>";
       if ($sort == 0)
-         echo "   <A HREF=\"right_main.php3?sort=1&startMessage=1&mailbox=$mailbox\" TARGET=\"right\"><IMG SRC=\"../images/up_pointer.gif\" BORDER=0></A></TD>\n";
+         echo "   <A HREF=\"right_main.php3?sort=1&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/up_pointer.gif\" BORDER=0></A></TD>\n";
       else
-         echo "   <A HREF=\"right_main.php3?sort=0&startMessage=1&mailbox=$mailbox\" TARGET=\"right\"><IMG SRC=\"../images/down_pointer.gif\" BORDER=0></A></TD>\n";
+         echo "   <A HREF=\"right_main.php3?sort=0&startMessage=1&mailbox=$urlMailbox\" TARGET=\"right\"><IMG SRC=\"../images/down_pointer.gif\" BORDER=0></A></TD>\n";
       echo "   <TD WIDTH=*><FONT FACE=\"Arial,Helvetica\"><B>Subject</B></FONT></TD>\n";
       echo "</TR>";
 
       echo "</TABLE>\n";
       echo "</TD></TR></TABLE>"; /** End of message-list table */
    }
-?>
\ No newline at end of file
+?>
index 7e16f0b..32715d6 100644 (file)
       exit;
    }
 
-
    // switch to the mailbox, and get the number of messages in it.
    selectMailbox($imapConnection, $mailbox, $numMessages);
-//   $numMessages = $numMessages - 1;  // I did this so it's 0 based like the message array
-
-   // make a URL safe $mailbox for use in the links
-   $urlMailbox = urlencode($mailbox);
 
    // Display the header at the top of the page
    displayPageHeader($mailbox);