Changeset 105


Ignore:
Timestamp:
12/10/10 00:27:51 (13 years ago)
Author:
nanardon
Message:
  • optimize a bit explorer
Location:
server/trunk/web
Files:
2 edited

Legend:

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

    r95 r105  
    2828    $c->stash->{explorerurl} = '/explorer' . ($dir ? "/$dir" : ''); 
    2929 
    30     my $rsdist = $c->forward('/search/distrib_search', [ $c->session->{__explorer} ]); 
     30    my $rsdist = $c->forward('/search/distrib_search', [ 
     31            $c->session->{__explorer}, 1 ]); 
    3132    $c->stash->{xmlrpc} = [ $c->model('Base') 
    3233      ->resultset('Files') 
     
    3435          { 
    3536              dirname => '/' . ($dir ? "$dir/" : ''), 
    36               (grep { $_ } values %{ $c->session->{__explorer} } 
    37                 ? (pkgid => { IN => $rsdist->get_column('pkgid')->as_query, }) 
     37              ($rsdist  
     38                ? (pkgid => { IN => $rsdist->get_column('pkgid')->as_query, },) 
    3839                : ()), 
    3940              ($c->req->param('filename') 
     
    5657    $c->stash->{explorerurl} = '/explorer' . ($dir ? "/$dir" : ''); 
    5758 
    58     my $rsdist = $c->forward('/search/distrib_search', [ $c->session->{__explorer} ]); 
     59    my $rsdist = $c->forward('/search/distrib_search', [ 
     60            $c->session->{__explorer}, 1 ]); 
    5961 
    6062    my @col = qw(dirname basename md5 size pkgid count); 
     
    6769      ->search({ 
    6870              dirname => '/' . ($dir ? "$dir/" : ''), basename => $basename, 
    69               pkgid => { IN => $rsdist->get_column('pkgid')->as_query, }, 
     71              ($rsdist  
     72                ? (pkgid => { IN => $rsdist->get_column('pkgid')->as_query, },) 
     73                : ()) 
    7074          }, 
    7175          {  
  • server/trunk/web/root/templates/html/0explorer/file.tt

    r76 r105  
    77<table> 
    88[% END %] 
    9 [% info = c.forward('/rpms/info', [ file.pkgid ]) %] 
     9[% info = c.forward('/rpms/basicinfo', [ file.pkgid ]) %] 
    1010<tr><td colspan="6"> 
    1111<a href="[% c.uri_for('/rpms', file.pkgid) %]"> 
Note: See TracChangeset for help on using the changeset viewer.