diff options
author | redmatrix <git@macgirvin.com> | 2016-05-17 17:46:30 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-05-17 17:46:30 -0700 |
commit | 20cb4130d47028cbedf09f8da9feb6ccf8f759db (patch) | |
tree | 705d8853724f1555cc797ed85176ad123632bed1 /Zotlabs/Web | |
parent | 51edd472c2e007490bdad3198ba1b2a3d7a09c45 (diff) | |
download | volse-hubzilla-20cb4130d47028cbedf09f8da9feb6ccf8f759db.tar.gz volse-hubzilla-20cb4130d47028cbedf09f8da9feb6ccf8f759db.tar.bz2 volse-hubzilla-20cb4130d47028cbedf09f8da9feb6ccf8f759db.zip |
support work for a long-term fix for issue #390, essentially one can specify a theme:schema string anywhere a theme is input. It will be honoured unless an existing schema setting over-rides this behaviour. This should also be backward compatible but the theme selection code has been cleaned up slightly and there may be subtle differences in behaviour after this commit. On my site this required a page refresh as the first page load after this change was a bit confused.
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r-- | Zotlabs/Web/Router.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php index e6733ffdb..f9290ac30 100644 --- a/Zotlabs/Web/Router.php +++ b/Zotlabs/Web/Router.php @@ -206,13 +206,15 @@ class Router { * load current theme info */ - $theme_info_file = 'view/theme/' . current_theme() . '/php/theme.php'; + $current_theme = \Zotlabs\Render\Theme::current(); + + $theme_info_file = 'view/theme/' . $current_theme[0] . '/php/theme.php'; if (file_exists($theme_info_file)){ require_once($theme_info_file); } - if(function_exists(str_replace('-', '_', current_theme()) . '_init')) { - $func = str_replace('-', '_', current_theme()) . '_init'; + if(function_exists(str_replace('-', '_', $current_theme[0]) . '_init')) { + $func = str_replace('-', '_', $current_theme[0]) . '_init'; $func($a); } elseif (x(\App::$theme_info, 'extends') && file_exists('view/theme/' . \App::$theme_info['extends'] . '/php/theme.php')) { |