mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Remove size option in Authentic as it's pointless, resize does it all
This commit is contained in:
@@ -56,8 +56,9 @@ $conf_rows_n = int($conf_rows_n);
|
||||
my $env_cols = $conf_cols_n || $def_cols_n;
|
||||
my $env_rows = $conf_rows_n || $def_rows_n;
|
||||
|
||||
# Set columns and rows environment vars only in fixed mode
|
||||
if ($conf_cols_n && $conf_rows_n) {
|
||||
# Set columns and rows environment vars only
|
||||
# in fixed mode, and only for old themes
|
||||
if ($conf_cols_n && $conf_rows_n && !$xmlhr) {
|
||||
$ENV{'COLUMNS'} = $conf_cols_n;
|
||||
$ENV{'LINES'} = $conf_rows_n;
|
||||
}
|
||||
|
||||
@@ -6,4 +6,29 @@ use WebminCore;
|
||||
our %access = &get_module_acl();
|
||||
do "$module_root_directory/websockets-lib-funcs.pl";
|
||||
|
||||
# config_pre_load(mod-info-ref, [mod-order-ref])
|
||||
# Check if some config options are conditional,
|
||||
# and if not allowed, remove them from listing
|
||||
sub config_pre_load
|
||||
{
|
||||
my ($modconf_info, $modconf_order) = @_;
|
||||
|
||||
if ($ENV{'HTTP_X_REQUESTED_WITH'} eq "XMLHttpRequest") {
|
||||
|
||||
# Process forbidden keys
|
||||
my @forbidden_keys;
|
||||
|
||||
# Size is not supported in Authentic, because resize works flawlessly and
|
||||
# making it work would just add addition complexity for no good reason
|
||||
push(@forbidden_keys, 'size');
|
||||
|
||||
# Remove forbidden from display
|
||||
foreach my $fkey (@forbidden_keys) {
|
||||
delete($modconf_info->{$fkey});
|
||||
@{$modconf_order} = grep { $_ ne $fkey } @{$modconf_order}
|
||||
if ($modconf_order);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
Reference in New Issue
Block a user