Fix so group/addressbook selection is retained on page refresh

pull/6833/head
Aleksander Machniak 8 years ago
parent 28e3da2325
commit e6132dda95

@ -1,6 +1,8 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Fix so group/addressbook selection is retained on page refresh
RELEASE 1.1.7 RELEASE 1.1.7
------------- -------------
- Fix vulnerability in handling of mail()'s 5th argument - Fix vulnerability in handling of mail()'s 5th argument

@ -4978,6 +4978,9 @@ function rcube_webmail()
url._search = this.env.search_request; url._search = this.env.search_request;
this.http_request(this.env.task == 'mail' ? 'list-contacts' : 'list', url, lock); this.http_request(this.env.task == 'mail' ? 'list-contacts' : 'list', url, lock);
if (this.env.task != 'mail')
this.update_state({_source: src, _page: page && page > 1 ? page : null, _gid: group});
}; };
this.list_contacts_clear = function() this.list_contacts_clear = function()

@ -152,14 +152,18 @@ function rcmail_contact_source($source=null, $init_env=false, $writable=false)
else else
$CONTACTS->set_page(isset($_SESSION['page']) ? $_SESSION['page'] : 1); $CONTACTS->set_page(isset($_SESSION['page']) ? $_SESSION['page'] : 1);
if (!empty($_REQUEST['_gid'])) if (!empty($_REQUEST['_gid'])) {
$CONTACTS->set_group(rcube_utils::get_input_value('_gid', rcube_utils::INPUT_GPC)); $group = rcube_utils::get_input_value('_gid', rcube_utils::INPUT_GPC);
$CONTACTS->set_group($group);
}
if (!$init_env) if (!$init_env) {
return $CONTACTS; return $CONTACTS;
}
$OUTPUT->set_env('readonly', $CONTACTS->readonly); $OUTPUT->set_env('readonly', $CONTACTS->readonly);
$OUTPUT->set_env('source', (string) $source); $OUTPUT->set_env('source', (string) $source);
$OUTPUT->set_env('group', $group);
// reduce/extend $CONTACT_COLTYPES with specification from the current $CONTACT object // reduce/extend $CONTACT_COLTYPES with specification from the current $CONTACT object
if (is_array($CONTACTS->coltypes)) { if (is_array($CONTACTS->coltypes)) {

Loading…
Cancel
Save