]> git.wh0rd.org - tt-rss.git/commitdiff
offline: only force stage to 1 when cidt/cidb are present when stage != 0
authorAndrew Dolgov <fox@bah.org.ru>
Sun, 15 Feb 2009 20:44:23 +0000 (23:44 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Sun, 15 Feb 2009 20:44:23 +0000 (23:44 +0300)
offline.js

index 3b3695fabeb864ce4333fac80140bf8a4f0952d0..9933e3d007ee93ff19f9a260505c29649f6116a1 100644 (file)
@@ -841,7 +841,7 @@ function offline_download_parse(stage, transport) {
 function update_offline_data(stage) {
        try {
 
-               if (!stage) stage = 0;
+               if (stage) stage = 0;
 
                if (!db || offline_mode || getInitParam("offline_enabled") != "1") return;
 
@@ -858,7 +858,7 @@ function update_offline_data(stage) {
                        query = query + "&cidt=" + offline_dl_max_id;
                        query = query + "&cidb=" + offline_dl_min_id;
 
-                       stage = 1;
+                       if (stage > 1) stage = 1;
                }
 
                rs.close();