mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
MVC/Theme, force theme setting if base theme directory (/usr/local/opnsense/www/themes) doesn't exist, which might be the case for local test/development (we can't know for sure the predefined theme doesn't exist, but if we can't probe if we might as well trust the settings)
This commit is contained in:
parent
c58c2fdc8d
commit
67e95c4f52
@ -174,7 +174,10 @@ class ControllerBase extends ControllerRoot
|
||||
|
||||
// set theme in ui_theme template var, let template handle its defaults (if there is no theme).
|
||||
if ($cnf->object()->theme->count() > 0 && !empty($cnf->object()->theme) &&
|
||||
is_dir('/usr/local/opnsense/www/themes/'.(string)$cnf->object()->theme)
|
||||
(
|
||||
is_dir('/usr/local/opnsense/www/themes/'.(string)$cnf->object()->theme) ||
|
||||
!is_dir('/usr/local/opnsense/www/themes')
|
||||
)
|
||||
) {
|
||||
$this->view->ui_theme = $cnf->object()->theme;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user