Restoring compressed sql files sometimes failed due to nasty bug in php gzfile function.
[fa-stable.git] / admin / inst_module.php
index f92d2c56aef4d53ae7ddf5de89a39818a00c6b0c..77a16cbd5ba85b1536fa8676b49ffa56a7fa1889 100644 (file)
@@ -42,8 +42,8 @@ function local_extension($id)
                        'active' => false
        );
 
-       if (file_exists($path_to_root.'/modules/'.$id.'/hooks.php')) {
-               include_once($path_to_root.'/modules/'.$id.'/hooks.php');
+       if (file_exists($path_to_root.'/modules/'.clean_file_name($id).'/hooks.php')) {
+               include_once($path_to_root.'/modules/'.clean_file_name($id).'/hooks.php');
        }
        $hooks_class = 'hooks_'.$id;
        if (class_exists($hooks_class, false)) {