--- loncom/interface/lonsearchcat.pm 2011/01/17 20:18:02 1.327 +++ 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.327 2011/01/17 20:18:02 www Exp $ +# $Id: lonsearchcat.pm,v 1.331.4.1 2012/05/10 18:34:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -151,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 @@ -162,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'; @@ -2382,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; @@ -3058,91 +3062,8 @@ SCRIPT SCRIPT - # HTML-Markup for 'Set a link for this resource to wishlist' - # this is written via JavaScript document.write (function set_wishlistlink) - # it is split into 3 parts and the inputfields for title and path are left out - # these fields are inserted later to set the values for title and path - # automatically via JavaScript (document.title and location.pathname) - my %folders = &Apache::lonnet::get('wishlist',['folders']); - if ($folders{'folders'} eq '') { - $folders{'folders'} = ''; - } - my $start_page_wishlistlink = - &Apache::loncommon::start_page('Set link to wishlist',undef, - {'only_body' => 1, - 'js_ready' => 1, - 'bgcolor' => '#FFFFFF',}); - - my $warningLink = &mt('You must insert a title!'); - - my $in_page_wishlistlink1 = '
\n";
$result .= ''.$values{'author'}.','.
' '.$values{'owner'}.'
';
@@ -3396,15 +3313,9 @@ sub summary_view {
$jumpurl=~s|^/ext/|http://|;
my $link = '
'.&display_url($jumpurl,1).'
';
- my $titleWL = &mt('Set link to wishlist');
$result.=<
$link
$values{'author'}, $values{'owner'} -- $values{'lastrevisiondate'}
@@ -3451,11 +3362,6 @@ sub compact_view {
$result.=' '.
''.
&HTML::Entities::encode($values{'title'},'<>&"').' '.
- ''.
- ''.
- ''.
$link.' '.$values{'author'}.' ('.$values{'domain'}.')';
return $result;
}
@@ -3497,18 +3403,12 @@ sub fielded_format_view {
my $jumpurl=$values{'url'};
$jumpurl=~s|^/ext/|http://|;
- my $titleWL = ('Set link to wishlist');
my $result=<