--- loncom/interface/lonsearchcat.pm 2002/06/24 15:09:52 1.126
+++ loncom/interface/lonsearchcat.pm 2002/06/24 15:26:28 1.127
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.126 2002/06/24 15:09:52 matthew Exp $
+# $Id: lonsearchcat.pm,v 1.127 2002/06/24 15:26:28 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -101,18 +101,6 @@ use Apache::loncommon();
=over 4
-=item %hostdomains
-
-matches host name to host domain
-
-=item %hostips
-
-matches host name to host ip
-
-=item %hitcount
-
-stores number of hits per host
-
=item $closebutton
button that closes the search window
@@ -137,46 +125,13 @@ used in &handler() and is also used in &
######################################################################
######################################################################
-# -- information holders
-my %hostdomains; # matches host name to host domain
-my %hostips; # matches host name to host ip
-my %hitcount; # stores number of hits per host
-
# -- dynamically rendered interface components
my $closebutton; # button that closes the search window
my $importbutton; # button to take the selected results and go to group sorting
# -- miscellaneous variables
-my $yourself; # allows for quickly limiting to oneself
my %hash; # database hash
-
-# ------------------------------------------ choices for different output views
-# Detailed Citation View ---> sub detailed_citation_view
-# Summary View ---> sub summary_view
-# Fielded Format ---> sub fielded_format_view
-# XML/SGML ---> sub xml_sgml_view
-
-#------------------------------------------------------------- global variables
-my $diropendb = "";
-my $domain = "";
-
-# ----------------------------------------------------------------------- BEGIN
-
-=pod
-
-=item BEGIN block
-
-Load %hostdomains and %hostips with data from lonnet.pm. Only library
-servers are considered.
-
-=cut
-
-BEGIN {
- foreach (keys (%Apache::lonnet::libserv)) {
- $hostdomains{$_}=$Apache::lonnet::hostdom{$_};
- $hostips{$_}=$Apache::lonnet::hostip{$_};
- }
-}
+my $diropendb = ""; # db file
######################################################################
######################################################################
@@ -1143,10 +1098,10 @@ CATALOGCONTROLS
return OK;
}
@results=<$fh> if $fh;
- $hitcount{$rkey}=@results+0;
+ my $hits =@results;
&popwin_js($r,'popwin.hc["'.$rkey.'"]='.
- $hitcount{$rkey}.';');
- $hitcountsum+=$hitcount{$rkey};
+ $hits.';');
+ $hitcountsum+=$hits;
&popwin_js($r,'popwin.document.forms.popremain.'.
'numhits.value='.$hitcountsum.';');
} else {
@@ -1547,13 +1502,14 @@ sub make_popwin {
$hcinit.="hc[\"$sk\"]=\"not yet connected...\";";
}
$grid.=" hitcount=".$hc;
- $grid.=" domain=".$hostdomains{$sk};
- $grid.=" IP=".$hostips{$sk};
+ $grid.=" domain=".$Apache::lonnet::hostdom{$sk};
+ $grid.=" IP=".$Apache::lonnet::hostip{$sk};
# '+"'"+'">'+
$grid.="'+\"'\"+')\">'+";
$grid.="\n";
- $grid.="''+\n";
+ $grid.="''+\n";
$grid.="'
'+\n" unless $sn%10;
$sn++;
}
@@ -1943,8 +1899,8 @@ input $r, loncapa server id, and an icon
######################################################################
sub popwin_imgupdate {
my ($r,$server,$icon) = @_;
- &popwin_js($r,'popwin.document.img_'.$hostdomains{$server}.'_'.$server.'.'.
- 'src="/adm/lonIcons/'.$icon.'";');
+ &popwin_js($r,'popwin.document.img_'.$Apache::lonnet::hostdom{$server}.
+ '_'.$server.'.'.'src="/adm/lonIcons/'.$icon.'";');
}
1;