/** Parse the incoming mailbox name and return a string that is the FOLDER.MAILBOX **/
function findMailboxName($mailbox) {
$mailbox = trim($mailbox);
-// if (substr($mailbox, strlen($mailbox)-1, strlen($mailbox)) == "\"") {
-// $mailbox = substr($mailbox, 0, strlen($mailbox) - 1);
-// $pos = strrpos($mailbox, "\"") + 1;
-// $box = substr($mailbox, $pos, strlen($mailbox));
-// } else {
+ if (substr($mailbox, strlen($mailbox)-1, strlen($mailbox)) == "\"") {
+ $mailbox = substr($mailbox, 0, strlen($mailbox) - 1);
+ $pos = strrpos($mailbox, "\"") + 1;
+ $box = substr($mailbox, $pos, strlen($mailbox));
+ } else {
$box = substr($mailbox, strrpos($mailbox, " ")+1, strlen($mailbox));
-// }
+ }
return $box;
}
function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $color, $move_to_trash) {
require ("../config/config.php");
- $mailboxURL = urlencode($mailbox);
+ $mailboxURL = urlencode($real_box);
selectMailbox($imapConnection, $real_box, $numNessages);
$unseen = unseenMessages($imapConnection, $numUnseen);
/** If it was a successful login, lets load their preferences **/
include("../src/load_prefs.php");
- if (isset($left_refresh) && ($left_refresh != "None")) {
+ if (isset($left_refresh) && ($left_refresh != "None") && ($left_refresh != "")) {
echo "<META HTTP-EQUIV=\"Expires\" CONTENT=\"Thu, 01 Dec 1994 16:00:00 GMT\">";
echo "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">";
echo "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$left_refresh;URL=left_main.php\">";
echo "</A>)</FONT></CENTER><BR>";
echo "<FONT FACE=\"Arial,Helvetica\">\n";
$delimeter = findMailboxDelimeter($imapConnection);
+
for ($i = 0;$i < count($boxes); $i++) {
$line = "";
$mailbox = $boxes[$i]["FORMATTED"];