--- loncom/interface/lonsearchcat.pm 2009/10/06 10:31:41 1.315
+++ loncom/interface/lonsearchcat.pm 2010/05/04 15:21:26 1.322
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.315 2009/10/06 10:31:41 bisitz Exp $
+# $Id: lonsearchcat.pm,v 1.322 2010/05/04 15:21:26 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -118,8 +118,6 @@ sub handler {
# This is set and used in &handler() and is also used in
# &output_results().
- my $loaderror=&Apache::lonnet::overloaderror($r);
- if ($loaderror) { return $loaderror; }
#
my $closebutton; # button that closes the search window
# This button is different for the RAT compared to
@@ -324,7 +322,7 @@ END
&Apache::lonhtmlcommon::add_breadcrumb
({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check().
'&phase=disp_adv'.
- 'catalogmode='.$env{'form.catalogmode'}.
+ '&catalogmode='.$env{'form.catalogmode'}.
'&launch='.$env{'form.launch'}.
'&mode='.$env{'form.mode'},
text=>"Course Search",
@@ -492,7 +490,7 @@ sub course_search {
&Apache::lonhtmlcommon::add_breadcrumb
({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check().
'&phase=disp_adv'.
- 'catalogmode='.$env{'form.catalogmode'}.
+ '&catalogmode='.$env{'form.catalogmode'}.
'&launch='.$env{'form.launch'}.
'&mode='.$env{'form.mode'},
text=>"Course Search",
@@ -770,14 +768,26 @@ sub setup_basic_search {
portfolio => 'Portfolio Search',
);
my ($userelatedwords,$onlysearchdomain,$inclext,$adv_search_link,$scrout);
- $userelatedwords = '';
- $onlysearchdomain = '';
+
+ $userelatedwords = '';
+
+ $onlysearchdomain = '';
+
$adv_search_link = '".$_." ";
}
- my %servers = &Apache::lonnet::get_servers(\@allowed_domains,
+ my %servers = &Apache::lonnet::get_unique_servers(\@allowed_domains,
'library');
$libraries_to_query = [keys(%servers)];
}
@@ -2581,7 +2591,7 @@ END
@Servers_to_contact = ($serverlist);
}
} else {
- my %all_library_servers = &Apache::lonnet::all_library();
+ my %all_library_servers = &Apache::lonnet::unique_library();
@Servers_to_contact = sort(keys(%all_library_servers));
}
my %Server_status;
@@ -3541,7 +3551,7 @@ sub detailed_citation_view {
$result .= ''.&mt($field->{'translate'}).'';
foreach my $item (split(',',$values{$field->{'name'}})){
$item = &Apache::lonnet::clutter($item);
- $result .= &display_url($item,[2,0,1]);
+ $result .= '
'.&display_url($item,1).'
';
}
} elsif (exists($field->{'format'}) && $field->{'format'} ne ''){
$result.= &mt($field->{'translate'},
@@ -3549,7 +3559,7 @@ sub detailed_citation_view {
$values{$field->{'name'}}))."
\n";
} else {
if ($field->{'special'} eq 'url link') {
- $result .= &display_url($jumpurl,[3,0,1]);
+ $result .= '
'.&display_url($jumpurl,1).'
';
} else {
$result.= &mt($field->{'translate'},
$values{$field->{'name'}});
@@ -3603,7 +3613,7 @@ sub summary_view {
}
my $jumpurl=$values{'url'};
$jumpurl=~s|^/ext/|http://|;
- my $link = &display_url($jumpurl,[2,0,1]);
+ my $link = '
'.&display_url($jumpurl,1).'
';
$result.=<';
@@ -3658,7 +3668,7 @@ sub compact_view {
}
sub display_url {
- my ($url,$crumb_args) = @_;
+ my ($url,$skiplast) = @_;
my $link;
if ($url=~m|^/ext/|) {
$url=~s|^/ext/|http://|;
@@ -3666,10 +3676,12 @@ sub display_url {
} elsif ($url=~m{^(http://|/uploaded/)}) {
$link=''.$url.'';
} else {
- $link=&Apache::lonhtmlcommon::crumbs($url,
- 'preview',
- '',
- (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),@{$crumb_args}).' ';
+ $link=&Apache::lonhtmlcommon::crumbs(
+ $url,
+ 'preview',
+ '',
+ (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),
+ $skiplast).' ';
}
return $link;
}