use realpath to bypass symlinks and check actually directory

This commit is contained in:
redmatrix
2015-12-18 14:55:19 -08:00
parent 8d61efa0e8
commit ed5ca9e4cc
2 changed files with 11 additions and 1 deletions

View File

@@ -287,7 +287,7 @@ function comanche_widget($name, $text) {
if(! function_exists($func)) {
if(file_exists('widget/' . trim($name) . '.php'))
require_once('widget/' . trim($name) . '.php');
elseif(is_dir('widget/'. trim($name))
elseif(folder_exists('widget/'. trim($name))
&& (file_exists('widget/' . trim($name) . '/' . trim($name) . '.php')))
require_once('widget/' . trim($name) . '/' . trim($name) . '.php');
}