diff options
author | Andrew Dolgov <[email protected]> | 2009-02-11 15:48:03 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-02-11 15:48:03 +0300 |
commit | e8080ee95c9351300587544dc63e5110d478fb5b (patch) | |
tree | 44f7b884848e7b2992dbd48cb5e507c059d3c71b /offline.js | |
parent | 048701937d52423fc4218652597d321153acd72c (diff) |
offline: download process fixes
Diffstat (limited to 'offline.js')
-rw-r--r-- | offline.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/offline.js b/offline.js index 4b2114560..7ffbc39fa 100644 --- a/offline.js +++ b/offline.js @@ -760,12 +760,10 @@ function update_offline_data(stage) { if (!stage) stage = 0; if (!db || offline_mode || getInitParam("offline_enabled") != "1") return; - debug("update_offline_data: stage " + stage); - // notify_progress("Updating offline data... (" + stage +")", true); - var query = "backend.php?op=rpc&subop=download&stage=" + stage; - + var query = "backend.php?op=rpc&subop=download"; + var rs = db.execute("SELECT MAX(id), MIN(id) FROM articles"); if (rs.isValidRow() && rs.field(0)) { @@ -774,10 +772,16 @@ function update_offline_data(stage) { query = query + "&cidt=" + offline_dl_max_id; query = query + "&cidb=" + offline_dl_min_id; + + stage = 1; } rs.close(); + debug("update_offline_data: stage " + stage); + + query = query + "&stage=" + stage; + var to_sync = prepare_local_sync_data(); if (to_sync != "") { |