/[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 452 by dpavlin, Mon May 1 13:48:52 2006 UTC revision 453 by dpavlin, Sun May 7 20:40:28 2006 UTC
# Line 70  sub suggest : Local { Line 70  sub suggest : Local {
70    
71          $log->info("search for '$q' in $search and display $show\n");          $log->info("search for '$q' in $search and display $show\n");
72    
73          my $max = $c->config->{'hits_for_suggest'};          my $hits_on_page = $c->config->{'hits_for_suggest'};
74          if (! $max) {          if (! $hits_on_page) {
75                  $log->info("hits_for_suggest isn't defined, defaulting to 10");                  $log->info("hits_for_suggest isn't defined, defaulting to 10");
76                  $c->config->{'hits_for_suggest'} = 10;                  $c->config->{'hits_for_suggest'} = 10;
77                  $max = 10;                  $hits_on_page = 10;
78          }          }
79    
80          $c->forward('filter_database');          $c->forward('filter_database');
# Line 83  sub suggest : Local { Line 83  sub suggest : Local {
83                  phrase => $q,                  phrase => $q,
84                  add_attr => $c->stash->{attr},                  add_attr => $c->stash->{attr},
85                  get_attr => [ $show ],                  get_attr => [ $show ],
86                  max => $max,                  hits_on_page => $hits_on_page,
87          );          );
88    
89          my $used;          my $used;
# Line 196  sub results_ajax : Path( 'results/ajax' Line 196  sub results_ajax : Path( 'results/ajax'
196                          template => $template,                          template => $template,
197                          add_attr => $c->{stash}->{attr},                          add_attr => $c->{stash}->{attr},
198                          get_attr => [ '@uri' ],                          get_attr => [ '@uri' ],
199                          max => $hits_on_page,                          hits_on_page => $hits_on_page,
200                          page => $params->{'_page'},                          page => $params->{'_page'},
201          );          );
202    

Legend:
Removed from v.452  
changed lines
  Added in v.453

  ViewVC Help
Powered by ViewVC 1.1.26