diff options
author | zotlabs <mike@macgirvin.com> | 2017-12-07 14:34:51 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-12-07 14:34:51 -0800 |
commit | e9ae51cfbca4ca4c2a5e9a2c452031e31985d093 (patch) | |
tree | 41a1e1753f12bf883d953e4fe2ddb7e0613c3733 /Zotlabs | |
parent | 3dac1a8d4ae6d087ff9bea6f194b76a37e34f938 (diff) | |
download | volse-hubzilla-e9ae51cfbca4ca4c2a5e9a2c452031e31985d093.tar.gz volse-hubzilla-e9ae51cfbca4ca4c2a5e9a2c452031e31985d093.tar.bz2 volse-hubzilla-e9ae51cfbca4ca4c2a5e9a2c452031e31985d093.zip |
fix loading of theme-specific widgets
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Render/Comanche.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php index cd06e11a8..fb400b6fe 100644 --- a/Zotlabs/Render/Comanche.php +++ b/Zotlabs/Render/Comanche.php @@ -534,7 +534,12 @@ class Comanche { require_once('widget/' . $clsname . '/' . $clsname . '.php'); elseif(file_exists('Zotlabs/Widget/' . $clsname . '.php')) require_once('Zotlabs/Widget/' . $clsname . '.php'); - + else { + $pth = theme_include($clsname . '.php'); + if($pth) { + require_once($pth); + } + } if(class_exists($nsname)) { $x = new $nsname; $f = 'widget'; @@ -550,11 +555,13 @@ class Comanche { require_once('widget/' . trim($name) . '.php'); elseif(file_exists('widget/' . trim($name) . '/' . trim($name) . '.php')) require_once('widget/' . trim($name) . '/' . trim($name) . '.php'); - } - else { - $theme_widget = $func . '.php'; - if((! function_exists($func)) && theme_include($theme_widget)) - require_once(theme_include($theme_widget)); + + if(! function_exists($func)) { + $theme_widget = $func . '.php'; + if(theme_include($theme_widget)) { + require_once(theme_include($theme_widget)); + } + } } if(function_exists($func)) |