--- loncom/interface/lonsearchcat.pm 2011/01/27 14:38:44 1.328 +++ loncom/interface/lonsearchcat.pm 2012/05/10 18:34:18 1.331.4.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.328 2011/01/27 14:38:44 wenzelju Exp $ +# $Id: lonsearchcat.pm,v 1.331.4.1 2012/05/10 18:34:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -78,7 +78,6 @@ use HTML::Entities(); use Parse::RecDescent; use Apache::lonnavmaps; use Apache::lonindexer(); -use Apache::lonwishlist(); use LONCAPA; ###################################################################### @@ -152,7 +151,8 @@ sub handler { ## Initialize global variables ## my $domain = $r->dir_config('lonDefDomain'); - $diropendb= "/home/httpd/perl/tmp/". + my $temp_file_dir = LONCAPA::tempdir(); + $diropendb= $temp_file_dir . "$env{'user.domain'}_$env{'user.name'}_sel_res.db"; # # set the name of the persistent database @@ -163,7 +163,7 @@ sub handler { $env{'form.persistent_db_id'} = time; } - my $persistent_db_file = "/home/httpd/perl/tmp/". + my $persistent_db_file = $temp_file_dir . &escape($domain). '_'.&escape($env{'user.name'}). '_'.$env{'form.persistent_db_id'}.'_persistent_search.db'; @@ -2383,7 +2383,10 @@ END next; } $status=~s|/||g; - my $datafile=$r->dir_config('lonDaemons').'/tmp/'.$status; + + + + my $datafile=LONCAPA::tempdir().$status; if (-e $datafile && ! -e "$datafile.end") { &update_status($r,&mt('Receiving results from [_1]',$server)); next; @@ -3059,25 +3062,8 @@ SCRIPT SCRIPT - my $wishlistpopup; - if (&Apache::lonwishlist::getWishlist() ne 'error') { - $wishlistpopup = &Apache::lonwishlist::makePopUpNewLink(); - } - - # Add JavaScript-function to set link for a ressource to wishlist - $js.=< -// - -SCRIPT - my $start_page = &Apache::loncommon::start_page(undef,$js, - {'only_body' =>1}); + {'only_body' =>1,}); my $result=< @@ -3196,11 +3182,7 @@ sub detailed_citation_view { $result .= ''.$prefix. ''.' '. ''.$values{'title'}."\n". - ''. - ''; + 'target="preview">'.$values{'title'}."\n"; $result .= "

\n"; $result .= ''.$values{'author'}.','. ' '.$values{'owner'}.'
'; @@ -3331,15 +3313,9 @@ sub summary_view { $jumpurl=~s|^/ext/|http://|; my $link = '
'.&display_url($jumpurl,1).'
'; - my $titleWL = &mt('Set link to wishlist'); $result.=<$values{'title'} - - set wishlistlink -
$link
$values{'author'}, $values{'owner'} -- $values{'lastrevisiondate'}
@@ -3386,11 +3362,6 @@ sub compact_view { $result.=' '. ''. &HTML::Entities::encode($values{'title'},'<>&"').' '. - ''. - ''. - ''. $link.' '.$values{'author'}.' ('.$values{'domain'}.')'; return $result; } @@ -3432,18 +3403,12 @@ sub fielded_format_view { my $jumpurl=$values{'url'}; $jumpurl=~s|^/ext/|http://|; - my $titleWL = ('Set link to wishlist'); my $result=<

URL:
$values{'url'} - - set wishlistlink -
END foreach my $field ('title','author','domain','subject','keywords','notes',