Only count updating (i.e. enabled) feeds when determining active feeds with errors.
This excludes feeds that had errors and currently have updating disabled (e.g. disabled due to the site being down for a while, getting compromised, etc.). Disabled / non-updating feeds' error states are still visible when viewed in the feed tree.
This commit is contained in:
parent
423b26afc5
commit
46e2635869
|
@ -431,12 +431,11 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$reply['content'] .= sprintf(__("Feeds last updated at %s"), $last_updated);
|
||||
|
||||
$sth = $this->pdo->prepare("SELECT COUNT(id) AS num_errors
|
||||
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ?");
|
||||
$sth->execute([$_SESSION['uid']]);
|
||||
$row = $sth->fetch();
|
||||
|
||||
$num_errors = $row["num_errors"];
|
||||
$num_errors = ORM::for_table('ttrss_feeds')
|
||||
->where_not_equal('last_error', '')
|
||||
->where('owner_uid', $_SESSION['uid'])
|
||||
->where_gt('update_interval', 0)
|
||||
->count('id');
|
||||
|
||||
if ($num_errors > 0) {
|
||||
$reply['content'] .= "<br/>";
|
||||
|
@ -585,12 +584,11 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
$reply['headlines']['content'] .= sprintf(__("Feeds last updated at %s"), $last_updated);
|
||||
|
||||
$sth = $this->pdo->prepare("SELECT COUNT(id) AS num_errors
|
||||
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ?");
|
||||
$sth->execute([$_SESSION['uid']]);
|
||||
$row = $sth->fetch();
|
||||
|
||||
$num_errors = $row["num_errors"];
|
||||
$num_errors = ORM::for_table('ttrss_feeds')
|
||||
->where_not_equal('last_error', '')
|
||||
->where('owner_uid', $_SESSION['uid'])
|
||||
->where_gt('update_interval', 0)
|
||||
->count('id');
|
||||
|
||||
if ($num_errors > 0) {
|
||||
$reply['headlines']['content'] .= "<br/>";
|
||||
|
|
|
@ -1154,6 +1154,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||
->select_many('id', 'title', 'feed_url', 'last_error', 'site_url')
|
||||
->where_not_equal('last_error', '')
|
||||
->where('owner_uid', $_SESSION['uid'])
|
||||
->where_gt('update_interval', 0)
|
||||
->find_array());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue