--- loncom/lonnet/perl/lonnet.pm 2003/03/07 23:45:31 1.336 +++ loncom/lonnet/perl/lonnet.pm 2003/03/14 02:26:12 1.338 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.336 2003/03/07 23:45:31 albertel Exp $ +# $Id: lonnet.pm,v 1.338 2003/03/14 02:26:12 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3018,6 +3018,7 @@ sub EXT { if ($part eq '') { $part='0'; } my $partgeneral=&EXT('resource.'.$part.'.'.$qualifierrest, $symbparm,$udom,$uname); + if (defined($partgeneral)) { return $partgeneral; } } # ---------------------------------------------------- Any other user namespace @@ -3183,7 +3184,25 @@ sub metadata { # the next is the end of "start tag" } } - $metacache{$uri.':keys'}=join(',',keys %metathesekeys); +# are there custom rights to evaluate + if ($metacache{$uri.':copyright'} eq 'custom') { + + # + # Importing a rights file here + # + unless ($depthcount) { + my $location=$metacache{$uri.':customdistributionfile'}; + my $dir=$filename; + $dir=~s|[^/]*$||; + $location=&filelocation($dir,$location); + foreach (sort(split(/\,/,&metadata($uri,'keys', + $location,'_rights', + $depthcount+1)))) { + $metathesekeys{$_}=1; + } + } + } + $metacache{$uri.':keys'}=join(',',keys %metathesekeys); &metadata_generate_part0(\%metathesekeys,\%metacache,$uri); $metacache{$uri.':allpossiblekeys'}=join(',',keys %metathesekeys); $metacache{$uri.':cachedtimestamp'}=time;