From 0868c2e841739baf1054a3b332245d3ec29251e6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 6 Aug 2015 09:25:15 +0200 Subject: [PATCH] Make sure list page is never set to 0 (#1490458) This should fix the issue where after message move wrong message was added to the list and the list counter was invalid. --- program/lib/Roundcube/rcube_imap.php | 1 - program/lib/Roundcube/rcube_storage.php | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 9a4843d91..b8230a7d4 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -57,7 +57,6 @@ class rcube_imap extends rcube_storage protected $icache = array(); protected $plugins; - protected $list_page = 1; protected $delimiter; protected $namespace; protected $sort_field = ''; diff --git a/program/lib/Roundcube/rcube_storage.php b/program/lib/Roundcube/rcube_storage.php index 1a6c1f3ac..c427f4831 100644 --- a/program/lib/Roundcube/rcube_storage.php +++ b/program/lib/Roundcube/rcube_storage.php @@ -47,6 +47,7 @@ abstract class rcube_storage protected $search_set; protected $options = array('auth_type' => 'check'); protected $page_size = 10; + protected $list_page = 1; protected $threading = false; /** @@ -206,7 +207,9 @@ abstract class rcube_storage */ public function set_page($page) { - $this->list_page = (int) $page; + if ($page = intval($page)) { + $this->list_page = $page; + } } /**