Changeset 157


Ignore:
Timestamp:
12/21/10 03:29:56 (13 years ago)
Author:
nanardon
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/lib/Sophie/Controller/Search/Rpms.pm

    r148 r157  
    5353            }, 
    5454            { 
    55                 select => [qw(filename pkgid name version arch label) ], 
    56                 as => [qw(filename pkgid distribution release arch media) ], 
     55                select => [qw(filename pkgid name shortname version arch label) ], 
     56                as => [qw(filename pkgid distribution dist release arch media) ], 
    5757                rows => $searchspec->{rows} || 10000, 
    5858                order_by => [ 'Rpmfiles.added desc' ], 
     
    155155} 
    156156 
     157sub byfilename : Private { 
     158    my ( $self, $c, $searchspec, $file ) = @_; 
     159    $searchspec ||= {}; 
     160 
     161    return $c->stash->{xmlrpc} = [ 
     162        map { 
     163            {  
     164            $_->get_columns 
     165            } 
     166        } 
     167        $c->forward('byfilename_rpc', [ $searchspec, $file ])->all ]; 
     168} 
     169 
     170sub byfilename_rpc : XMLRPCPath('byfilename') { 
     171    my ( $self, $c, $searchspec, $file ) = @_; 
     172    $searchspec ||= {}; 
     173 
     174    $c->stash->{rs} = 
     175        $c->forward('rpms_rs')->search( 
     176        { 
     177            filename => { LIKE => $file }, 
     178        }, 
     179        { 
     180            order_by => [ qw(filename) ], 
     181        } 
     182    ); 
     183} 
     184 
    157185=head1 AUTHOR 
    158186 
Note: See TracChangeset for help on using the changeset viewer.