version 1.923, 2007/11/10 03:51:10
|
version 1.924, 2007/11/13 22:19:53
|
Line 6801 sub metadata {
|
Line 6801 sub metadata {
|
if (($uri eq '') || |
if (($uri eq '') || |
(($uri =~ m|^/*adm/|) && |
(($uri =~ m|^/*adm/|) && |
($uri !~ m|^adm/includes|) && ($uri !~ m|/bulletinboard$|)) || |
($uri !~ m|^adm/includes|) && ($uri !~ m|/bulletinboard$|)) || |
($uri =~ m|/$|) || ($uri =~ m|/.meta$|) || ($uri =~ /^~/) || |
($uri =~ m|/$|) || ($uri =~ m|/.meta$|) ) { |
($uri =~ m|home/$match_username/public_html/|)) { |
return undef; |
|
} |
|
if (($uri =~ /^~/ || $uri =~ m{home/$match_username/public_html/}) |
|
&& &Apache::lonxml::get_state('target') =~ /^(|meta)$/) { |
return undef; |
return undef; |
} |
} |
my $filename=$uri; |
my $filename=$uri; |
Line 6823 sub metadata {
|
Line 6826 sub metadata {
|
# if (! exists($metacache{$uri})) { |
# if (! exists($metacache{$uri})) { |
# $metacache{$uri}={}; |
# $metacache{$uri}={}; |
# } |
# } |
|
my $cachetime = 60*60; |
if ($liburi) { |
if ($liburi) { |
$liburi=&declutter($liburi); |
$liburi=&declutter($liburi); |
$filename=$liburi; |
$filename=$liburi; |
Line 6833 sub metadata {
|
Line 6837 sub metadata {
|
my %metathesekeys=(); |
my %metathesekeys=(); |
unless ($filename=~/\.meta$/) { $filename.='.meta'; } |
unless ($filename=~/\.meta$/) { $filename.='.meta'; } |
my $metastring; |
my $metastring; |
if ($uri !~ m -^(editupload)/-) { |
if ($uri =~ /^~/ || $uri =~ m{home/$match_username/public_html/}) { |
|
$metastring = |
|
&Apache::lonnet::ssi_body(&hreflocation('','/'.$uri), |
|
('grade_target' => 'meta')); |
|
$cachetime = 1; # only want this cached in the child not long term |
|
} elsif ($uri !~ m -^(editupload)/-) { |
my $file=&filelocation('',&clutter($filename)); |
my $file=&filelocation('',&clutter($filename)); |
#push(@{$metaentry{$uri.'.file'}},$file); |
#push(@{$metaentry{$uri.'.file'}},$file); |
$metastring=&getfile($file); |
$metastring=&getfile($file); |
Line 7000 sub metadata {
|
Line 7009 sub metadata {
|
$metaentry{':keys'} = join(',',keys(%metathesekeys)); |
$metaentry{':keys'} = join(',',keys(%metathesekeys)); |
&metadata_generate_part0(\%metathesekeys,\%metaentry,$uri); |
&metadata_generate_part0(\%metathesekeys,\%metaentry,$uri); |
$metaentry{':allpossiblekeys'}=join(',',keys %metathesekeys); |
$metaentry{':allpossiblekeys'}=join(',',keys %metathesekeys); |
&do_cache_new('meta',$uri,\%metaentry,60*60); |
&do_cache_new('meta',$uri,\%metaentry,$cachetime); |
# this is the end of "was not already recently cached |
# this is the end of "was not already recently cached |
} |
} |
return $metaentry{':'.$what}; |
return $metaentry{':'.$what}; |