mirror of
https://github.com/webmin/webmin.git
synced 2026-09-15 01:50:39 +01:00
Use new module
This commit is contained in:
@@ -75,9 +75,14 @@ if (defined($in{'sclass'})) {
|
||||
&unlock_file("$config_directory/config");
|
||||
|
||||
if (defined($in{'preload'})) {
|
||||
# Save preload option
|
||||
@preload = $in{'preload'} ? ( [ "main", "web-lib-funcs.pl" ] ) : ( );
|
||||
&save_preloads(\%miniserv, \@preload);
|
||||
# Save preload option, forcing new mode
|
||||
if ($in{'preload'}) {
|
||||
$miniserv{'premodules'} = 'WebminCore';
|
||||
}
|
||||
else {
|
||||
delete($miniserv{'premodules'});
|
||||
}
|
||||
&save_preloads(\%miniserv, [ ]);
|
||||
}
|
||||
|
||||
# Save password pass option
|
||||
|
||||
@@ -39,11 +39,17 @@ $ttable .= &ui_columns_end();
|
||||
print &ui_table_row($text{'advanced_tempmods'}, $ttable);
|
||||
|
||||
@preloads = &get_preloads(\%miniserv);
|
||||
if (!@preloads ||
|
||||
$preloads[0]->[0] eq "main" && $preloads[0]->[1] eq "web-lib-funcs.pl") {
|
||||
# Only show preload option if in supported mode
|
||||
if (!@preloads && (!$miniserv{'premodules'} ||
|
||||
$miniserv{'premodules'} eq 'WebminCore')) {
|
||||
# New-style preload possible or enabled
|
||||
print &ui_table_row($text{'advanced_preload'},
|
||||
&ui_yesno_radio("preload", @preloads ? 1 : 0));
|
||||
&ui_yesno_radio("preload",
|
||||
$miniserv{'premodules'} eq 'WebminCore'));
|
||||
}
|
||||
elsif ($preloads[0]->[0] eq "main" && $preloads[0]->[1] eq "web-lib-funcs.pl") {
|
||||
# Old-style preloads enabled
|
||||
print &ui_table_row($text{'advanced_preload'},
|
||||
&ui_yesno_radio("preload", 1));
|
||||
}
|
||||
|
||||
# Show call stack on error
|
||||
|
||||
Reference in New Issue
Block a user