diff --git a/www/lib/CoreLibs/ACL/Login.php b/www/lib/CoreLibs/ACL/Login.php index b88e574d..a672a13e 100644 --- a/www/lib/CoreLibs/ACL/Login.php +++ b/www/lib/CoreLibs/ACL/Login.php @@ -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); diff --git a/www/lib/CoreLibs/Basic.php b/www/lib/CoreLibs/Basic.php index 544747d4..178190a4 100644 --- a/www/lib/CoreLibs/Basic.php +++ b/www/lib/CoreLibs/Basic.php @@ -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();