/[webpac]/trunk/WebPac.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/WebPac.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 643 by dpavlin, Sun Jan 23 15:18:03 2005 UTC revision 657 by dpavlin, Mon Jan 31 12:08:35 2005 UTC
# Line 148  sub make_pager($$$) { Line 148  sub make_pager($$$) {
148    
149    
150          foreach my $p (@{$pager->pages_in_set()}) {          foreach my $p (@{$pager->pages_in_set()}) {
151                  next if ($p < 0);                  next if ($p <= 0);
152                  if($p == $pager->current_page()) {                  if($p == $pager->current_page()) {
153                          $pager_jump .= "<b>$p</b> ";                          $pager_jump .= "<b>$p</b> ";
154                  } else {                  } else {
# Line 359  sub show_results_list { Line 359  sub show_results_list {
359                  $tmpl->param('full',0);                  $tmpl->param('full',0);
360          }          }
361    
362            my $swish_msg = ' ';
363    
364          # create new swish instance          # create new swish instance
365          my $swish = SWISH::API->new($INDEX);          my $swish = SWISH::API->new($INDEX);
366          die $swish->ErrorString.": ".$swish->LastErrorMsg if $swish->Error;          $swish_msg .= $swish->ErrorString." ".$swish->LastErrorMsg if $swish->Error;
367    
368          # execute query and get number of results from SWISH-E          # execute query and get number of results from SWISH-E
369          my $search = $swish->New_Search_Object;          my $search = $swish->New_Search_Object;
# Line 369  sub show_results_list { Line 371  sub show_results_list {
371          $search->SetSort($sort);          $search->SetSort($sort);
372    
373          my $results = $search->Execute($sw_q);          my $results = $search->Execute($sw_q);
374          die $swish->ErrorString.": ".$swish->LastErrorMsg if $swish->Error;          $swish_msg .= $swish->ErrorString." ".$swish->LastErrorMsg if $swish->Error;
375    
376          my $hits = $results->Hits;          my $hits = $results->Hits;
377    
378          $tmpl->param('hits',$hits);          $tmpl->param('hits',$hits);
379          $tmpl->param('search',$sw_q);          my $search_msg = $sw_q;
380            $search_msg .= '<em>'.$swish_msg.'</em>' if ($swish_msg);
381            $tmpl->param('search', $search_msg);
382    
383          $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);          $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);
384          $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);          $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);

Legend:
Removed from v.643  
changed lines
  Added in v.657

  ViewVC Help
Powered by ViewVC 1.1.26