diff options
Diffstat (limited to 'utils/modules.php')
-rw-r--r-- | utils/modules.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/modules.php b/utils/modules.php index c363e6d..4718f95 100644 --- a/utils/modules.php +++ b/utils/modules.php @@ -26,16 +26,18 @@ function loadModule($modulename) global $MODULES_DIR; global $modules; - $modulefile = $MODULES_DIR . "/" . $modulename . ".php"; if(!$modules[$modulename]) { + $modulefile = $MODULES_DIR . "/" . $modulename . ".php"; if(file_exists($modulefile)) { include_once($modulefile); $module = call_user_func($modulename . "_init"); $modules[$modulename] = $module; } else { // Module does not exist. + return; } } + return $modules[$modulename]; } function loadAllModules() |