Can't download the Feed URL.", $feed_url)); break; } if ($feed_urls) { print ""; } $tp_uri = get_self_url_prefix() . "/prefs.php"; if ($rc['code'] <= 2){ $sth = $this->pdo->prepare("SELECT id FROM ttrss_feeds WHERE feed_url = ? AND owner_uid = ?"); $sth->execute([$feed_url, $_SESSION['uid']]); $row = $sth->fetch(); $feed_id = $row["id"]; } else { $feed_id = 0; } if ($feed_id) { print ""; } } print "
"."Completed."."
"; } else { print_error("Some of the information provided is missing or incorrect."); } } else { print_error("Some of the information provided is missing or incorrect."); } } else { print_error("Some of the information provided is missing or incorrect."); } print "".__("Return to Tiny Tiny RSS").""; } else if (!$method) { print_notice(__("You will need to provide valid account name and email. Password reset link will be sent to your email address.")); print ""; } else if ($method == 'do') { $login = clean($_POST["login"]); $email = clean($_POST["email"]); $test = clean($_POST["test"]); if ($test != ($_SESSION["pwdreset:testvalue1"] + $_SESSION["pwdreset:testvalue2"]) || !$email || !$login) { print_error(__('Some of the required form parameters are missing or incorrect.')); print ""; } else { // prevent submitting this form multiple times $_SESSION["pwdreset:testvalue1"] = rand(1, 1000); $_SESSION["pwdreset:testvalue2"] = rand(1, 1000); $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) { $resetpass_token = sha1(get_random_bytes(128)); $resetpass_link = get_self_url_prefix() . "/public.php?op=forgotpass&hash=" . $resetpass_token . "&login=" . urlencode($login); require_once "lib/MiniTemplator.class.php"; $tpl = new MiniTemplator; $tpl->readTemplateFromFile("templates/resetpass_link_template.txt"); $tpl->setVariable('LOGIN', $login); $tpl->setVariable('RESETPASS_LINK', $resetpass_link); $tpl->addBlock('message'); $message = ""; $tpl->generateOutputToString($message); $mailer = new Mailer(); $rc = $mailer->mail(["to_name" => $login, "to_address" => $email, "subject" => __("[tt-rss] Password reset request"), "message" => $message]); if (!$rc) print_error($mailer->error()); $resetpass_token_full = time() . ":" . $resetpass_token; $sth = $this->pdo->prepare("UPDATE ttrss_users SET resetpass_token = ? WHERE login = ? AND email = ?"); $sth->execute([$resetpass_token_full, $login, $email]); } else { print_error("User ID not found."); } print "".__("Return to Tiny Tiny RSS").""; } else { print_error(__("Sorry, login and email combination not found.")); print ""; } } } print "" . __("Performing updates") . "
"; print "" . T_sprintf("Updating to schema version %d", SCHEMA_VERSION) . "
"; print "- ";
for ($i = $updater->getSchemaVersion() + 1; $i <= SCHEMA_VERSION; $i++) {
print "
- " . T_sprintf("Performing update up to version %d...", $i); $result = $updater->performUpdateTo($i, true); if (!$result) { print "".__("FAILED!")."