summaryrefslogtreecommitdiff
path: root/classes/handler/public.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-xclasses/handler/public.php37
1 files changed, 28 insertions, 9 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index 37fe8612a..a8369f440 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -525,6 +525,7 @@ class Handler_Public extends Handler {
header('Content-Type: text/html; charset=utf-8');
?>
+ <!DOCTYPE html>
<html>
<head>
<title><?php echo __("Share with Tiny Tiny RSS") ?> ?></title>
@@ -622,7 +623,7 @@ class Handler_Public extends Handler {
} else {
- $return = urlencode($_SERVER["REQUEST_URI"])
+ $return = urlencode(make_self_url());
?>
@@ -711,7 +712,9 @@ class Handler_Public extends Handler {
user_error("Failed login attempt for $login from {$_SERVER['REMOTE_ADDR']}", E_USER_WARNING);
}
- if (clean($_REQUEST['return'])) {
+ $return = clean($_REQUEST['return']);
+
+ if ($_REQUEST['return'] && mb_strpos($return, SELF_URL_PATH) === 0) {
header("Location: " . clean($_REQUEST['return']));
} else {
header("Location: " . get_self_url_prefix());
@@ -742,6 +745,7 @@ class Handler_Public extends Handler {
header('Content-Type: text/html; charset=utf-8');
?>
+ <!DOCTYPE html>
<html>
<head>
<title>Tiny Tiny RSS</title>
@@ -770,7 +774,21 @@ class Handler_Public extends Handler {
<?php
if (!$feed_url) {
- print_error("No feed to subscribe to.");
+ ?>
+ <form method="post">
+ <input type="hidden" name="op" value="subscribe">
+ <fieldset>
+ <label>Feed or site URL:</label>
+ <input style="width: 300px" dojoType="dijit.form.ValidationTextBox" required="1" name="feed_url">
+ </fieldset>
+
+ <button class="alt-primary" dojoType="dijit.form.Button" type="submit">
+ <?php echo __("Subscribe") ?>
+ </button>
+
+ <a href="index.php"><?php echo __("Return to Tiny Tiny RSS") ?></a>
+ </form>
+ <?php
} else {
$rc = Feeds::subscribe_to_feed($feed_url);
@@ -814,9 +832,11 @@ class Handler_Public extends Handler {
}
print "</select>";
- print "<button class='alt-primary' dojoType='dijit.form.Button' type='submit'>".__("Subscribe to selected feed")."</button>";
print "</fieldset>";
+ print "<button class='alt-primary' dojoType='dijit.form.Button' type='submit'>".__("Subscribe to selected feed")."</button>";
+ print "<a href='index.php'>".__("Return to Tiny Tiny RSS")."</a>";
+
print "</form>";
}
@@ -832,20 +852,18 @@ class Handler_Public extends Handler {
} else {
$feed_id = 0;
}
- print "<p>";
if ($feed_id) {
- print "<form method='GET' style='float : left' action=\"$tp_uri\">
+ print "<form method='GET' action=\"$tp_uri\">
<input type='hidden' name='tab' value='feedConfig'>
<input type='hidden' name='method' value='editfeed'>
<input type='hidden' name='methodparam' value='$feed_id'>
<button dojoType='dijit.form.Button' class='alt-info' type='submit'>".__("Edit subscription options")."</button>
+ <a href='index.php'>".__("Return to Tiny Tiny RSS")."</a>
</form>";
}
}
- print "<a href='index.php'>".__("Return to Tiny Tiny RSS")."</a>";
-
print "</div></div></body></html>";
} else {
@@ -866,7 +884,7 @@ class Handler_Public extends Handler {
header('Content-Type: text/html; charset=utf-8');
?>
-
+ <!DOCTYPE html>
<html>
<head>
<title>Tiny Tiny RSS</title>
@@ -1071,6 +1089,7 @@ class Handler_Public extends Handler {
}
?>
+ <!DOCTYPE html>
<html>
<head>
<title>Database Updater</title>