[Svn] r3317 - in trunk/roundcubemail: . program/steps/mail

trac at roundcube.net trac at roundcube.net
Thu Mar 4 15:39:47 CET 2010


Author: alec
Date: 2010-03-04 08:39:47 -0600 (Thu, 04 Mar 2010)
New Revision: 3317

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/steps/mail/mark.inc
   trunk/roundcubemail/program/steps/mail/move_del.inc
Log:
- Fix deleting all messages from last list page (#1486293)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2010-03-04 08:17:04 UTC (rev 3316)
+++ trunk/roundcubemail/CHANGELOG	2010-03-04 14:39:47 UTC (rev 3317)
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Fix deleting all messages from last list page (#1486293)
 - Flag original messages when sending a draft (#1486203)
 - Changed signature separator when top-posting (#1486330)
 - Let the admin define defaults for search modifiers (#1485897)

Modified: trunk/roundcubemail/program/steps/mail/mark.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/mark.inc	2010-03-04 08:17:04 UTC (rev 3316)
+++ trunk/roundcubemail/program/steps/mail/mark.inc	2010-03-04 14:39:47 UTC (rev 3317)
@@ -81,7 +81,7 @@
       $remaining      = $msg_count - $IMAP->page_size * ($IMAP->list_page - 1);
 
       // jump back one page (user removed the whole last page)
-      if ($IMAP->list_page > 1 && $nextpage_count <= 0 && $remaining == 0) {
+      if ($IMAP->list_page > 1 && $remaining == 0) {
         $IMAP->set_page($IMAP->list_page-1);
         $_SESSION['page'] = $IMAP->list_page;
         $jump_back = true;
@@ -96,6 +96,7 @@
       $mbox = $IMAP->get_mailbox_name();
       $unseen_count = $msg_count ? $IMAP->messagecount($mbox, 'UNSEEN') : 0;
       $old_unseen = $_SESSION['unseen_count'][$mbox];
+
       if ($old_unseen != $unseen_count) {
         $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX'));
 	$_SESSION['unseen_count'][$mbox] = $unseen_count;
@@ -107,7 +108,8 @@
         $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'];
   
-        $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order, $count);
+        $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order,
+	  $jump_back ? NULL : $count);
       
         rcmail_js_message_list($a_headers, false, false);
       }

Modified: trunk/roundcubemail/program/steps/mail/move_del.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/move_del.inc	2010-03-04 08:17:04 UTC (rev 3316)
+++ trunk/roundcubemail/program/steps/mail/move_del.inc	2010-03-04 14:39:47 UTC (rev 3317)
@@ -88,7 +88,7 @@
   $remaining      = $msg_count - $IMAP->page_size * ($IMAP->list_page - 1);
 
   // jump back one page (user removed the whole last page)
-  if ($IMAP->list_page > 1 && $nextpage_count <= 0 && $remaining == 0) {
+  if ($IMAP->list_page > 1 && $remaining == 0) {
     $IMAP->set_page($IMAP->list_page-1);
     $_SESSION['page'] = $IMAP->list_page;
     $jump_back = true;
@@ -121,7 +121,8 @@
     $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'];
 
-    $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order, $count);
+    $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order,
+      $jump_back ? NULL : $count);
 
     rcmail_js_message_list($a_headers, false, false);
   }

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list