Fix to prevent endless loop on lib auto-detection; force define to -lib.pl file

Call module override prior theme overrides
This commit is contained in:
Ilia Rostovtsev
2021-04-06 22:19:11 +03:00
parent 3db32b8cfa
commit 575a801c6d
2 changed files with 8 additions and 8 deletions

View File

@@ -1881,7 +1881,7 @@ if ($err) {
# Override function to substitute module's name
sub override_check_variant
{
{
my ($rv) = @_;
my $mysql_version;
chop($mysql_version = &read_file_contents(

View File

@@ -5614,14 +5614,14 @@ if ($rv{'longdesc'}) {
$rv{'index_link'} = 'index.cgi';
}
# Apply module overrides
&get_module_overrides($_[0], \%rv);
# Call theme-specific override function
if (defined(&theme_get_module_info)) {
%rv = &theme_get_module_info(\%rv, $_[0], $_[1], $_[2]);
}
# Apply module overrides
&get_module_overrides($_[0], \%rv);
return %rv;
}
@@ -5639,7 +5639,7 @@ return if (!$mod);
my $mdir = &module_root_directory($mod);
# Call module specific overrides
if (-r "$mdir/module.overrides" && !$main::get_module_overrides_done++) {
if (-r "$mdir/module.overrides") {
my %overrides;
&read_file_cached("$mdir/module.overrides", \%overrides);
my $funcs = $overrides{'funcs'};
@@ -5647,11 +5647,11 @@ if (-r "$mdir/module.overrides" && !$main::get_module_overrides_done++) {
eval {
local $main::error_must_die = 1;
my @funcs = split(/\s+/, $funcs);
&foreign_require($mod);
&foreign_require($mod, "$mod-lib.pl");
foreach my $func (@funcs) {
&foreign_call($mod, $func, \%{$data});
};
}
}
};
}
}
}