8
0

Dont set theme-variant if there is none

Dieser Commit ist enthalten in:
Sam Hermans 2016-07-28 10:59:54 +03:00
Ursprung 0b6435a7c0
Commit e132a102d8

Datei anzeigen

@ -34,9 +34,13 @@ class DauxHelper
}
$theme = explode('-', $params['html']['theme']);
$params['html']['theme-variant'] = array_pop($theme);
$params['html']['theme'] = implode('-', $theme);
// do we have a variant or only a theme ?
if(isset($theme[1])) {
$params['html']['theme-variant'] = array_pop($theme);
$params['html']['theme'] = implode('-', $theme);
} else {
$params['html']['theme'] = array_pop($theme);
}
if (!is_dir($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])) {
throw new \RuntimeException("Theme '{$params['html']['theme']}' not found");