/[webpac2]/trunk/vhost/webpac2.cgi
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/vhost/webpac2.cgi

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

revision 1329 by dpavlin, Mon Mar 8 17:28:02 2010 UTC revision 1340 by dpavlin, Tue Oct 12 12:05:34 2010 UTC
# Line 234  if ( my $search = param('search') ) { Line 234  if ( my $search = param('search') ) {
234                                     $template =~ s{Q}{$v};                                     $template =~ s{Q}{$v};
235                                  $whitespace = " AND " if $whitespace;                                  $whitespace = " AND " if $whitespace;
236    
237                                    # don't return -* &* and other non-word characters
238                                    return '' if $template =~ m/^\W\*$/;
239    
240                                  return                                  return
241                                          $whitespace .                                          $whitespace .
242                                          $attr . '="' . $template . '"';                                          $attr . '="' . $template . '"';
# Line 262  if ( my $search = param('search') ) { Line 265  if ( my $search = param('search') ) {
265          $q .= ' AND ((' . join(') OR (', map { "input=\"$_\"" } @only_input) . '))' if @only_input;          $q .= ' AND ((' . join(') OR (', map { "input=\"$_\"" } @only_input) . '))' if @only_input;
266    
267          warn "# query: $q\n";          warn "# query: $q\n";
268          my $swish_results = $swish->query( $q );          my $search_obj = $swish->new_search_object;
269            if ( my $sort = param('sort') ) {
270                    $search_obj->set_sort( $sort );
271            }
272            my $swish_results = $search_obj->execute( $q );
273    
274          dump_yaml( 'swish_results', $swish_results );          dump_yaml( 'swish_results', $swish_results );
275    

Legend:
Removed from v.1329  
changed lines
  Added in v.1340

  ViewVC Help
Powered by ViewVC 1.1.26