From 7f4f9f4e8230683a5a2cd8656914745881308728 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 7 Feb 2009 15:00:03 +0300 Subject: [PATCH] offline: try to download status of articles which were marked as read in online while offline client was disconnected --- functions.js | 2 -- modules/backend-rpc.php | 13 +++++++++++++ offline.js | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/functions.js b/functions.js index 99345f40..ff6075f1 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 9996f7f4..ff723646 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 ""; + } + } } diff --git a/offline.js b/offline.js index 770c59d5..c2171d98 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(''); } -- 2.39.5