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.
pull/315/head
Aleksander Machniak 9 years ago
parent 72be74508f
commit a04a16c285

@ -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 = '';

@ -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;
/**
@ -219,7 +220,9 @@ abstract class rcube_storage
*/
public function set_page($page)
{
$this->list_page = (int) $page;
if ($page = intval($page)) {
$this->list_page = $page;
}
}

Loading…
Cancel
Save