summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-13 21:02:52 +0400
committerAndrew Dolgov <[email protected]>2012-08-13 21:02:52 +0400
commit99c9e91a51a99ab5d8b9ded85ab61ad82cb2a9e7 (patch)
tree842b05353b2aebf21ec4ac5e99b8e5b33dc1dbf0 /include
parent6d8d00e8c0293dbc7c643df21fe56e7d2a601157 (diff)
fix queryFeedHeadlines, rename getCategoryUnreadRecursive
Diffstat (limited to 'include')
-rw-r--r--include/functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php
index 0e2424c58..1116e422c 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1512,7 +1512,7 @@
$line["cat_id"] = (int) $line["cat_id"];
if ($line["num_children"] > 0) {
- $child_counter = getCategoryUnreadRecursive($link, $line["cat_id"], $_SESSION["uid"]);
+ $child_counter = getCategoryChildrenUnread($link, $line["cat_id"], $_SESSION["uid"]);
} else {
$child_counter = 0;
}
@@ -1535,7 +1535,7 @@
}
// only accepts real cats (>= 0)
- function getCategoryUnreadRecursive($link, $cat, $owner_uid = false) {
+ function getCategoryChildrenUnread($link, $cat, $owner_uid = false) {
if (!$owner_uid) $owner_uid = $_SESSION["uid"];
$result = db_query($link, "SELECT id FROM ttrss_feed_categories WHERE parent_cat = '$cat'
@@ -1545,7 +1545,7 @@
while ($line = db_fetch_assoc($result)) {
$unread += getCategoryUnread($link, $line["id"], $owner_uid);
- $unread += getCategoryUnreadRecursive($link, $line["id"], $owner_uid);
+ $unread += getCategoryChildrenUnread($link, $line["id"], $owner_uid);
}
return $unread;
@@ -2333,7 +2333,7 @@
$unread = getFeedUnread($link, $feed, $cat_view);
if ($cat_view && $feed > 0)
- $unread = getCategoryUnreadRecursive($link, $feed);
+ $unread += getCategoryChildrenUnread($link, $feed);
if ($unread > 0) {
$view_query_part = " unread = true AND ";