mirror of
https://github.com/webmin/webmin.git
synced 2026-02-13 10:22:59 +00:00
Add field to enable lang file pre-caching
This commit is contained in:
@@ -85,6 +85,18 @@ if (defined($in{'preload'})) {
|
||||
&save_preloads(\%miniserv, [ ]);
|
||||
}
|
||||
|
||||
# Save pre-cache option
|
||||
if ($in{'precache_mode'} == 0) {
|
||||
$miniserv{'precache'} = 'none';
|
||||
}
|
||||
elsif ($in{'precache_mode'} == 1) {
|
||||
$miniserv{'precache'} = '';
|
||||
}
|
||||
else {
|
||||
$in{'precache'} =~ /\S/ || &error($text{'advanced_eprecache'});
|
||||
$miniserv{'precache'} = $in{'precache'};
|
||||
}
|
||||
|
||||
# Save password pass option
|
||||
$miniserv{'pass_password'} = $in{'pass'};
|
||||
|
||||
|
||||
@@ -52,6 +52,17 @@ elsif ($preloads[0]->[0] eq "main" && $preloads[0]->[1] eq "web-lib-funcs.pl") {
|
||||
&ui_yesno_radio("preload", 1));
|
||||
}
|
||||
|
||||
# Files to pre-cache
|
||||
$mode = $miniserv{'precache'} eq 'none' ? 0 :
|
||||
$miniserv{'precache'} eq '' ? 1 : 2;
|
||||
print &ui_table_row($text{'advanced_precache'},
|
||||
&ui_radio("precache_mode", $mode,
|
||||
[ [ 0, $text{'advanced_precache0'}."<br>" ],
|
||||
[ 1, $text{'advanced_precache1'}."<br>" ],
|
||||
[ 2, &text('advanced_precache2',
|
||||
&ui_textbox("precache",
|
||||
$mode == 2 ? $miniserv{'precache'} : "", 40)) ] ]));
|
||||
|
||||
# Show call stack on error
|
||||
print &ui_table_row($text{'advanced_stack'},
|
||||
&ui_yesno_radio("stack", int($gconfig{'error_stack'})));
|
||||
|
||||
@@ -771,6 +771,11 @@ advanced_tempdelete=Maximum age of temporary files
|
||||
advanced_nodelete=Unlimited
|
||||
advanced_days=days
|
||||
advanced_preload=Pre-load Webmin functions library?
|
||||
advanced_precache=Text files to pre-cache?
|
||||
advanced_precache0=None
|
||||
advanced_precache1=English language text files
|
||||
advanced_precache2=Files matching shell patterns $1
|
||||
advanced_eprecache=Missing list of shell patterns to pre-cache
|
||||
advanced_err=Failed to save advanced options
|
||||
advanced_etemp=Missing or non-existant temporary files directory
|
||||
advanced_etdir=Missing or non-existant temporary files directory for $1
|
||||
|
||||
Reference in New Issue
Block a user