- if (file_exists($path_to_root.'/modules/'.$id.'/hooks.php')) {
- include_once($path_to_root.'/modules/'.$id.'/hooks.php');
+ $local_module_path = $path_to_root.'/modules/'.clean_file_name($id);
+ $local_config_file = $local_module_path.'/_init/config';
+ $local_hook_file = $local_module_path.'/hooks.php';
+
+ if (file_exists($local_config_file)) {
+ $ctrl = get_control_file($local_config_file);
+ if (key_exists('Name', $ctrl)) $exts[$next_extension_id-1]['name'] = $ctrl['Name'];
+ if (key_exists('Version', $ctrl)) $exts[$next_extension_id-1]['version'] = $ctrl['Version'];
+ }
+ if (file_exists($local_hook_file)) {
+ include_once($local_hook_file);
+