$line .= " <small>$unseen_string</small>";
}
- /* If it's the trash folder, show a purge link when needed */
+ /* If it's the trash folder, show a purge link */
if (($move_to_trash) && ($real_box == $trash_folder)) {
- if (! isset($numMessages)) {
- $numMessages = sqimap_get_num_messages($imapConnection, $real_box);
- }
-
- if (($numMessages > 0) or ($box_array['parent'] == 1)) {
- $urlMailbox = urlencode($real_box);
- $line .= "\n<small>\n" .
- ' [<a href="empty_trash.php">'._("Purge").'</a>]' .
- '</small>';
- }
+ $urlMailbox = urlencode($real_box);
+ $line .= "\n<small>\n" .
+ ' [<a href="empty_trash.php">'._("Purge").'</a>]' .
+ '</small>';
}
if ($unseen_found) {
$end .= " <small>$unseen_string</small>";
}
- $end .= "\n<small>\n" .
- ' [<a href="empty_trash.php">'._("Purge").'</a>]'.
- '</small>';
}
+ $end .= "\n<small>\n" .
+ ' [<a href="empty_trash.php">'._("Purge").'</a>]'.
+ '</small>';
} else {
if (!$boxes->is_noselect) {
if ($unseen > 0) {
}
if (($move_to_trash) && ($mailbox == $trash_folder)) {
- if (! isset($numMessages)) {
- $numMessages = $boxes->total;
- }
$pre = "<a class=\"mbx_link\" href=\"right_main.php?PG_SHOWALL=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\">" . $pre;
$end .= '</a>';
- if ($numMessages > 0) {
- $end .= "\n<small>\n" .
- ' [<a class="mbx_link" href="empty_trash.php">'._("Purge").'</a>]'.
- '</small>';
- }
+ $end .= "\n<small>\n" .
+ ' [<a class="mbx_link" href="empty_trash.php">'._("Purge").'</a>]'.
+ '</small>';
} else {
if (!$boxes->is_noselect) { /* \Noselect boxes can't be selected */
$pre = "<a class=\"mbx_link\" href=\"right_main.php?PG_SHOWALL=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\">" . $pre;
if ( !sqimap_mailbox_exists($imapConnection, $folder)) {
sqimap_mailbox_create($imapConnection, $folder, '');
} else {
- //if (!sqimap_mailbox_is_subscribed($imapConnection, $folder)) {
- // check for subscription is useless and expensive just
- // surpress the NO response
- sqimap_subscribe($imapConnection, $folder, false);
+ // check for subscription is useless and expensive, just
+ // surpress the NO response. Unless we're on Mecury, which
+ // will just subscribe a folder again if it's already
+ // subscribed.
+ if ( strtolower($imap_server_type) != 'mercury32' ||
+ !sqimap_mailbox_is_subscribed($imapConnection, $folder) ) {
+ sqimap_subscribe($imapConnection, $folder, false);
+ }
}
}
}
}
$clk = str_replace(' ',' ',$clk);
- echo '<small>' . str_replace(' ',' ',_("Last Refresh")) .
- ":<br />$clk</small><br />";
+ echo '<small><span style="white-space: nowrap;">'
+ . str_replace(' ', ' ', _("Last Refresh"))
+ . ":</span><br /><span style=\"white-space: nowrap;\">$clk</span></small><br />";
}
/* Next, display the refresh button. */