version 1.76.2.5, 2008/12/26 16:34:43
|
version 1.76.2.6, 2008/12/26 22:27:24
|
Line 1329 sub print_quotas {
|
Line 1329 sub print_quotas {
|
'" value="_LC_adv" '.$checked.'/>'.$titles{$item}. |
'" value="_LC_adv" '.$checked.'/>'.$titles{$item}. |
'</label></span> '; |
'</label></span> '; |
} |
} |
$datatable .= '('.&mt('overrides affiliation').')</td></tr>'; |
$datatable .= '<span class="LC_nobreak">('.&mt('overrides affiliation'). |
|
')</span></td></tr>'; |
$$rowtotal += $typecount; |
$$rowtotal += $typecount; |
return $datatable; |
return $datatable; |
} |
} |
Line 4976 sub modify_serverstatuses {
|
Line 4977 sub modify_serverstatuses {
|
my %serverstatushash = ( |
my %serverstatushash = ( |
serverstatuses => \%newserverstatus, |
serverstatuses => \%newserverstatus, |
); |
); |
my $putresult = &Apache::lonnet::put_dom('configuration',\%serverstatushash, |
|
$dom); |
|
my %changes; |
my %changes; |
foreach my $type (@pages) { |
foreach my $type (@pages) { |
if (ref($currserverstatus{$type}) eq 'HASH') { |
foreach my $setting ('namedusers','machines') { |
my @currnamed = split(/,/,$currserverstatus{$type}{'namedusers'}); |
my (@current,@new); |
my @newusers = split(/,/,$newserverstatus{$type}{'namedusers'}); |
if (ref($currserverstatus{$type}) eq 'HASH') { |
foreach my $item (@currnamed) { |
if ($currserverstatus{$type}{$setting} ne '') { |
if (!grep(/^\Q$item\E$/,@newusers)) { |
@current = split(/,/,$currserverstatus{$type}{$setting}); |
$changes{$type}{'namedusers'} = 1; |
} |
last; |
} |
} |
if ($newserverstatus{$type}{$setting} ne '') { |
} |
@new = split(/,/,$newserverstatus{$type}{$setting}); |
foreach my $item (@newusers) { |
} |
if (!grep(/^\Q$item\E$/,@currnamed)) { |
if (@current > 0) { |
$changes{$type}{'namedusers'} = 1; |
if (@new > 0) { |
last; |
foreach my $item (@current) { |
} |
if (!grep(/^\Q$item\E$/,@new)) { |
} |
$changes{$type}{$setting} = 1; |
my @currmachines = split(/,/,$currserverstatus{$type}{'machines'}); |
|
my @newmachines = split(/,/,$newserverstatus{$type}{'machines'}); |
|
if (@currmachines > 0) { |
|
if (@newmachines > 0) { |
|
foreach my $item (@currmachines) { |
|
if (!grep(/^\Q$item\E$/,@newmachines)) { |
|
$changes{$type}{'machines'} = 1; |
|
last; |
last; |
} |
} |
} |
} |
foreach my $item (@newmachines) { |
foreach my $item (@new) { |
if (!grep(/^\Q$item\E$/,@currmachines)) { |
if (!grep(/^\Q$item\E$/,@current)) { |
$changes{$type}{'machines'} = 1; |
$changes{$type}{$setting} = 1; |
last; |
last; |
} |
} |
} |
} |
} else { |
} else { |
$changes{$type}{'machines'} = 1; |
$changes{$type}{$setting} = 1; |
} |
} |
} elsif (@newmachines > 0) { |
} elsif (@new > 0) { |
$changes{$type}{'machines'} = 1; |
$changes{$type}{$setting} = 1; |
} |
} |
} |
} |
} |
} |
Line 5026 sub modify_serverstatuses {
|
Line 5018 sub modify_serverstatuses {
|
if ($putresult eq 'ok') { |
if ($putresult eq 'ok') { |
$resulttext .= &mt('Changes made:').'<ul>'; |
$resulttext .= &mt('Changes made:').'<ul>'; |
foreach my $type (@pages) { |
foreach my $type (@pages) { |
if (defined($changes{$type})) { |
if (ref($changes{$type}) eq 'HASH') { |
$resulttext .= '<li>'.$titles->{$type}.'<ul>'; |
$resulttext .= '<li>'.$titles->{$type}.'<ul>'; |
if (defined($changes{$type}{'namedusers'})) { |
if ($changes{$type}{'namedusers'}) { |
if ($newserverstatus{$type}{'namedusers'} eq '') { |
if ($newserverstatus{$type}{'namedusers'} eq '') { |
$resulttext .= '<li>'.&mt("Access terminated for all specific (named) users").'</li>'."\n"; |
$resulttext .= '<li>'.&mt("Access terminated for all specific (named) users").'</li>'."\n"; |
} else { |
} else { |
$resulttext .= '<li>'.&mt("Access available for the following specified users: ").$newserverstatus{$type}{'namedusers'}.'</li>'."\n"; |
$resulttext .= '<li>'.&mt("Access available for the following specified users: ").$newserverstatus{$type}{'namedusers'}.'</li>'."\n"; |
} |
} |
} elsif (defined($changes{$type}{'machines'})) { |
} |
|
if ($changes{$type}{'machines'}) { |
if ($newserverstatus{$type}{'machines'} eq '') { |
if ($newserverstatus{$type}{'machines'} eq '') { |
$resulttext .= '<li>'.&mt("Access terminated for all specific IP addresses").'</li>'."\n"; |
$resulttext .= '<li>'.&mt("Access terminated for all specific IP addresses").'</li>'."\n"; |
} else { |
} else { |