summaryrefslogtreecommitdiff
path: root/offline.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-12-29 18:49:27 +0300
committerAndrew Dolgov <[email protected]>2009-12-29 18:49:27 +0300
commitb4e75b2a25d0a30d77b2160c8195835c9816cfe0 (patch)
tree9900c7c8e7ba8d3719ae8d7430866485838169d3 /offline.js
parent12e55b9017fe02824d52ef8639de11356ae2d4d4 (diff)
use POST parameters for frontend requests
Diffstat (limited to 'offline.js')
-rw-r--r--offline.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/offline.js b/offline.js
index f62bd46b9..2650515f1 100644
--- a/offline.js
+++ b/offline.js
@@ -854,7 +854,7 @@ function update_offline_data(stage) {
if (!db || offline_mode || getInitParam("offline_enabled") != "1") return;
- var query = "backend.php?op=rpc&subop=download";
+ var query = "?op=rpc&subop=download";
var rs = db.execute("SELECT MAX(id), MIN(id) FROM articles");
@@ -877,10 +877,10 @@ function update_offline_data(stage) {
var to_sync = prepare_local_sync_data();
if (to_sync != "") {
- to_sync = "?sync=" + param_escape(to_sync);
+ to_sync = "&sync=" + param_escape(to_sync);
}
- debug(query + "/" + to_sync);
+ query = query + to_sync;
var pic = $("offlineModePic");
@@ -896,8 +896,10 @@ function update_offline_data(stage) {
sync_in_progress = true;
- new Ajax.Request(query, {
- parameters: to_sync,
+ debug(query);
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
onComplete: function(transport) {
offline_download_parse(stage, transport);
} });