summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-10-02 06:59:08 +0000
committerthomascube <thomas@roundcube.net>2007-10-02 06:59:08 +0000
commit51e14a1fd9c8d622322e2ddaafa464039dced605 (patch)
tree340efec7c82b3061645095a34a87634403e30caf /program/steps/mail
parent0c3ab1de669f9c5a5af11bca0c7df4d9f06af6c0 (diff)
Fix loading of next messages after moving/deleting (#1484307)
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/move_del.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index acdbf6000..b24fa22a2 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -19,6 +19,10 @@
*/
+// count pages before changing anything
+$old_count = $IMAP->messagecount();
+$old_pages = ceil($old_count / $IMAP->page_size);
+
// move messages
if ($_action=='moveto' && !empty($_POST['_uid']) && !empty($_POST['_target_mbox']))
{
@@ -78,7 +82,7 @@ if ($_action=='moveto' && $target)
$OUTPUT->command('set_quota', $IMAP->get_quota());
// add new rows from next page (if any)
-if ($_POST['_from']!='show' && $pages>1 && $IMAP->list_page < $pages)
+if ($_POST['_from']!='show' && $old_pages>1 && $IMAP->list_page < $old_pages)
{
$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'];