aboutsummaryrefslogtreecommitdiffstats
path: root/include/comanche.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2015-12-04 10:32:14 +0100
committermrjive <mrjive@mrjive.it>2015-12-04 10:32:14 +0100
commit051346325609f5f2e78ef0deaf182c65d7823bbc (patch)
treef3660377b3daf6599623d2e4fb95b4d33c30d8cc /include/comanche.php
parent53a796afcc0cff6f9e3f51457df4506a43db1945 (diff)
parent8a9d743f6f518d3af35014130dcef8f148148113 (diff)
downloadvolse-hubzilla-051346325609f5f2e78ef0deaf182c65d7823bbc.tar.gz
volse-hubzilla-051346325609f5f2e78ef0deaf182c65d7823bbc.tar.bz2
volse-hubzilla-051346325609f5f2e78ef0deaf182c65d7823bbc.zip
Merge pull request #9 from redmatrix/master
updating from original codebase
Diffstat (limited to 'include/comanche.php')
-rw-r--r--include/comanche.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/comanche.php b/include/comanche.php
index 9585a6578..ef71886f2 100644
--- a/include/comanche.php
+++ b/include/comanche.php
@@ -282,15 +282,16 @@ function comanche_widget($name, $text) {
}
}
- if(file_exists('widget/' . trim($name) . '.php'))
+ $func = 'widget_' . trim($name);
+
+ if((! function_exists($func)) && file_exists('widget/' . trim($name) . '.php'))
require_once('widget/' . trim($name) . '.php');
else {
- $theme_widget = 'widget_' . trim($name) . '.php';
- if(theme_include($theme_widget))
+ $theme_widget = $func . '.php';
+ if((! function_exists($func)) && theme_include($theme_widget))
require_once(theme_include($theme_widget));
}
- $func = 'widget_' . trim($name);
if (function_exists($func))
return $func($vars);
}