From 5edcbf2e9bfa79ea87a6e420a4c17e8b02997716 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 27 Feb 2021 11:25:07 +0300 Subject: add an option to disable conditional counters --- classes/rpc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes/rpc.php') diff --git a/classes/rpc.php b/classes/rpc.php index ce580c8ca..72e00a8bc 100755 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -121,7 +121,8 @@ class RPC extends Handler_Protected { else $label_ids = array_map("intval", clean($_REQUEST["label_ids"] ?? [])); - $counters = is_array($feed_ids) ? Counters::get_conditional($feed_ids, $label_ids) : Counters::get_all(); + $counters = is_array($feed_ids) && !get_pref(Prefs::DISABLE_CONDITIONAL_COUNTERS) ? + Counters::get_conditional($feed_ids, $label_ids) : Counters::get_all(); $reply = [ 'counters' => $counters, -- cgit v1.2.3