mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
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:
@@ -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(
|
||||
|
||||
@@ -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});
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user