summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/move_del.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-17 12:24:09 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-17 12:24:09 +0000
commit02eece808fde87eac07f8bcbad1ee278cb91514e (patch)
tree221a385a7b4d5a01cec3d33543e7a85e6d093db3 /roundcubemail/program/steps/mail/move_del.inc
parent7a2493bf23f7271f5ea4b9e8fd205e13014c5ca6 (diff)
Merged devel-threads branch (r3066:3364) back into trunk
git-svn-id: https://svn.roundcube.net/trunk@3367 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/move_del.inc')
-rw-r--r--roundcubemail/program/steps/mail/move_del.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/move_del.inc b/roundcubemail/program/steps/mail/move_del.inc
index b8bd16557..f884a781e 100644
--- a/roundcubemail/program/steps/mail/move_del.inc
+++ b/roundcubemail/program/steps/mail/move_del.inc
@@ -24,7 +24,7 @@ if (!$OUTPUT->ajax_call)
return;
// count messages before changing anything
-$old_count = $IMAP->messagecount();
+$old_count = $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL');
$old_pages = ceil($old_count / $IMAP->page_size);
// move messages
@@ -50,6 +50,7 @@ if ($RCMAIL->action=='moveto' && !empty($_POST['_uid']) && !empty($_POST['_targe
else if ($RCMAIL->action=='delete' && !empty($_POST['_uid'])) {
$count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST))));
$mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
+
$del = $IMAP->delete_message($uids, $mbox);
if (!$del) {
@@ -82,7 +83,7 @@ if ($_POST['_from'] == 'show')
}
else
{
- $msg_count = $IMAP->messagecount();
+ $msg_count = $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL');
$pages = ceil($msg_count / $IMAP->page_size);
$nextpage_count = $old_count - $IMAP->page_size * $IMAP->list_page;
$remaining = $msg_count - $IMAP->page_size * ($IMAP->list_page - 1);
@@ -116,8 +117,11 @@ else
$OUTPUT->command('set_quota', rcmail_quota_content());
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count));
+ if ($IMAP->threading)
+ $count = get_input_value('_count', RCUBE_INPUT_POST);
+
// add new rows from next page (if any)
- if ($addrows && ($jump_back || $nextpage_count > 0)) {
+ if ($addrows && $count && ($jump_back || $nextpage_count > 0)) {
$sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col'];
$sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order'];