version 1.1129, 2011/08/09 01:35:24
|
version 1.1132, 2011/09/16 22:24:01
|
Line 348 sub get_remote_globals {
|
Line 348 sub get_remote_globals {
|
|
|
sub remote_devalidate_cache { |
sub remote_devalidate_cache { |
my ($lonhost,$name,$id) = @_; |
my ($lonhost,$name,$id) = @_; |
my $response = &reply('devalidatecache',&escape($name).':'.&escape($id),$lonhost); |
my $response = &reply('devalidatecache:'.&escape($name).':'.&escape($id),$lonhost); |
return $response; |
return $response; |
} |
} |
|
|
Line 1242 sub check_loadbalancing {
|
Line 1242 sub check_loadbalancing {
|
my %domconfig = |
my %domconfig = |
&Apache::lonnet::get_dom('configuration',['loadbalancing'],$dom_in_use); |
&Apache::lonnet::get_dom('configuration',['loadbalancing'],$dom_in_use); |
if (ref($domconfig{'loadbalancing'}) eq 'HASH') { |
if (ref($domconfig{'loadbalancing'}) eq 'HASH') { |
$result = &do_cache_new('loadbalancing',$dom_in_use,$domconfig{'usersessions'}{'loadbalancing'},$cachetime); |
$result = &do_cache_new('loadbalancing',$dom_in_use,$domconfig{'loadbalancing'},$cachetime); |
} |
} |
} |
} |
if (ref($result) eq 'HASH') { |
if (ref($result) eq 'HASH') { |
Line 1308 sub check_loadbalancing {
|
Line 1308 sub check_loadbalancing {
|
my %domconfig = |
my %domconfig = |
&Apache::lonnet::get_dom('configuration',['loadbalancing'],$serverhomedom); |
&Apache::lonnet::get_dom('configuration',['loadbalancing'],$serverhomedom); |
if (ref($domconfig{'loadbalancing'}) eq 'HASH') { |
if (ref($domconfig{'loadbalancing'}) eq 'HASH') { |
$result = &do_cache_new('loadbalancing',$dom_in_use,$domconfig{'usersessions'}{'loadbalancing'},$cachetime); |
$result = &do_cache_new('loadbalancing',$dom_in_use,$domconfig{'loadbalancing'},$cachetime); |
} |
} |
} |
} |
if (ref($result) eq 'HASH') { |
if (ref($result) eq 'HASH') { |
Line 3986 sub hashref2str {
|
Line 3986 sub hashref2str {
|
$result.='='; |
$result.='='; |
#print("Got a ref of ".(ref($key))." skipping."); |
#print("Got a ref of ".(ref($key))." skipping."); |
} else { |
} else { |
if ($key) {$result.=&escape($key).'=';} else { last; } |
if (defined($key)) {$result.=&escape($key).'=';} else { last; } |
} |
} |
|
|
if(ref($hashref->{$key}) eq 'ARRAY') { |
if(ref($hashref->{$key}) eq 'ARRAY') { |
Line 7075 sub assignrole {
|
Line 7075 sub assignrole {
|
return 'refused'; |
return 'refused'; |
} |
} |
} |
} |
|
} elsif ($role eq 'au') { |
|
if ($url ne '/'.$udom.'/') { |
|
&logthis('Attempt by '.$env{'user.name'}.':'.$env{'user.domain'}. |
|
' to assign author role for '.$uname.':'.$udom. |
|
' in domain: '.$url.' refused (wrong domain).'); |
|
return 'refused'; |
|
} |
} |
} |
$mrole=$role; |
$mrole=$role; |
} |
} |