Diff for /loncom/interface/lonsearchcat.pm between versions 1.329 and 1.331.4.3

version 1.329, 2011/02/15 14:54:51 version 1.331.4.3, 2012/12/17 13:54:25
Line 152  sub handler { Line 152  sub handler {
     ## Initialize global variables      ## Initialize global variables
     ##      ##
     my $domain  = $r->dir_config('lonDefDomain');      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";          "$env{'user.domain'}_$env{'user.name'}_sel_res.db";
     #      #
     # set the name of the persistent database      # set the name of the persistent database
Line 163  sub handler { Line 164  sub handler {
         $env{'form.persistent_db_id'} = time;          $env{'form.persistent_db_id'} = time;
     }      }
   
     my $persistent_db_file = "/home/httpd/perl/tmp/".      my $persistent_db_file = $temp_file_dir .
         &escape($domain).          &escape($domain).
             '_'.&escape($env{'user.name'}).              '_'.&escape($env{'user.name'}).
                 '_'.$env{'form.persistent_db_id'}.'_persistent_search.db';                  '_'.$env{'form.persistent_db_id'}.'_persistent_search.db';
Line 2383  END Line 2384  END
                 next;                  next;
             }              }
             $status=~s|/||g;              $status=~s|/||g;
            my $datafile=$r->dir_config('lonDaemons').'/tmp/'.$status;  
   
   
              my $datafile=LONCAPA::tempdir().$status;
             if (-e $datafile && ! -e "$datafile.end") {              if (-e $datafile && ! -e "$datafile.end") {
                 &update_status($r,&mt('Receiving results from [_1]',$server));                  &update_status($r,&mt('Receiving results from [_1]',$server));
                 next;                  next;
Line 3059  SCRIPT Line 3063  SCRIPT
 </script>  </script>
 SCRIPT  SCRIPT
   
   
     # Add JavaScript-function to set link for a ressource to wishlist  
     $js.=<<SCRIPT;  
 <script type="text/javascript">  
 // <![CDATA[  
 function set_wishlistlink(title, path){  
        Win = window.open('/adm/wishlist?mode=newLink&setTitle='+title+'&setPath='+path,  
                             'wishlistNewLink','width=560,height=350,scrollbars=0');  
 }  
   
 // ]]>  
 </script>  
 SCRIPT  
   
     my $start_page  = &Apache::loncommon::start_page(undef,$js,      my $start_page  = &Apache::loncommon::start_page(undef,$js,
      {'only_body' =>1});       {'only_body' =>1,
                                                         'add_wishlist' =>1});
     my $result=<<END;      my $result=<<END;
 $start_page  $start_page
 <form name="results" method="post" action="/adm/searchcat">  <form name="results" method="post" action="/adm/searchcat">
Line 3384  sub compact_view { Line 3375  sub compact_view {
  '<a href="'.$jumpurl.'?inhibitmenu=yes" target="preview">'.   '<a href="'.$jumpurl.'?inhibitmenu=yes" target="preview">'.
         &HTML::Entities::encode($values{'title'},'<>&"').'</a></span> '.          &HTML::Entities::encode($values{'title'},'<>&"').'</a></span> '.
         '<a href="javascript:;" onclick="set_wishlistlink('."'$values{'title'}','$jumpurl'".')" '.          '<a href="javascript:;" onclick="set_wishlistlink('."'$values{'title'}','$jumpurl'".')" '.
         'title="'.&mt('Set link to wishlist').'">'.          'title="'.&mt('Add to stored links').'">'.
         '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.          '<img class="LC_icon" src="/res/adm/pages/wishlist.png" '.
         'alt="set wishlistlink" style="width:22px;"/>'.          'alt="set wishlistlink" style="width:22px;"/>'.
         '</a>'.          '</a>'.
Line 3429  sub fielded_format_view { Line 3420  sub fielded_format_view {
     my $jumpurl=$values{'url'};      my $jumpurl=$values{'url'};
     $jumpurl=~s|^/ext/|http://|;      $jumpurl=~s|^/ext/|http://|;
   
     my $titleWL = ('Set link to wishlist');      my $titleWL = &mt('Add to stored links');
     my $result=<<END;      my $result=<<END;
 $prefix <img src="$icon" alt="" />  $prefix <img src="$icon" alt="" />
 <dl>  <dl>

Removed from v.1.329  
changed lines
  Added in v.1.331.4.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>