Changeset 118


Ignore:
Timestamp:
12/13/10 00:18:49 (13 years ago)
Author:
nanardon
Message:
  • filter on distriubtion accept both name or shortname
File:
1 edited

Legend:

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

    r114 r118  
    3636            $rs->search(undef, { order_by => ['name'] })->all ]; 
    3737    } 
    38     $rs = $rs->search(name => $distribution)->search_related('Release'); 
     38    $rs = $rs->search({ 
     39            -or => [ 
     40                { name      => $distribution }, 
     41                { shortname => $distribution }, 
     42            ], 
     43        })->search_related('Release'); 
    3944    if (!$release) { 
    4045        return $c->stash->{xmlrpc} = [ map { $_->version } 
     
    8792            { 
    8893                $distrib->{distribution} 
    89                     ? (name => $distrib->{distribution}) 
     94                    ? (-or => [ 
     95                            { name =>      $distrib->{distribution} }, 
     96                            { shortname => $distrib->{distribution} }, 
     97                        ], 
     98                    ) 
    9099                    : () 
    91100            }, 
Note: See TracChangeset for help on using the changeset viewer.