From 358318954034bf5a9410c3bd05346fbcd73b7ace Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 26 Aug 2015 08:53:34 +0200 Subject: [PATCH] (mvc) fix handling of empty theme tag, issue https://github.com/opnsense/core/issues/342 --- .../mvc/app/controllers/OPNsense/Base/ControllerBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Base/ControllerBase.php b/src/opnsense/mvc/app/controllers/OPNsense/Base/ControllerBase.php index c234e8024..70d2b659d 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Base/ControllerBase.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Base/ControllerBase.php @@ -212,8 +212,8 @@ class ControllerBase extends ControllerRoot $this->view->menuSystem = $menu->getItems("/ui".$this->router->getRewriteUri()); - // set theme in ui_theme template var - if ($cnf->object()->theme != null) { + // set theme in ui_theme template var, let template handle its defaults (if there is no theme). + if ($cnf->object()->theme != null && !empty($cnf->object()->theme)) { $this->view->ui_theme = $cnf->object()->theme; }