diff options
author | Andrew Dolgov <[email protected]> | 2010-11-04 19:11:54 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-04 19:11:54 +0300 |
commit | fe1087fbb72959a2da5c71ef405e96c84c94381e (patch) | |
tree | 0baa4d5445ee65a483a796e17ee8c6db839b547c /functions.php | |
parent | 85a922895f2865a658f98a7d0e795aec05da3d06 (diff) |
implement a simple pseudo-dashboard feed; display feeds having update errors there instead of client-based 'no feed selected' whiteBox plug (closes #189)
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/functions.php b/functions.php index 259aaf556..c691039d8 100644 --- a/functions.php +++ b/functions.php @@ -6828,4 +6828,31 @@ return $headlines; } + function generate_dashboard_feed($link) { + print "<headlines id=\"-5\" is_cat=\"\">"; + + print '<![CDATA[<div id="headlinesContainer">'; + + print "<div class='whiteBox'>".__('No feed selected.'); + + $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 "<p><a class=\"insensitive\" href=\"#\" onclick=\"showFeedsWithErrors()\">". + __('Some feeds have update errors (click for details)')."</a>"; + } + + print "</div>]]>"; + print "</headlines>"; + + print "<headlines-count value=\"0\"/>"; + print "<vgroup-last-feed value=\"0\"/>"; + print "<headlines-unread value=\"0\"/>"; + print "<disable-cache value=\"1\"/>"; + + } ?> |