From: Andrew Dolgov Date: Tue, 29 Nov 2005 13:55:53 +0000 (+0100) Subject: smart RPC I/O is now optional, add functionality to getLabelCounters() X-Git-Tag: schema_feature_freeze_for_1.1~32 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=bbc92e50138a85e5584c73af29c664ff8c1217bf;p=tt-rss.git smart RPC I/O is now optional, add functionality to getLabelCounters() --- diff --git a/backend.php b/backend.php index f79d7249..0d59e790 100644 --- a/backend.php +++ b/backend.php @@ -73,7 +73,7 @@ print ""; } - function getTagCounters($link, $smart_mode = true) { + function getTagCounters($link, $smart_mode = SMART_RPC_COUNTERS) { if ($smart_mode) { if (!$_SESSION["tctr_last_value"]) { @@ -119,7 +119,16 @@ } - function getLabelCounters($link) { + function getLabelCounters($link, $smart_mode = SMART_RPC_COUNTERS) { + + if ($smart_mode) { + if (!$_SESSION["lctr_last_value"]) { + $_SESSION["lctr_last_value"] = array(); + } + } + + $old_counters = $_SESSION["lctr_last_value"]; + $lctrs_modified = false; $result = db_query($link, "SELECT count(id) as count FROM ttrss_entries,ttrss_user_entries WHERE marked = true AND ttrss_user_entries.ref_id = ttrss_entries.id AND @@ -145,10 +154,17 @@ $count = db_fetch_result($tmp_result, 0, "count"); - print "