summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.js2
-rw-r--r--modules/backend-rpc.php13
-rw-r--r--offline.js4
3 files changed, 15 insertions, 4 deletions
diff --git a/functions.js b/functions.js
index 99345f401..ff6075f11 100644
--- a/functions.js
+++ b/functions.js
@@ -588,8 +588,6 @@ function parse_counters(reply, scheduled_call) {
} */
}
- update_local_sync_data();
-
} catch (e) {
exception_error("parse_counters", e);
}
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 9996f7f41..ff723646c 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -564,6 +564,19 @@
}
}
+
+ /* 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"]."\"/>";
+ }
+
}
}
diff --git a/offline.js b/offline.js
index 770c59d52..c2171d981 100644
--- a/offline.js
+++ b/offline.js
@@ -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('');
}