Update Login class to return login screen with reset _POST

Login class checks if AJAX_PAGE is set to true and then does not print
the login html to the screen directly, but returns it in the _POST array
login_html, _POST action is set to login
It also resets _POST & _GET arrays before hand to avoid any misuese.
All _SESSION array access needs to be checked in any following class as
the _SESSION is unset in this moment

html element should be overwritten with this JS:
document.getElementsByTagName('html')[0].innerHTML  =
data.content.login_html;
This commit is contained in:
Clemens Schwaighofer
2019-10-03 15:37:06 +09:00
parent fd8caaf5de
commit fd0af5a294
3 changed files with 87 additions and 76 deletions

View File

@@ -193,7 +193,7 @@ class Backend extends \CoreLibs\DB\IO
}
// get the session pages array
$PAGES = $_SESSION['PAGES'];
$PAGES = isset($_SESSION['PAGES']) ? $_SESSION['PAGES'] : null;
if (!isset($PAGES) || !is_array($PAGES)) {
$PAGES = array();
}