*/
public static function setModuleFile($file_path)
{
- if (!file_exists($file_path)) {
+ if (!is_readable($file_path)) {
throw new Exception(Core\L10n::t('Legacy module file not found: %s', $file_path));
}
$function_name = static::$moduleName . '_' . $function_suffix;
if (\function_exists($function_name)) {
- return $function_name(self::getApp());
+ $a = self::getApp();
+ return $function_name($a);
} else {
return parent::{$function_suffix}();
}