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/Storage | |
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/Storage')
-rw-r--r-- | Zotlabs/Storage/Browser.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index ca262b739..3556f7f06 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -246,11 +246,13 @@ class Browser extends DAV\Browser\Plugin { \App::$page['content'] = $html; load_pdl($a); - $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); } } |