Changeset 129 for server/trunk/web/lib/Sophie
- Timestamp:
- 12/17/10 03:26:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Search.pm
r128 r129 29 29 $c->req->params->{search} = $c->session->{search}; 30 30 $c->req->params->{type} = $c->session->{type}; 31 $c->req->params->{deptype} = $c->session->{deptype}; 31 32 } else { 32 33 $c->session->{search} = $c->req->params->{search}; 33 34 $c->session->{type} = $c->req->params->{type}; 35 $c->session->{deptype} = $c->req->params->{deptype}; 34 36 } 35 37 … … 42 44 $c->forward('byname', [ $searchspec, $c->req->param('search') || 43 45 undef ]); 46 last; 47 }; 48 /^bydep$/ and do { 49 $c->forward('bydep', [ $searchspec, $c->req->param('deptype'), grep { $_ } split (/\s+/, 50 $c->req->param('search') || '') ]); 44 51 last; 45 52 }; … … 64 71 65 72 } 73 } 74 75 sub adv_search :Local { 76 my ( $self, $c ) = @_; 66 77 } 67 78 … … 288 299 ] } 289 300 : ()), 290 $distrs301 ($distrs 291 302 ? { pkgid => { IN => $distrs->get_column('pkgid')->as_query, }, } 292 : () ,303 : ()), 293 304 ] 294 305 }, … … 354 365 )->get_column('pkgid')->as_query, }, } 355 366 : ()), 367 ($searchspec->{pkgid} 368 ? { pkgid => $searchspec->{pkgid} } 369 : ()), 356 370 ] 357 371 }, … … 381 395 ($distrs 382 396 ? (pkgid => { IN => $distrs->get_column('pkgid')->as_query, },) 397 : ()), 398 ($searchspec->{pkgid} 399 ? { pkgid => $searchspec->{pkgid} } 383 400 : ()), 384 401 ],
Note: See TracChangeset
for help on using the changeset viewer.