From 6b954c0a83636837ae7a1954a398a32b316d75a7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 13 Jul 2015 18:43:54 +0300 Subject: [PATCH] fix dashboard feed --- classes/feeds.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/classes/feeds.php b/classes/feeds.php index fb9413ff..f91a7925 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -960,9 +960,10 @@ class Feeds extends Handler_Protected { $reply['headlines']['is_cat'] = false; $reply['headlines']['toolbar'] = ''; - $reply['headlines']['content'] = "
".__('No feed selected.'); - $reply['headlines']['content'] .= "

"; + $headline_row = "

".__('No feed selected.'); + + $headline_row .= "

"; $result = $this->dbh->query("SELECT ".SUBSTRING_FOR_DATE."(MAX(last_updated), 1, 19) AS last_updated FROM ttrss_feeds WHERE owner_uid = " . $_SESSION['uid']); @@ -970,7 +971,7 @@ class Feeds extends Handler_Protected { $last_updated = $this->dbh->fetch_result($result, 0, "last_updated"); $last_updated = make_local_datetime($last_updated, false); - $reply['headlines']['content'] .= sprintf(__("Feeds last updated at %s"), $last_updated); + $headline_row .= sprintf(__("Feeds last updated at %s"), $last_updated); $result = $this->dbh->query("SELECT COUNT(id) AS num_errors FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); @@ -978,11 +979,13 @@ class Feeds extends Handler_Protected { $num_errors = $this->dbh->fetch_result($result, 0, "num_errors"); if ($num_errors > 0) { - $reply['headlines']['content'] .= "
"; - $reply['headlines']['content'] .= "". + $headline_row .= "
"; + $headline_row .= "
". __('Some feeds have update errors (click for details)').""; } - $reply['headlines']['content'] .= "

"; + $headline_row .= "

"; + + $reply['headlines']['content'] = array(array("kind" => "status_message", "html" => $headline_row)); $reply['headlines-info'] = array("count" => 0, "vgroup_last_feed" => '', -- 2.39.5