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 /include/smarty.php | |
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 'include/smarty.php')
-rwxr-xr-x | include/smarty.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/smarty.php b/include/smarty.php index 3812c6021..762efe335 100755 --- a/include/smarty.php +++ b/include/smarty.php @@ -11,13 +11,14 @@ class FriendicaSmarty extends Smarty { parent::__construct(); $a = get_app(); - $theme = current_theme(); + $theme = Zotlabs\Render\Theme::current(); + $thname = $theme[0]; // setTemplateDir can be set to an array, which Smarty will parse in order. // The order is thus very important here - $template_dirs = array('theme' => "view/theme/$theme/tpl/"); + $template_dirs = array('theme' => "view/theme/$thname/tpl/"); if( x(App::$theme_info,"extends") ) - $template_dirs = $template_dirs + array('extends' => "view/theme/".App::$theme_info["extends"]."/tpl/"); + $template_dirs = $template_dirs + array('extends' => "view/theme/" . App::$theme_info["extends"] . "/tpl/"); $template_dirs = $template_dirs + array('base' => 'view/tpl/'); $this->setTemplateDir($template_dirs); |