Changeset 134 for server/trunk/web/lib/Sophie/Controller/Search.pm
- Timestamp:
- 12/18/10 17:28:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Search.pm
r130 r134 42 42 for ($c->req->param('type')) { 43 43 /^byname$/ and do { 44 $c->stash->{sargs} = [ {}, $c->req->param('search') ]; 44 45 $c->forward('byname', [ $searchspec, $c->req->param('search') || 45 46 undef ]); … … 47 48 }; 48 49 /^bydep$/ and do { 49 $c->forward('bydep', [ $searchspec, $c->req->param('deptype'), grep { $_ } split (/\s+/, 50 $c->req->param('search') || '') ]); 50 my @args = ($c->req->param('deptype'), grep { $_ } 51 split(/\s+/, $c->req->param('search') || '' )); 52 $c->stash->{sargs} = [ {}, @args ], 53 $c->forward('bydep', [ $searchspec, @args ]); 54 last; 55 }; 56 /^byfile$/ and do { 57 my @args = ($c->req->param('search') || ''); 58 $c->stash->{sargs} = [ {}, @args ], 59 $c->forward('byfile', [ $searchspec, @args ]); 51 60 last; 52 61 }; … … 450 459 $c->stash->{rs} = $c->model('Base')->resultset('Rpms')->search( 451 460 { 452 $distrs 453 ? { pkgid => { IN => $distrs->get_column('pkgid')->as_query, }, } 454 : (), 461 pkgid => { IN => $filers->as_query, }, 455 462 }, 456 463 );
Note: See TracChangeset
for help on using the changeset viewer.