fix redirects after schema upgrade; fix logout requiring valid schema

This commit is contained in:
Andrew Dolgov 2011-04-20 11:46:16 +04:00
parent 1ca77e0acd
commit 2376ad4925
3 changed files with 5 additions and 3 deletions

View File

@ -124,7 +124,7 @@
$error = sanity_check($link);
if ($error['code'] != 0) {
if ($error['code'] != 0 && $op != "logout") {
print json_encode(array("error" => $error));
return;
}

View File

@ -155,7 +155,8 @@ function confirmOP() {
print "<p>".T_sprintf("Finished. Performed <b>%d</b> update(s) up to schema
version <b>%d</b>.", $num_updates, $version)."</p>";
print "<form method=\"GET\" action=\"backend.php?op=logout\">
print "<form method=\"GET\" action=\"backend.php\">
<input type=\"hidden\" name=\"op\" value=\"logout\">
<input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
</form>";

View File

@ -148,7 +148,8 @@
if (!ENABLE_REGISTRATION) {
print_error(__("New user registrations are administratively disabled."));
print "<p><form method=\"GET\" action=\"backend.php?op=logout\">
print "<p><form method=\"GET\" action=\"backend.php\">
<input type=\"hidden\" name=\"op\" value=\"logout\">
<input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
</form>";
return;