version 1.123.2.3, 2010/12/05 21:56:38
|
version 1.123.2.4, 2010/12/06 17:50:40
|
Line 5440 sub modify_defaults {
|
Line 5440 sub modify_defaults {
|
my @doms = &Apache::lonnet::current_machine_domains(); |
my @doms = &Apache::lonnet::current_machine_domains(); |
my @langs; |
my @langs; |
foreach my $dom (@doms) { |
foreach my $dom (@doms) { |
if ($dom =~ /^(\w+c)itest$/) { |
if ($dom =~ /^(\w{2})\w?itest$/) { |
push (@langs,$1.'t'); |
push (@langs,$1.'t'); |
} else { |
} elsif ($dom =~ /^(\w{2})\w?i$/) { |
push(@langs,$dom); |
push(@langs,$1.'i'); |
} |
} |
} |
} |
foreach my $item (@items) { |
foreach my $item (@items) { |
Line 5458 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 ((!grep(/^\Q$langcode\E,@langs)) && |
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); |