diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-04-13 17:38:18 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-04-13 17:38:18 +0200 |
commit | a5949991351c70eb462f779368ceb0efbeea14fb (patch) | |
tree | ab27126da02c527665f5cd2a2a393a44c64a533e | |
parent | 056d458ed69ae1ed3db1f1b36dff91dc68b53303 (diff) |
Use POST for refresh/check-recent request
-rw-r--r-- | program/js/app.js | 4 | ||||
-rw-r--r-- | program/steps/mail/check_recent.inc | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/program/js/app.js b/program/js/app.js index a0b953386..2cc14a79e 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2180,7 +2180,7 @@ function rcube_webmail() var lock = this.set_busy(true, 'checkingmail'), params = this.check_recent_params(); - this.http_request('check-recent', params, lock); + this.http_post('check-recent', params, lock); }; // list messages of a specific mailbox using filter @@ -7500,7 +7500,7 @@ function rcube_webmail() this.env.lastrefresh = new Date(); // plugins should bind to 'requestrefresh' event to add own params - this.http_request('refresh', params, lock); + this.http_post('refresh', params, lock); }; // returns check-recent request parameters diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc index 8b2ebf097..cfdcda605 100644 --- a/program/steps/mail/check_recent.inc +++ b/program/steps/mail/check_recent.inc @@ -21,7 +21,7 @@ // If there's no folder or messages list, there's nothing to update // This can happen on 'refresh' request -if (empty($_REQUEST['_folderlist']) && empty($_REQUEST['_list'])) { +if (empty($_POST['_folderlist']) && empty($_POST['_list'])) { return; } @@ -30,8 +30,9 @@ $current = $RCMAIL->storage->get_folder(); $check_all = $RCMAIL->action != 'refresh' || (bool)$RCMAIL->config->get('check_all_folders'); $search_request = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC); -if ($search_request && $_SESSION['search_request'] != $search_request) +if ($search_request && $_SESSION['search_request'] != $search_request) { $search_request = null; +} // list of folders to check if ($check_all) { @@ -80,14 +81,16 @@ foreach ($a_mailboxes as $mbox_name) { $mbox_name = ''; } - if (!empty($_GET['_quota'])) + if (!empty($_POST['_quota'])) { $OUTPUT->command('set_quota', $RCMAIL->quota_content()); + } $OUTPUT->set_env('exists', $RCMAIL->storage->count($mbox_name, 'EXISTS')); // "No-list" mode, don't get messages - if (empty($_GET['_list'])) + if (empty($_POST['_list'])) { continue; + } // get overall message count; allow caching because rcube_storage::folder_status() // did a refresh but only in list mode |