From: kink Date: Mon, 21 Feb 2005 20:05:04 +0000 (+0000) Subject: Always show Purge link next to Trash, so one doesn't have to reload left_main X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=dea5ef88265d73bc990562a8e80bd0f24571c6ec;p=squirrelmail.git Always show Purge link next to Trash, so one doesn't have to reload left_main to be able to empty the trash. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8890 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/ChangeLog b/ChangeLog index 2127841d..dddc1960 100644 --- a/ChangeLog +++ b/ChangeLog @@ -235,6 +235,7 @@ Version 1.5.1 -- CVS additional values (cc, body, subject etc). - Fixed bug #801060. Removed option for INBOX in filters plugin as source is always INBOX. + - Always show Purge link next to Trash, even when empty. Version 1.5.0 -------------------- diff --git a/src/left_main.php b/src/left_main.php index 99121dee..d2211729 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -90,18 +90,12 @@ function formatMailboxName($imapConnection, $box_array) { $line .= " $unseen_string"; } - /* 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\n" . - '  ['._("Purge").']' . - ''; - } + $urlMailbox = urlencode($real_box); + $line .= "\n\n" . + '  ['._("Purge").']' . + ''; } @@ -394,10 +388,10 @@ function ListBoxes ($boxes, $j=0 ) { if ($unseen_found) { $end .= " $unseen_string"; } - $end .= "\n\n" . - '  ['._("Purge").']'. - ''; } + $end .= "\n\n" . + '  ['._("Purge").']'. + ''; } else { if (!$boxes->is_noselect) { if ($unseen > 0) { @@ -513,16 +507,11 @@ function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) { } if (($move_to_trash) && ($mailbox == $trash_folder)) { - if (! isset($numMessages)) { - $numMessages = $boxes->total; - } $pre = "" . $pre; $end .= ''; - if ($numMessages > 0) { - $end .= "\n\n" . - '  ['._("Purge").']'. - ''; - } + $end .= "\n\n" . + '  ['._("Purge").']'. + ''; } else { if (!$boxes->is_noselect) { /* \Noselect boxes can't be selected */ $pre = "" . $pre;