version 1.56, 2001/03/21 03:06:50
|
version 1.59, 2001/03/21 03:40:39
|
Line 107 END
|
Line 107 END
|
{ |
{ |
my $fh=Apache::File->new($r->dir_config('lonTabDir').'/language.tab'); |
my $fh=Apache::File->new($r->dir_config('lonTabDir').'/language.tab'); |
map { |
map { |
$_=~/(\w+)\s+([\w\s\-]+)/; |
$_=~/(\w+)\s+([\w\s\-]+)/; chomp; |
$language{$1}=$2; |
$language{$1}=$2; |
} <$fh>; |
} <$fh>; |
} |
} |
Line 117 END
|
Line 117 END
|
{ |
{ |
my $fh=Apache::File->new($r->dir_config('lonIncludes').'/copyright.tab'); |
my $fh=Apache::File->new($r->dir_config('lonIncludes').'/copyright.tab'); |
map { |
map { |
$_=~/(\w+)\s+([\w\s\-]+)/; |
$_=~/(\w+)\s+([\w\s\-]+)/; chomp; |
$cprtag{$1}=$2; |
$cprtag{$1}=$2; |
} <$fh>; |
} <$fh>; |
} |
} |
Line 127 END
|
Line 127 END
|
{ |
{ |
my $fh=Apache::File->new($r->dir_config('lonTabDir').'/filetypes.tab'); |
my $fh=Apache::File->new($r->dir_config('lonTabDir').'/filetypes.tab'); |
map { |
map { |
$_=~/(\w+)\s+(\w+)\s+([\w\s\-]+)/; |
$_=~/(\w+)\s+(\w+)\s+([\w\s\-]+)/; chomp; |
$mimetag{$1}=".$1 $3"; |
$mimetag{$1}=".$1 $3"; |
} <$fh>; |
} <$fh>; |
} |
} |
Line 494 sub advancedsearch {
|
Line 494 sub advancedsearch {
|
|
|
my @queries; |
my @queries; |
# Go through logical expression AND/OR/NOT phrase fields. |
# Go through logical expression AND/OR/NOT phrase fields. |
foreach my $field ('title','author','subject','notes','abstract') { |
|
|
foreach my $field ('title','author','subject','notes','abstract','url', |
|
'keywords','version','owner') { |
if ($ENV{'form.'.$field}) { |
if ($ENV{'form.'.$field}) { |
push @queries,&build_SQL_query($field,$ENV{'form.'.$field}); |
push @queries,&build_SQL_query($field,$ENV{'form.'.$field}); |
} |
} |
} |
} |
|
if ($ENV{'form.language'} and $ENV{'form.language'} ne 'any') { |
|
push @queries,"(language like \"\%$ENV{'form.language'}\%\")"; |
|
} |
|
if ($ENV{'form.mime'} and $ENV{'form.mime'} ne 'any') { |
|
push @queries,"(mime like \"\%$ENV{'form.mime'}\%\")"; |
|
} |
|
if ($ENV{'form.copyright'} and $ENV{'form.copyright'} ne 'any') { |
|
push @queries,"(copyright like \"\%$ENV{'form.copyright'}\%\")"; |
|
} |
if (@queries) { |
if (@queries) { |
$query=join(" and ",@queries); |
$query=join(" AND ",@queries); |
$query="select * from metadata where $query"; |
$query="select * from metadata where $query"; |
my $reply=&Apache::lonnet::metadata_query($query); |
my $reply=&Apache::lonnet::metadata_query($query); |
&output_results('Advanced',$r,$envhash,$query,$reply); |
&output_results('Advanced',$r,$envhash,$query,$reply); |
Line 784 sub detailed_citation_view {
|
Line 795 sub detailed_citation_view {
|
$notes,$shortabstract,$mime,$lang, |
$notes,$shortabstract,$mime,$lang, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$creationdate,$lastrevisiondate,$owner,$copyright, |
$hostname,$httphost)=@_; |
$hostname,$httphost)=@_; |
return 'abc'; |
|
my $result=<<END; |
my $result=<<END; |
<i>$owner</i>, last revised $lastrevisiondate |
<i>$owner</i>, last revised $lastrevisiondate |
<h3><A HREF="http://$httphost$url" TARGET='search_preview'>$title</A></h3> |
<h3><A HREF="http://$httphost$url" TARGET='search_preview'>$title</A></h3> |
Line 855 sub xml_sgml_view {
|
Line 865 sub xml_sgml_view {
|
my $result=<<END; |
my $result=<<END; |
<pre> |
<pre> |
<LonCapaResource> |
<LonCapaResource> |
<url>http://$httphost$url</url> |
<url>$url</url> |
<title>$title</title> |
<title>$title</title> |
<author>$author</author> |
<author>$author</author> |
<subject>$subject</subject> |
<subject>$subject</subject> |
Line 878 sub xml_sgml_view {
|
Line 888 sub xml_sgml_view {
|
</copyrightInfo> |
</copyrightInfo> |
<repositoryLocation>$hostname</repositoryLocation> |
<repositoryLocation>$hostname</repositoryLocation> |
<shortabstract>$shortabstract</shortabstract> |
<shortabstract>$shortabstract</shortabstract> |
|
</LonCapaResource> |
</pre> |
</pre> |
END |
END |
return $result; |
return $result; |