/[koha]/koha/opac/opac-search.pl
ViewVC logotype

Diff of /koha/opac/opac-search.pl

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

revision 1.21.2.6 by hdl, Wed Sep 28 15:48:25 2005 UTC revision 1.21.2.7 by tipaul, Thu Dec 1 13:59:11 2005 UTC
# Line 39  if ($op eq "do_search") { Line 39  if ($op eq "do_search") {
39          my @excluding = $query->param('excluding');          my @excluding = $query->param('excluding');
40          my @operator = $query->param('operator');          my @operator = $query->param('operator');
41          my @value = $query->param('value');          my @value = $query->param('value');
42            my $orderby = $query->param('orderby');
43            my $desc_or_asc = $query->param('desc_or_asc');
44            my $exactsearch = $query->param('exact');
45    
46          for (my $i=0;$i<=$#marclist;$i++) {          for (my $i=0;$i<=$#marclist;$i++) {
47                  if ($searchdesc) { # don't put the and_or on the 1st search term                  if ($searchdesc) { # don't put the and_or on the 1st search term
48                          $searchdesc .= $and_or[$i]." ".$excluding[$i]." ".($marclist[$i]?$marclist[$i]:"*")." ".$operator[$i]." ".$value[$i]." " if ($value[$i]);                          $searchdesc .= $and_or[$i].$excluding[$i]." ".($marclist[$i]?$marclist[$i]:"*").$operator[$i].$value[$i] if ($value[$i]);
49                  } else {                  } else {
50                          $searchdesc = $excluding[$i]." ".($marclist[$i]?$marclist[$i]:"*")." ".$operator[$i]." ".$value[$i]." " if ($value[$i]);                          $searchdesc = $excluding[$i].($marclist[$i]?$marclist[$i]:"*").$operator[$i].$value[$i] if ($value[$i]);
51                  }                  }
52          }          }
53          $resultsperpage= $query->param('resultsperpage');          $resultsperpage= $query->param('resultsperpage');
54          $resultsperpage = 19 if(!defined $resultsperpage);          $resultsperpage = 19 if(!defined $resultsperpage);
55                    
         my $orderby = $query->param('orderby');  
         my $desc_or_asc = $query->param('desc_or_asc');  
         my $exactsearch = $query->param('exact');  
56          if ($exactsearch) {          if ($exactsearch) {
                 warn "EXACT";  
57                  foreach (@operator) {                  foreach (@operator) {
58                          $_='=';                          $_='=';
59                  }                  }
# Line 114  if ($op eq "do_search") { Line 113  if ($op eq "do_search") {
113                  push @field_data, { term => "operator", val=>$operator[$i] };                  push @field_data, { term => "operator", val=>$operator[$i] };
114                  push @field_data, { term => "value", val=>$value[$i] };                  push @field_data, { term => "value", val=>$value[$i] };
115          }          }
116            push @field_data, {term => "desc_or_asc", val => $desc_or_asc} if $desc_or_asc;
117            push @field_data, {term => "orderby", val => $orderby} if $orderby;
118          my @numbers = ();          my @numbers = ();
119    
120          if ($total>$resultsperpage)          if ($total>$resultsperpage)

Legend:
Removed from v.1.21.2.6  
changed lines
  Added in v.1.21.2.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26