version 1.976, 2008/12/08 23:00:47
|
version 1.976.2.1, 2008/12/18 17:43:53
|
Line 4375 sub is_portfolio_file {
|
Line 4375 sub is_portfolio_file {
|
} |
} |
|
|
sub usertools_access { |
sub usertools_access { |
my ($uname,$udom,$tool) = @_; |
my ($uname,$udom,$tool,$action) = @_; |
my $access; |
my $access; |
my %tools = ( |
my %tools = ( |
aboutme => 1, |
aboutme => 1, |
Line 4389 sub usertools_access {
|
Line 4389 sub usertools_access {
|
$uname = $env{'user.name'}; |
$uname = $env{'user.name'}; |
} |
} |
|
|
my $hashid=$uname.':'.$udom; |
if (($udom eq $env{'user.domain'}) && ($uname eq $env{'user.name'})) { |
my ($result,$cached) = &is_cached_new('usertools.'.$tool,$hashid); |
if ($action ne 'reload') { |
if (defined($cached)) { |
return $env{'environment.availabletools.'.$tool}; |
return $result; |
} |
} |
} |
|
|
my ($toolstatus,$inststatus); |
my ($toolstatus,$inststatus); |
Line 4412 sub usertools_access {
|
Line 4412 sub usertools_access {
|
} else { |
} else { |
$access = 0; |
$access = 0; |
} |
} |
&do_cache_new('usertools.'.$tool,$hashid,$access,600); |
|
return $access; |
return $access; |
} |
} |
|
|
Line 4426 sub usertools_access {
|
Line 4425 sub usertools_access {
|
} else { |
} else { |
$access = 0; |
$access = 0; |
} |
} |
&do_cache_new('usertools.'.$tool,$hashid,$access,600); |
|
return $access; |
return $access; |
} |
} |
} |
} |
Line 4447 sub usertools_access {
|
Line 4445 sub usertools_access {
|
} elsif ($hasnoaccess) { |
} elsif ($hasnoaccess) { |
$access = 0; |
$access = 0; |
} |
} |
&do_cache_new('usertools.'.$tool,$hashid,$access,600); |
|
return $access; |
return $access; |
} |
} |
} else { |
} else { |
Line 4457 sub usertools_access {
|
Line 4454 sub usertools_access {
|
} elsif ($domdef{$tool}{'default'} == 0) { |
} elsif ($domdef{$tool}{'default'} == 0) { |
$access = 0; |
$access = 0; |
} |
} |
&do_cache_new('usertools.'.$tool,$hashid,$access,600); |
|
return $access; |
return $access; |
} |
} |
} |
} |
} else { |
} else { |
$access = 1; |
$access = 1; |
&do_cache_new('usertools.'.$tool,$hashid,$access,600); |
|
return $access; |
return $access; |
} |
} |
} |
} |