From: Andrew Dolgov Date: Wed, 31 Oct 2012 12:15:29 +0000 (+0400) Subject: improve status reporting for linked feeds X-Git-Tag: 1.6.1~28 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=32532f1c0f6a997060ee050654787b2bfa3329a6;p=tt-rss.git improve status reporting for linked feeds --- diff --git a/classes/pref/instances.php b/classes/pref/instances.php index c017ee9d..0ce39080 100644 --- a/classes/pref/instances.php +++ b/classes/pref/instances.php @@ -1,6 +1,12 @@ "Connection failed", + 1 => "Success", + 2 => "Invalid object received", + 16 => "Access denied" ); + function csrf_ignore($method) { $csrf_ignored = array("index", "edit"); @@ -167,6 +173,7 @@ class Pref_Instances extends Handler_Protected { ".__('Instance URL')." ".__('Access key')." ".__('Last connected')." + ".__('Status')." ".__('Stored feeds')." "; @@ -193,6 +200,7 @@ class Pref_Instances extends Handler_Protected { print "" . htmlspecialchars($line['access_url']) . ""; print "" . htmlspecialchars($access_key) . ""; print "" . htmlspecialchars($line['last_connected']) . ""; + print "" . $this->status_codes[$line['last_status_out']] . ""; print "" . htmlspecialchars($line['num_feeds']) . ""; print ""; diff --git a/include/functions.php b/include/functions.php index a81a2c0c..0e98b4a5 100644 --- a/include/functions.php +++ b/include/functions.php @@ -5124,6 +5124,12 @@ if ($feeds) { if ($feeds['error']) { $status = $feeds['error']['code'] + 10; + + // access denied + if ($status == 16) { + db_query($link, "DELETE FROM ttrss_linked_feeds + WHERE instance_id = '$id'"); + } } else { $status = 1;