From 84cb7aa498fe9165aa26116a51d80558f0db41d4 Mon Sep 17 00:00:00 2001 From: Darko Date: Sat, 19 Jan 2019 20:30:11 +0100 Subject: [PATCH] seg. time print only if admin user logged-in --- oc-includes/osclass/core/BaseModel.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/oc-includes/osclass/core/BaseModel.php b/oc-includes/osclass/core/BaseModel.php index 81c1b33e8a..24d8c61f41 100755 --- a/oc-includes/osclass/core/BaseModel.php +++ b/oc-includes/osclass/core/BaseModel.php @@ -22,6 +22,7 @@ abstract class BaseModel protected $action; protected $ajax; protected $time; + protected $is_admin; function __construct() { @@ -53,17 +54,18 @@ function __construct() } $this->subdomain_params($current_host); - $this->page = Params::getParam('page'); - $this->action = Params::getParam('action'); - $this->ajax = false; - $this->time = microtime(true); + $this->page = Params::getParam('page'); + $this->action = Params::getParam('action'); + $this->ajax = false; + $this->time = microtime(true); + $this->is_admin = osc_is_admin_user_logged_in(); WebThemes::newInstance(); osc_run_hook( 'init' ); } function __destruct() { - if( !$this->ajax && OSC_DEBUG ) { + if( !$this->ajax && OSC_DEBUG && $this->is_admin ) { echo ''; } }