summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index ff6011e8d..08e71b9d9 100644
--- a/functions.php
+++ b/functions.php
@@ -1996,6 +1996,13 @@
}
}
+ function bool_to_sql_bool($s) {
+ if ($s) {
+ return "true";
+ } else {
+ return "false";
+ }
+ }
function toggleEvenOdd($a) {
if ($a == "even")
@@ -2958,6 +2965,9 @@
print "<param key=\"hide_read_feeds\" value=\"" .
(int) get_pref($link, "HIDE_READ_FEEDS") . "\"/>";
+ print "<param key=\"enable_feed_cats\" value=\"" .
+ (int) get_pref($link, "ENABLE_FEED_CATS") . "\"/>";
+
print "<param key=\"feeds_sort_by_unread\" value=\"" .
(int) get_pref($link, "FEEDS_SORT_BY_UNREAD") . "\"/>";
@@ -3003,12 +3013,28 @@
print "<param key=\"sync_counters\" value=\"1\"/>";
+ $result = db_query($link, "SELECT COUNT(*) AS cf FROM
+ ttrss_feeds WHERE owner_uid = " . $_SESSION["uid"]);
+
+ $num_feeds = db_fetch_result($result, 0, "cf");
+
+ print "<param key=\"num_feeds\" value=\"".
+ (int)$num_feeds. "\"/>";
+
print "</init-params>";
}
function print_runtime_info($link) {
print "<runtime-info>";
+ $result = db_query($link, "SELECT COUNT(*) AS cf FROM
+ ttrss_feeds WHERE owner_uid = " . $_SESSION["uid"]);
+
+ $num_feeds = db_fetch_result($result, 0, "cf");
+
+ print "<param key=\"num_feeds\" value=\"".
+ (int)$num_feeds. "\"/>";
+
if (ENABLE_UPDATE_DAEMON) {
print "<param key=\"daemon_is_running\" value=\"".
sprintf("%d", file_is_locked("update_daemon.lock")) . "\"/>";