Changeset 349 for server/trunk/web/lib/Sophie/Controller
- Timestamp:
- 01/25/11 23:46:51 (13 years ago)
- Location:
- server/trunk/web/lib/Sophie/Controller
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Distrib.pm
r275 r349 104 104 $distrib->{distribution} 105 105 ? (-or => [ 106 { name=> $distrib->{distribution} },106 { 'me.name' => $distrib->{distribution} }, 107 107 { shortname => $distrib->{distribution} }, 108 108 ], … … 125 125 { 126 126 $distrib->{arch} 127 ? ( arch=> $distrib->{arch})127 ? ('Arch.arch' => $distrib->{arch}) 128 128 : () 129 129 }, -
server/trunk/web/lib/Sophie/Controller/Search.pm
r330 r349 191 191 my ($self, $c, $searchspec, $deptype, $depname, $depsense, $depevr ) = @_; 192 192 193 my $distrs = $c->forward('distrib_search', [ $searchspec, 1 ]); 194 195 return $c->model('Base::Deps')->search( 193 $c->model('BaseSearch')->best_rpm_filter($searchspec) 194 ->search({}, { join => [ 'Deps' ]})->search( 196 195 { 197 196 -and => [ … … 200 199 ($depsense 201 200 ? ({-nest => \[ 202 'rpmdepmatch( flags,evr, rpmsenseflag(?), ?)',201 'rpmdepmatch(Deps.flags, Deps.evr, rpmsenseflag(?), ?)', 203 202 [ plain_text => $depsense], 204 203 [ plain_text => $depevr ] 205 204 ]}) 206 205 : ()), 207 ($distrs208 ? ({ pkgid => { IN => $distrs->get_column('pkgid')->as_query,209 },})210 : ()),211 (exists($searchspec->{src})212 ? { pkgid => { IN => $c->model('Base::Rpms')->search(213 { issrc => $searchspec->{src} ? 1 : 0 }214 )->get_column('pkgid')->as_query, }, }215 : ()),216 206 ($searchspec->{pkgid} 217 ? { pkgid=> $searchspec->{pkgid} }207 ? { 'Deps.pkgid' => $searchspec->{pkgid} } 218 208 : ()), 219 209 ] 220 210 }, 221 211 { 222 '+select' => [ { rpmsenseflag => ' flags' }, 'depname', ],212 '+select' => [ { rpmsenseflag => 'Deps.flags' }, 'Deps.depname', ], 223 213 '+as' => [ qw(sense name) ], 224 214 -
server/trunk/web/lib/Sophie/Controller/Search/Rpm.pm
r330 r349 97 97 $searchspec ||= {}; 98 98 99 my $distrs = $c->forward('/search/distrib_search', [ $searchspec, 1 ]);99 #my $distrs = $c->forward('/search/distrib_search', [ $searchspec, 1 ]); 100 100 101 101 my $deprs = $c->forward( … … 113 113 order_by => [ 'name', 'evr using >>', 'issrc', 'arch' ], 114 114 rows => $searchspec->{rows}, 115 select => [ 'pkgid' ], 116 as => [ 'pkgid' ], 115 117 } 116 118 );
Note: See TracChangeset
for help on using the changeset viewer.