summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-10-31 09:37:40 +0100
committerAndrew Dolgov <[email protected]>2006-10-31 09:37:40 +0100
commitaa2122d46f61efcb4c2c5cf6c76928890278cce1 (patch)
treef4c1e8c6914d445a8e37dd7b83bf6e97d5bf3754 /modules
parent07958ba138facf5623558bf6c03f8cdb7cc79f9a (diff)
add nicer interface when subscribing from external source (for ff 2.0)
Diffstat (limited to 'modules')
-rw-r--r--modules/pref-feeds.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php
index 4070f4315..af8fd0936 100644
--- a/modules/pref-feeds.php
+++ b/modules/pref-feeds.php
@@ -426,6 +426,19 @@
$feed_url = db_escape_string(trim($_GET["feed_url"]));
$cat_id = db_escape_string($_GET["cat_id"]);
+ $p_from = db_escape_string($_GET["from"]);
+
+ if ($p_from) {
+ print "<html>
+ <head>
+ <title>Tiny Tiny RSS - Subscribe to feed...</title>
+ <link rel=\"stylesheet\" type=\"text/css\" href=\"quicksub.css\">
+ </head>
+ <body>
+ <img class=\"logo\" src=\"images/ttrss_logo.png\"
+ alt=\"Tiny Tiny RSS\"/>
+ <h1>Subscribe to feed...</h1>";
+ }
if (subscribe_to_feed($link, $feed_url, $cat_id)) {
print "Added feed.";
@@ -434,6 +447,18 @@
Feed <b>$feed_url</b> already exists in the database.
</div>";
}
+
+ if ($p_from) {
+ $tt_uri = 'http://' . $_SERVER['SERVER_NAME'] .
+ preg_replace('/backend\.php.*$/',
+ 'tt-rss.php', $_SERVER["REQUEST_URI"]);
+
+ print "<p><a href='$tt_uri'>Return to Tiny Tiny RSS</a> or
+ <a href='javascript:window.close()'>close this window</a>.</p>";
+
+ print "</body></html>";
+ return;
+ }
}
}