Ignore:
Timestamp:
03/06/11 13:09:58 (13 years ago)
Author:
misc
Message:

fix for new dbix::class that add me. before function call ( thus breaking
it in the case of postgresql )

File:
1 edited

Legend:

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

    r359 r371  
    3939sub queryformat : XMLRPCLocal { 
    4040    my ( $self, $c, $pkgid, $qf ) = @_; 
    41     $c->stash->{xmlrpc} = $c->model('base')->resultset('Rpms')->search( 
    42         { pkgid => $pkgid }, 
     41    $c->stash->{xmlrpc} = $c->model('base')->resultset('RpmQueryFormat')->search( 
     42        {}, 
    4343        {  
    44             select => [ qq{rpmqueryformat("header", ?)} ], 
    45             as => [ 'qf' ], 
    46             bind => [ $qf ], 
    47         } 
    48     )->next->get_column('qf'); 
     44            bind => [ $qf, $pkgid ], 
     45        } 
     46    )->next->qf; 
    4947} 
    5048 
     
    124122    $info{src} = $info{issrc} ? 1 : 0; 
    125123    foreach (qw(version release arch)) { 
    126         if (my $r = $c->model('base')->resultset('Rpms')->search( 
    127             { pkgid => $pkgid }, 
    128             {  
    129                 select => [ qq{rpmquery("header", ?)} ], 
    130                 as => [ 'qf' ], 
    131                 bind => [ $_ ], 
    132             } 
     124        if (my $r = $c->model('base')->resultset('RpmQuery')->search( 
     125                {}, 
     126                { 
     127                    bind => [ $_, $pkgid ], 
     128                } 
    133129            )->next) {  
    134             $info{$_} = $r->get_column('qf'); 
     130            $info{$_} = $r->qf; 
    135131        } 
    136132    } 
Note: See TracChangeset for help on using the changeset viewer.