Add ajax page flag to basic class and updated login class to reflect this

This commit is contained in:
Clemens Schwaighofer
2019-10-08 18:34:29 +09:00
parent 18bf829c6b
commit 13b18c3a62
2 changed files with 8 additions and 1 deletions

View File

@@ -150,7 +150,7 @@ class Login extends \CoreLibs\DB\IO
// set global is ajax page for if we show the data directly, or need to pass it back
// to the continue AJAX class for output back to the user
$this->login_is_ajax_page = isset($GLOBALS['AJAX_PAGE']) && $GLOBALS['AJAX_PAGE'] ? true : false;
$this->login_is_ajax_page = $this->ajax_page_flag;
$this->l = new \CoreLibs\Language\L10n($lang);

View File

@@ -181,6 +181,8 @@ class Basic
// form token (used for form validation)
private $form_token = '';
// ajax flag
protected $ajax_page_flag = false;
// METHOD: __construct
// PARAMS: set_control_flag [current sets set/get var errors]
@@ -218,6 +220,11 @@ class Basic
die('Core Constant missing. Check config file.');
}
// set ajax page flag based on the AJAX_PAGE varaibles
// convert to true/false so if AJAX_PAGE is 0 or false it is
// always boolean false
$this->ajax_page_flag = isset($GLOBALS['AJAX_PAGE']) && $GLOBALS['AJAX_PAGE'] ? true : false;
// set the page name
$this->page_name = $this->getPageName();
$this->host_name = $this->getHostName();