diff options
author | Andrew Dolgov <[email protected]> | 2009-02-02 15:24:32 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-02-02 15:24:32 +0300 |
commit | 9b7ecc0ac790c611965e6a2359a06f95b2bbc38c (patch) | |
tree | c728ff9980fbb579e3e991abdd40e41cc5d0ec30 /functions.php | |
parent | 31234407bffa5debe79250e93a4168ea2251e094 (diff) |
update amount of subscribed feeds in runtime-info (to invalidate feedlist cache)
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/functions.php b/functions.php index 523c74944..80488b09f 100644 --- a/functions.php +++ b/functions.php @@ -3002,12 +3002,28 @@ print "<param key=\"sync_counters\" value=\"1\"/>"; + $result = db_query($link, "SELECT COUNT(*) AS cf FROM + ttrss_feeds WHERE owner_uid = " . $_SESSION["uid"]); + + $num_feeds = db_fetch_result($result, 0, "cf"); + + print "<param key=\"num_feeds\" value=\"". + (int)$num_feeds. "\"/>"; + print "</init-params>"; } function print_runtime_info($link) { print "<runtime-info>"; + $result = db_query($link, "SELECT COUNT(*) AS cf FROM + ttrss_feeds WHERE owner_uid = " . $_SESSION["uid"]); + + $num_feeds = db_fetch_result($result, 0, "cf"); + + print "<param key=\"num_feeds\" value=\"". + (int)$num_feeds. "\"/>"; + if (ENABLE_UPDATE_DAEMON) { print "<param key=\"daemon_is_running\" value=\"". sprintf("%d", file_is_locked("update_daemon.lock")) . "\"/>"; |