From ae5f7bb11a7698a84c9352436c144286f7c81630 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Apr 2011 15:21:00 +0400 Subject: implement fetching and exporting of shared feeds --- modules/pref-instances.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'modules/pref-instances.php') diff --git a/modules/pref-instances.php b/modules/pref-instances.php index 45df2eb39..d3510c287 100644 --- a/modules/pref-instances.php +++ b/modules/pref-instances.php @@ -24,8 +24,9 @@ if (db_num_rows($result) == 0) { db_query($link, "INSERT INTO ttrss_linked_instances - (access_url, access_key, last_connected) VALUES - ('$access_url', '$access_key', '1970-01-01')"); + (access_url, access_key, last_connected, last_status_in, last_status_out) + VALUES + ('$access_url', '$access_key', '1970-01-01', -1, -1)"); } @@ -74,6 +75,8 @@ style=\"width: 20em\" name=\"access_key\" id=\"instance_edit_key\" value=\"$access_key\">"; + print "

" . __("Use one access key for both linked instances."); + print ""; print "

@@ -131,7 +134,10 @@ print "
"; #toolbar - $result = db_query($link, "SELECT * FROM ttrss_linked_instances + $result = db_query($link, "SELECT *, + (SELECT COUNT(*) FROM ttrss_linked_feeds + WHERE instance_id = ttrss_linked_instances.id) AS num_feeds + FROM ttrss_linked_instances ORDER BY $sort"); print "

" . __("You can connect other instances of Tiny Tiny RSS to this one to share Popular feeds. Link to this instance of Tiny Tiny RSS by using this URL:"); @@ -144,7 +150,8 @@   ".__('Instance URL')." ".__('Access key')." - ".__('Last connected')." + ".__('Last connected')." + ".__('Stored feeds')." "; $lnum = 0; @@ -170,6 +177,7 @@ print "" . htmlspecialchars($line['access_url']) . ""; print "" . htmlspecialchars($access_key) . ""; print "" . htmlspecialchars($line['last_connected']) . ""; + print "" . htmlspecialchars($line['num_feeds']) . ""; print ""; -- cgit v1.2.3