summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-12 11:56:30 +0300
committerAndrew Dolgov <[email protected]>2010-11-12 11:56:30 +0300
commit8f7c631ed8f3bf4f0938d412af55a4b0d5ea4995 (patch)
tree67182ab7df35d6672092f548afc8a31be40f1a8c /functions.php
parent47fb32b06d29827f87fb06f51cc1bf5e21688187 (diff)
viewfeed: show dashboard contents when there are no headlines to display
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php26
1 files changed, 25 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index fc0f4c1e0..7bfb40277 100644
--- a/functions.php
+++ b/functions.php
@@ -5536,7 +5536,31 @@
}
}
- if (!$offset) print "<div class='whiteBox'>$message</div>";
+ if (!$offset && $message) {
+ print "<div class='whiteBox'>$message";
+
+ print "<p class=\"small\"><span class=\"insensitive\">";
+
+ $result = db_query($link, "SELECT ".SUBSTRING_FOR_DATE."(MAX(last_updated), 1, 19) AS last_updated FROM ttrss_feeds
+ WHERE owner_uid = " . $_SESSION['uid']);
+
+ $last_updated = db_fetch_result($result, 0, "last_updated");
+ $last_updated = make_local_datetime($link, $last_updated, false);
+
+ printf(__("Feeds last updated at %s"), $last_updated);
+
+ $result = db_query($link, "SELECT COUNT(id) AS num_errors
+ FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
+
+ $num_errors = db_fetch_result($result, 0, "num_errors");
+
+ if ($num_errors > 0) {
+ print "<br/>";
+ print "<a class=\"insensitive\" href=\"#\" onclick=\"showFeedsWithErrors()\">".
+ __('Some feeds have update errors (click for details)')."</a>";
+ }
+ print "</span></p></div>";
+ }
}
if (!$offset) {