version 1.123.2.2, 2010/09/12 22:12:52
|
version 1.123.2.3, 2010/12/05 21:56:38
|
Line 5437 sub modify_defaults {
|
Line 5437 sub modify_defaults {
|
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); |
my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); |
my @items = ('auth_def','auth_arg_def','lang_def','timezone_def','datelocale_def'); |
my @items = ('auth_def','auth_arg_def','lang_def','timezone_def','datelocale_def'); |
my @authtypes = ('internal','krb4','krb5','localauth'); |
my @authtypes = ('internal','krb4','krb5','localauth'); |
|
my @doms = &Apache::lonnet::current_machine_domains(); |
|
my @langs; |
|
foreach my $dom (@doms) { |
|
if ($dom =~ /^(\w+c)itest$/) { |
|
push (@langs,$1.'t'); |
|
} else { |
|
push(@langs,$dom); |
|
} |
|
} |
foreach my $item (@items) { |
foreach my $item (@items) { |
$newvalues{$item} = $env{'form.'.$item}; |
$newvalues{$item} = $env{'form.'.$item}; |
if ($item eq 'auth_def') { |
if ($item eq 'auth_def') { |
Line 5449 sub modify_defaults {
|
Line 5458 sub modify_defaults {
|
if ($newvalues{$item} ne '') { |
if ($newvalues{$item} ne '') { |
if ($newvalues{$item} =~ /^(\w+)/) { |
if ($newvalues{$item} =~ /^(\w+)/) { |
my $langcode = $1; |
my $langcode = $1; |
if (($langcode ne 'gci') && ($langcode ne 'gct') && |
if ((!grep(/^\Q$langcode\E,@langs)) && |
($langcode ne 'x_chef')) { |
($langcode ne 'x_chef')) { |
if (code2language($langcode) eq '') { |
if (code2language($langcode) eq '') { |
push(@errors,$item); |
push(@errors,$item); |