From c11f32ac388fd1ac2f7402572db7afad04cd5ce4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 19 Feb 2019 14:59:29 +0300 Subject: center and rework some utility screens --- classes/handler/public.php | 39 ++++++++++++++++++++++++++------------- classes/opml.php | 1 - classes/pref/users.php | 34 +++++++++++++++++----------------- 3 files changed, 43 insertions(+), 31 deletions(-) (limited to 'classes') diff --git a/classes/handler/public.php b/classes/handler/public.php index 235aba3c6..aaeee8219 100755 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -781,9 +781,8 @@ class Handler_Public extends Handler { - \"Tiny -

".__("Subscribe to feed...")."

"; +
+

".__("Subscribe to feed...")."

"; $rc = Feeds::subscribe_to_feed($feed_url); @@ -858,7 +857,7 @@ class Handler_Public extends Handler {

"; - print "
"; + print "
"; } else { render_login_form(); @@ -885,9 +884,8 @@ class Handler_Public extends Handler { echo javascript_tag("lib/prototype.js"); print " - "; +
"; - print ''; print "

".__("Password recovery")."

"; print "
"; @@ -928,12 +926,14 @@ class Handler_Public extends Handler { print_error("Some of the information provided is missing or incorrect."); } + print "
"; + print "
"; } else if (!$method) { - print_notice(__("You will need to provide valid account name and email. A password reset link will be sent to your email address.")); + print_notice(__("You will need to provide valid account name and email. Password reset link will be sent to your email address.")); print "
"; print ""; @@ -954,8 +954,10 @@ class Handler_Public extends Handler { print ""; print ""; - print "

"; + print "


"; + print "
"; print ""; + print "
"; print "
"; } else if ($method == 'do') { @@ -974,13 +976,13 @@ class Handler_Public extends Handler { } else { - print_notice("Password reset instructions are being sent to your email address."); - $sth = $this->pdo->prepare("SELECT id FROM ttrss_users WHERE login = ? AND email = ?"); $sth->execute([$login, $email]); if ($row = $sth->fetch()) { + print_notice("Password reset instructions are being sent to your email address."); + $id = $row["id"]; if ($id) { @@ -1029,6 +1031,8 @@ class Handler_Public extends Handler { print_error("User ID not found."); } + print "
"; + print "
"; @@ -1036,6 +1040,8 @@ class Handler_Public extends Handler { } else { print_error(__("Sorry, login and email combination not found.")); + print "
"; + print "
@@ -1046,6 +1052,7 @@ class Handler_Public extends Handler { } + print "
"; print "
"; print ""; print ""; @@ -1065,7 +1072,7 @@ class Handler_Public extends Handler { Database Updater - + @@ -1080,8 +1087,7 @@ class Handler_Public extends Handler { } - - +

@@ -1122,6 +1128,8 @@ class Handler_Public extends Handler { print_notice("Your Tiny Tiny RSS database is now updated to the latest version."); + print "
"; + print "

"; @@ -1129,6 +1137,8 @@ class Handler_Public extends Handler { } else { print "

Your database is up to date.

"; + print "
"; + print "

"; @@ -1154,6 +1164,8 @@ class Handler_Public extends Handler { print_notice("Tiny Tiny RSS database is up to date."); + print "
"; + print "

"; @@ -1162,6 +1174,7 @@ class Handler_Public extends Handler { } ?> +
diff --git a/classes/opml.php b/classes/opml.php index 1b1897e7d..fe43a096c 100644 --- a/classes/opml.php +++ b/classes/opml.php @@ -29,7 +29,6 @@ class Opml extends Handler_Protected { -

".__('OPML Utility')."

"; add_feed_category("Imported feeds"); diff --git a/classes/pref/users.php b/classes/pref/users.php index 206dc34d5..f7786eae0 100644 --- a/classes/pref/users.php +++ b/classes/pref/users.php @@ -283,35 +283,35 @@ class Pref_Users extends Handler_Protected { $sth->execute([$pwd_hash, $new_salt, $uid]); if ($show_password) { - print T_sprintf("Changed password of user %s to %s", $login, $tmp_user_pwd); + print_notice(T_sprintf("Changed password of user %s to %s", $login, $tmp_user_pwd)); } else { print_notice(T_sprintf("Sending new password of user %s to %s", $login, $email)); - } - if ($email) { - require_once "lib/MiniTemplator.class.php"; + if ($email) { + require_once "lib/MiniTemplator.class.php"; - $tpl = new MiniTemplator; + $tpl = new MiniTemplator; - $tpl->readTemplateFromFile("templates/resetpass_template.txt"); + $tpl->readTemplateFromFile("templates/resetpass_template.txt"); - $tpl->setVariable('LOGIN', $login); - $tpl->setVariable('NEWPASS', $tmp_user_pwd); + $tpl->setVariable('LOGIN', $login); + $tpl->setVariable('NEWPASS', $tmp_user_pwd); - $tpl->addBlock('message'); + $tpl->addBlock('message'); - $message = ""; + $message = ""; - $tpl->generateOutputToString($message); + $tpl->generateOutputToString($message); - $mailer = new Mailer(); + $mailer = new Mailer(); - $rc = $mailer->mail(["to_name" => $login, - "to_address" => $email, - "subject" => __("[tt-rss] Password change notification"), - "message" => $message]); + $rc = $mailer->mail(["to_name" => $login, + "to_address" => $email, + "subject" => __("[tt-rss] Password change notification"), + "message" => $message]); - if (!$rc) print_error($mailer->error()); + if (!$rc) print_error($mailer->error()); + } } } -- cgit v1.2.3-54-g00ecf