summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/functions.php43
1 files changed, 4 insertions, 39 deletions
diff --git a/include/functions.php b/include/functions.php
index 060a8a3aa..c32d31f6d 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1075,18 +1075,13 @@
}
}
- function getAllCounters($link, $omode = "flc", $active_feed = false) {
-
- if (!$omode) $omode = "flc";
-
+ function getAllCounters($link) {
$data = getGlobalCounters($link);
$data = array_merge($data, getVirtCounters($link));
-
- if (strchr($omode, "l")) $data = array_merge($data, getLabelCounters($link));
- if (strchr($omode, "f")) $data = array_merge($data, getFeedCounters($link, $active_feed));
- if (strchr($omode, "t")) $data = array_merge($data, getTagCounters($link));
- if (strchr($omode, "c")) $data = array_merge($data, getCategoryCounters($link));
+ $data = array_merge($data, getLabelCounters($link));
+ $data = array_merge($data, getFeedCounters($link, $active_feed));
+ $data = array_merge($data, getCategoryCounters($link));
return $data;
}
@@ -1374,36 +1369,6 @@
return $ret_arr;
}
- function getTagCounters($link) {
-
- $ret_arr = array();
-
- $result = db_query($link, "SELECT tag_name,SUM((SELECT COUNT(int_id)
- FROM ttrss_user_entries,ttrss_entries WHERE int_id = post_int_id
- AND ref_id = id AND unread = true)) AS count FROM ttrss_tags
- WHERE owner_uid = ".$_SESSION['uid']." GROUP BY tag_name
- ORDER BY count DESC LIMIT 55");
-
- $tags = array();
-
- while ($line = db_fetch_assoc($result)) {
- $tags[$line["tag_name"]] += $line["count"];
- }
-
- foreach (array_keys($tags) as $tag) {
- $unread = $tags[$tag];
- $tag = htmlspecialchars($tag);
-
- $cv = array("id" => $tag,
- "kind" => "tag",
- "counter" => $unread);
-
- array_push($ret_arr, $cv);
- }
-
- return $ret_arr;
- }
-
function getVirtCounters($link) {
$ret_arr = array();