Commit a282a317 authored by jonnybradley's avatar jonnybradley

[FIX] modules: User module files don't exists

parent 53002324
......@@ -38,12 +38,15 @@ ob_start();
?>if ( typeof tiki_module_params == 'undefined' ) { var tiki_module_params = {}; }
<?php
foreach ( $mods as $mod ) {
include_once('modules/mod-func-' . $mod . '.php');
$info_func = "module_{$mod}_info";
if (function_exists($info_func)) {
$info = $info_func();
} else {
$info = false;
$file = 'modules/mod-func-' . $mod . '.php';
if (file_exists($file)) {
include_once($file);
$info_func = "module_{$mod}_info";
if (function_exists($info_func)) {
$info = $info_func();
} else {
$info = false;
}
}
?>
tiki_module_params.<?php echo TikiLib::remove_non_word_characters_and_accents($mod) ?> = <?php echo json_encode($info) ?>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment