]> git.wh0rd.org - tt-rss.git/commitdiff
offline: try to download status of articles which were marked as read in online while...
authorAndrew Dolgov <fox@bah.org.ru>
Sat, 7 Feb 2009 12:00:03 +0000 (15:00 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Sat, 7 Feb 2009 12:00:03 +0000 (15:00 +0300)
functions.js
modules/backend-rpc.php
offline.js

index 99345f401fd860281284cdd376659f5638075ade..ff6075f11ecfa113f1d93ba659f56fb3b256b64e 100644 (file)
@@ -588,8 +588,6 @@ function parse_counters(reply, scheduled_call) {
                        } */
                }
 
-               update_local_sync_data();
-
        } catch (e) {
                exception_error("parse_counters", e);
        }
index 9996f7f4170ba1b2d3a63f03767e1fcbc8a2af4e..ff723646c47123c502e59f1f01277da367013d89 100644 (file)
 
                                                }
                                        }
+
+                                       /* Maybe we need to further update local DB for this client */
+
+                                       $query = "SELECT ref_id,unread FROM ttrss_user_entries
+                                               WHERE last_read >= '$last_online' AND
+                                                               owner_uid = ".$_SESSION["uid"];
+
+                                       $result = db_query($link, $query);
+
+                                       while ($line = db_fetch_assoc($result)) {
+                                               print "<sync-ok id=\"".$line["ref_id"]."\"/>";
+                                       }
+
                                }
                        }
 
index 770c59d52a5896cca119426f7c66ef558cbc2048..c2171d981e01087685c048243ddffd7451ee10ee 100644 (file)
@@ -734,10 +734,10 @@ function offline_download_parse(stage, transport) {
                                                "updated < DATETIME('NOW', 'localtime', '-31 days')");
 
                                }
-
-                               update_local_sync_data();
                        }
 
+                       update_local_sync_data();
+
 //                     notify('');
 
                }