From d82d6a4d365a88788f1d53874033ed461c4d3780 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Wed, 25 Nov 2015 22:47:47 +0100 Subject: [PATCH] baculum: Switch to debug mode only when debug is enabled in config --- gui/baculum/protected/Class/Logging.php | 3 ++- gui/baculum/protected/Pages/Home.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/baculum/protected/Class/Logging.php b/gui/baculum/protected/Class/Logging.php index 12d1eeb3a0..2d5aa180eb 100644 --- a/gui/baculum/protected/Class/Logging.php +++ b/gui/baculum/protected/Class/Logging.php @@ -72,6 +72,7 @@ class Logging extends TModule { if($this->debugEnabled !== true) { return; } + $this->Application->setMode('Debug'); if(!in_array($category, $this->getLogCategories())) { $category = self::CATEGORY_SECURITY; @@ -89,4 +90,4 @@ class Logging extends TModule { } } -?> \ No newline at end of file +?> diff --git a/gui/baculum/protected/Pages/Home.php b/gui/baculum/protected/Pages/Home.php index f0a21f2e5a..38c4d6a64b 100644 --- a/gui/baculum/protected/Pages/Home.php +++ b/gui/baculum/protected/Pages/Home.php @@ -81,6 +81,7 @@ class Home extends BaculumPage public function setDebug($sender, $param) { if($this->User->getIsAdmin() === true) { $this->getModule('logging')->enableDebug($this->Logging->Checked); + $this->goToDefaultPage(); } } -- 2.39.5