version 1.110, 2001/03/20 21:33:37
|
version 1.120, 2001/04/02 16:56:22
|
Line 3
|
Line 3
|
# |
# |
# Functions for use by content handlers: |
# Functions for use by content handlers: |
# |
# |
# metadata_query(sql-query-string) : returns file handle of where sql |
# metadata_query(sql-query-string,custom-metadata-regex) : |
# results will be stored for query |
# returns file handle of where sql and |
|
# regex results will be stored for query |
# plaintext(short) : plain text explanation of short term |
# plaintext(short) : plain text explanation of short term |
# fileembstyle(ext) : embed style in page for file extension |
# fileembstyle(ext) : embed style in page for file extension |
# filedescription(ext) : descriptor text for file extension |
# filedescription(ext) : descriptor text for file extension |
Line 90
|
Line 91
|
# 09/01,10/01,11/01 Gerd Kortemeyer |
# 09/01,10/01,11/01 Gerd Kortemeyer |
# 02/27/01 Scott Harrison |
# 02/27/01 Scott Harrison |
# 3/2 Gerd Kortemeyer |
# 3/2 Gerd Kortemeyer |
# 3/15 Scott Harrison |
# 3/15,3/19 Scott Harrison |
# 3/19,3/20 Gerd Kortemeyer |
# 3/19,3/20 Gerd Kortemeyer |
|
# 3/22,3/27 Scott Harrison |
|
|
package Apache::lonnet; |
package Apache::lonnet; |
|
|
Line 1241 sub definerole {
|
Line 1243 sub definerole {
|
# ---------------- Make a metadata query against the network of library servers |
# ---------------- Make a metadata query against the network of library servers |
|
|
sub metadata_query { |
sub metadata_query { |
my ($query)=@_; |
my ($query,$custom,$customshow)=@_; |
my $reply=&reply("querysend:".&escape($query),'msul3'); |
# need to put in a library server loop here and return a hash |
|
my %rhash; |
|
# for my $server (keys %libserv) { |
|
for my $server ('msul3') { |
|
unless ($custom or $customshow) { |
|
my $reply=&reply("querysend:".&escape($query),$server); |
|
$rhash{$server}=$reply; |
|
} |
|
else { |
|
my $reply=&reply("querysend:".&escape($query).':'. |
|
&escape($custom).':'.&escape($customshow), |
|
$server); |
|
$rhash{$server}=$reply; |
|
} |
|
} |
|
return \%rhash; |
} |
} |
|
|
# ------------------------------------------------------------------ Plain Text |
# ------------------------------------------------------------------ Plain Text |