summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-10-21 16:03:03 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-10-21 16:03:03 +0200
commitb461a2d72ea1fa2f7488710e5c5329848adf43fd (patch)
treecec67c1e1a3dbf9d8d26035aac0f0f70e0326da9 /program/js/app.js
parenta649e0488a8913f73443390703692e96767ab871 (diff)
Send last fetch time with 'refresh' requests and allow plugins to alter query parameters of http requests
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index ac49b4ed5..01707362f 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -463,6 +463,7 @@ function rcube_webmail()
// flag object as complete
this.loaded = true;
+ this.env.lastrefresh = new Date();
// show message
if (this.pending_message)
@@ -6298,7 +6299,7 @@ function rcube_webmail()
if (result === false)
return false;
else
- query = result;
+ url = this.url(action, result);
}
url += '&_remote=1';
@@ -6743,6 +6744,9 @@ function rcube_webmail()
if (this.task == 'mail' && this.gui_objects.mailboxlist)
params = this.check_recent_params();
+ params._last = Math.floor(this.env.lastrefresh.getTime() / 1000);
+ this.env.lastrefresh = new Date();
+
// plugins should bind to 'requestrefresh' event to add own params
this.http_request('refresh', params, lock);
};