diff options
Diffstat (limited to 'include/comanche.php')
-rw-r--r-- | include/comanche.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/comanche.php b/include/comanche.php index 1537226ca..ddf331321 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -275,6 +275,7 @@ function comanche_widget($name, $text) { $vars = array(); $matches = array(); + $cnt = preg_match_all("/\[var=(.*?)\](.*?)\[\/var\]/ism", $text, $matches, PREG_SET_ORDER); if ($cnt) { foreach ($matches as $mtch) { @@ -287,8 +288,7 @@ function comanche_widget($name, $text) { if(! function_exists($func)) { if(file_exists('widget/' . trim($name) . '.php')) require_once('widget/' . trim($name) . '.php'); - elseif(folder_exists('widget/'. trim($name)) - && (file_exists('widget/' . trim($name) . '/' . trim($name) . '.php'))) + elseif(file_exists('widget/' . trim($name) . '/' . trim($name) . '.php')) require_once('widget/' . trim($name) . '/' . trim($name) . '.php'); } else { |