summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-08-25 08:38:18 +0100
committerAndrew Dolgov <[email protected]>2007-08-25 08:38:18 +0100
commit4ffa126ec3a9cbe06c7bec710f04da47476ed8ad (patch)
treebe7c8efe0725265069c74d4f840aa36e83cff15e /functions.php
parentc2f8aac43133e8c7e2ca09891e641b9e3e98c3f8 (diff)
update title of active feed in feedlist on the fly
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index d12120a63..2aac7f3db 100644
--- a/functions.php
+++ b/functions.php
@@ -1866,7 +1866,7 @@
}
}
- function getAllCounters($link, $omode = "flc") {
+ function getAllCounters($link, $omode = "flc", $active_feed = false) {
/* getLabelCounters($link);
getFeedCounters($link);
getTagCounters($link);
@@ -1880,7 +1880,7 @@
getGlobalCounters($link);
if (strchr($omode, "l")) getLabelCounters($link);
- if (strchr($omode, "f")) getFeedCounters($link);
+ if (strchr($omode, "f")) getFeedCounters($link, SMART_RPC_COUNTERS, $active_feed);
if (strchr($omode, "t")) getTagCounters($link);
if (strchr($omode, "c")) {
if (get_pref($link, 'ENABLE_FEED_CATS')) {
@@ -2268,7 +2268,7 @@
print "<counter type=\"feed\" id=\"$id\" counter=\"$count\" error=\"$last_error\"/>";
} */
- function getFeedCounters($link, $smart_mode = SMART_RPC_COUNTERS) {
+ function getFeedCounters($link, $smart_mode = SMART_RPC_COUNTERS, $active_feed = false) {
$age_qpart = getMaxAgeSubquery();
@@ -2355,7 +2355,13 @@
$has_img_part = "";
}
- print "<counter type=\"feed\" id=\"$id\" counter=\"$count\" $has_img_part $error_part updated=\"$last_updated\"/>";
+ if ($active_feed && $id == $active_feed) {
+ $has_title_part = "title=\"" . htmlspecialchars($line["title"]) . "\"";
+ } else {
+ $has_title_part = "";
+ }
+
+ print "<counter type=\"feed\" id=\"$id\" counter=\"$count\" $has_img_part $error_part updated=\"$last_updated\" $has_title_part/>";
}
}