/[webpac2]/Webpacus/lib/Webpacus/Controller/Search.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 /Webpacus/lib/Webpacus/Controller/Search.pm

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

revision 381 by dpavlin, Mon Dec 26 20:10:52 2005 UTC revision 382 by dpavlin, Sun Jan 22 02:52:24 2006 UTC
# Line 78  sub suggest : Local { Line 78  sub suggest : Local {
78    
79          $c->forward('filter_database');          $c->forward('filter_database');
80    
81          my @hits = $webpac->search(          my $hits = $webpac->search(
82                  phrase => $q,                  phrase => $q,
83                  add_attr => $c->stash->{attr},                  add_attr => $c->stash->{attr},
84                  get_attr => [ $show ],                  get_attr => [ $show ],
# Line 88  sub suggest : Local { Line 88  sub suggest : Local {
88          my $used;          my $used;
89          my @suggestions;          my @suggestions;
90    
91          foreach my $res (@hits) {          foreach my $res (@{$hits}) {
92                  my $v = $res->{ $show } || next;                  my $v = $res->{ $show } || next;
93                  next if ($used->{ $v }++);                  next if ($used->{ $v }++);
94                  push @suggestions, $v;                  push @suggestions, $v;

Legend:
Removed from v.381  
changed lines
  Added in v.382

  ViewVC Help
Powered by ViewVC 1.1.26