From f914fcaba550ba10cbb02ca40bc2c1a011db3e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 15 Dec 2016 08:54:45 +0100 Subject: [PATCH] Share code for cascading ajax flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/Response.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libraries/Response.php b/libraries/Response.php index c7c27ffa14..b67df80ec8 100644 --- a/libraries/Response.php +++ b/libraries/Response.php @@ -97,13 +97,10 @@ class Response $this->_footer = new Footer(); $this->_isSuccess = true; - $this->_isAjax = false; $this->_isDisabled = false; - if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { - $this->_isAjax = true; - } - $this->_header->setAjax($this->_isAjax); - $this->_footer->setAjax($this->_isAjax); + $this->setAjax( + isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true + ); $this->_CWD = getcwd(); }