From e513a74a6b37a3a406686e0f3cbe9011265d1453 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 18 Dec 2006 06:56:55 +0100 Subject: add edit feed link into firefox from-rss subscribe dialog --- modules/pref-feeds.php | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 0572978dd..1ea63c96f 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -428,7 +428,7 @@ $cat_id = db_escape_string($_GET["cat_id"]); $p_from = db_escape_string($_GET["from"]); - if ($p_from) { + if ($p_from != 'tt-rss') { print " Tiny Tiny RSS - Subscribe to feed... @@ -437,26 +437,42 @@ \"Tiny -

Subscribe to feed...

"; +

Subscribe to feed...

+
"; } if (subscribe_to_feed($link, $feed_url, $cat_id)) { - print "Added feed."; + print "Subscribed to $feed_url."; } else { print "
- Feed $feed_url already exists in the database. + Already subscribed to $feed_url.
"; } - if ($p_from) { + if ($p_from != 'tt-rss') { $tt_uri = 'http://' . $_SERVER['SERVER_NAME'] . preg_replace('/backend\.php.*$/', 'tt-rss.php', $_SERVER["REQUEST_URI"]); - print "

Return to Tiny Tiny RSS or - close this window.

"; + $tp_uri = 'http://' . $_SERVER['SERVER_NAME'] . + preg_replace('/backend\.php.*$/', + 'prefs.php', $_SERVER["REQUEST_URI"]); + + print "

Return to Tiny Tiny RSS |"; + + $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE + feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]); + + $feed_id = db_fetch_result($result, 0, "id"); + + if ($feed_id) { + print " + Edit subscription options | "; + } + + print "Close this window.

"; - print ""; + print "
"; return; } } -- cgit v1.2.3