summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/pref/instances.php8
-rw-r--r--include/functions.php6
2 files changed, 14 insertions, 0 deletions
diff --git a/classes/pref/instances.php b/classes/pref/instances.php
index c017ee9d2..0ce390805 100644
--- a/classes/pref/instances.php
+++ b/classes/pref/instances.php
@@ -1,6 +1,12 @@
<?php
class Pref_Instances extends Handler_Protected {
+ private $status_codes = array(
+ 0 => "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 {
<td width=''><a href=\"#\" onclick=\"updateInstanceList('access_url')\">".__('Instance URL')."</a></td>
<td width='20%'><a href=\"#\" onclick=\"updateInstanceList('access_key')\">".__('Access key')."</a></td>
<td width='10%'><a href=\"#\" onclick=\"updateUsersList('last_connected')\">".__('Last connected')."</a></td>
+ <td width='10%'><a href=\"#\" onclick=\"updateUsersList('last_status_out')\">".__('Status')."</a></td>
<td width='10%'><a href=\"#\" onclick=\"updateUsersList('num_feeds')\">".__('Stored feeds')."</a></td>
</tr>";
@@ -193,6 +200,7 @@ class Pref_Instances extends Handler_Protected {
print "<td $onclick>" . htmlspecialchars($line['access_url']) . "</td>";
print "<td $onclick>" . htmlspecialchars($access_key) . "</td>";
print "<td $onclick>" . htmlspecialchars($line['last_connected']) . "</td>";
+ print "<td $onclick>" . $this->status_codes[$line['last_status_out']] . "</td>";
print "<td $onclick>" . htmlspecialchars($line['num_feeds']) . "</td>";
print "</tr>";
diff --git a/include/functions.php b/include/functions.php
index a81a2c0cd..0e98b4a54 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;