From 04689fa7ee89c29b57278a354b39d9ee5397a442 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 12 Dec 2012 13:59:08 -0500
Subject: [PATCH] Fix so compacting of non-empty folder is possible also when messages list is empty (#1488858)

---
 program/steps/mail/move_del.inc |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index da43b40..3e22526 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -38,7 +38,7 @@
 
     if (!$moved) {
         // send error message
-	    if ($_POST['_from'] != 'show')
+        if ($_POST['_from'] != 'show')
             $OUTPUT->command('list_mailbox');
         rcmail_display_server_error('errormoving');
         $OUTPUT->send();
@@ -59,7 +59,7 @@
 
     if (!$del) {
         // send error message
-	    if ($_POST['_from'] != 'show')
+        if ($_POST['_from'] != 'show')
             $OUTPUT->command('list_mailbox');
         rcmail_display_server_error('errordeleting');
         $OUTPUT->send();
@@ -111,6 +111,7 @@
   $OUTPUT->set_env('messagecount', $msg_count);
   $OUTPUT->set_env('current_page', $page);
   $OUTPUT->set_env('pagecount', $pages);
+  $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox, 'EXISTS', true));
 
   // update mailboxlist
   $mbox = $RCMAIL->storage->get_folder();
@@ -144,5 +145,3 @@
 
 // send response
 $OUTPUT->send();
-
-

--
Gitblit v1.9.1