]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Switch to debug mode only when debug is enabled in config
authorMarcin Haba <marcin.haba@bacula.pl>
Wed, 25 Nov 2015 21:47:47 +0000 (22:47 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Wed, 25 Nov 2015 21:47:47 +0000 (22:47 +0100)
gui/baculum/protected/Class/Logging.php
gui/baculum/protected/Pages/Home.php

index 12d1eeb3a02d20e7e9aaf2fe15974f86cac0a2a4..2d5aa180eb56709fb3c78419cda6d1eeb9de990d 100644 (file)
@@ -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
+?>
index f0a21f2e5ac301464666bd23f20aeb44f55dce70..38c4d6a64b9da0dd3bd209f1f296506e8f5c17dd 100644 (file)
@@ -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();
                }
        }