merge logout.php inside backend.php
This commit is contained in:
12
backend.php
12
backend.php
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
if (!($_SESSION["uid"] && validate_session($link)) && $op != "globalUpdateFeeds" &&
|
if (!($_SESSION["uid"] && validate_session($link)) && $op != "globalUpdateFeeds" &&
|
||||||
$op != "rss" && $op != "getUnread" && $op != "getProfiles" &&
|
$op != "rss" && $op != "getUnread" && $op != "getProfiles" &&
|
||||||
$op != "pubsub") {
|
$op != "logout" && $op != "pubsub") {
|
||||||
|
|
||||||
header("Content-Type: text/plain");
|
header("Content-Type: text/plain");
|
||||||
print json_encode(array("error" => array("code" => 6)));
|
print json_encode(array("error" => array("code" => 6)));
|
||||||
@@ -571,6 +571,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "logout":
|
||||||
|
logout_user();
|
||||||
|
header("Location: tt-rss.php");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
header("Content-Type: text/plain");
|
||||||
|
print json_encode(array("error" => array("code" => 7)));
|
||||||
|
break;
|
||||||
} // Select action according to $op value.
|
} // Select action according to $op value.
|
||||||
|
|
||||||
// We close the connection to database.
|
// We close the connection to database.
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ function confirmOP() {
|
|||||||
print "<p>".T_sprintf("Finished. Performed <b>%d</b> update(s) up to schema
|
print "<p>".T_sprintf("Finished. Performed <b>%d</b> update(s) up to schema
|
||||||
version <b>%d</b>.", $num_updates, $version)."</p>";
|
version <b>%d</b>.", $num_updates, $version)."</p>";
|
||||||
|
|
||||||
print "<form method=\"GET\" action=\"logout.php\">
|
print "<form method=\"GET\" action=\"backend.php?op=logout\">
|
||||||
<input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
|
<input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
|
||||||
</form>";
|
</form>";
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if (!SINGLE_USER_MODE) { ?>
|
<?php if (!SINGLE_USER_MODE) { ?>
|
||||||
<a href="logout.php"><?php echo __('Logout') ?></a>
|
<a href="backend.php?op=logout"><?php echo __('Logout') ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
11
logout.php
11
logout.php
@@ -1,11 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once "functions.php";
|
|
||||||
require_once "sessions.php";
|
|
||||||
require_once "sanity_check.php";
|
|
||||||
require_once "version.php";
|
|
||||||
require_once "config.php";
|
|
||||||
require_once "db-prefs.php";
|
|
||||||
|
|
||||||
logout_user();
|
|
||||||
header("Location: tt-rss.php");
|
|
||||||
?>
|
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
if (!ENABLE_REGISTRATION) {
|
if (!ENABLE_REGISTRATION) {
|
||||||
print_error(__("New user registrations are administratively disabled."));
|
print_error(__("New user registrations are administratively disabled."));
|
||||||
|
|
||||||
print "<p><form method=\"GET\" action=\"logout.php\">
|
print "<p><form method=\"GET\" action=\"backend.php?op=logout\">
|
||||||
<input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
|
<input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
|
||||||
</form>";
|
</form>";
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if (!SINGLE_USER_MODE) { ?>
|
<?php if (!SINGLE_USER_MODE) { ?>
|
||||||
| <a href="logout.php"><?php echo __('Logout') ?></a>
|
| <a href="backend.php?op=logout"><?php echo __('Logout') ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<img id="newVersionIcon" style="display:none" onclick="newVersionDlg()"
|
<img id="newVersionIcon" style="display:none" onclick="newVersionDlg()"
|
||||||
|
|||||||
Reference in New Issue
Block a user