Changeset 196


Ignore:
Timestamp:
12/27/10 02:41:54 (13 years ago)
Author:
nanardon
Message:
  • add title, keywords and co
  • spelling fix
Location:
server/trunk/web/lib/Sophie/Controller
Files:
4 edited

Legend:

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

    r189 r196  
    4646        my $id = $c->forward('/chat/paste', [ 'Bot paste', join("\n", @backup) ]); 
    4747        if ($id) { 
    48             push(@{ $message->{message} }, 'All results availlable here: ' . $c->uri_for('/chat', $id)); 
     48            push(@{ $message->{message} }, 'All results available here: ' . $c->uri_for('/chat', $id)); 
    4949        } 
    5050    } 
     
    125125=head2 help [cmd] 
    126126 
    127 Return help about command cmd or list availlable command.  
     127Return help about command cmd or list available command.  
    128128 
    129129=cut 
     
    133133    if ($cmd) { 
    134134        my @message = grep { /\S+/ } split(/\n/, 
    135             $c->model('Help::POD')->bot_help_text($cmd) || 'No help availlable'); 
     135            $c->model('Help::POD')->bot_help_text($cmd) || 'No help available'); 
    136136        return $c->{stash}->{xmlrpc} = { 
    137137            private_reply => 1, 
     
    142142            private_reply => 1, 
    143143            message => [ 
    144                 'availlable command:', 
     144                'available command:', 
    145145                join(', ', sort grep { $_ !~ /^end$/ } @{ $self->_commands }), 
    146146            ], 
  • server/trunk/web/lib/Sophie/Controller/Distrib.pm

    r190 r196  
    1919=head2 distrib.list( [ DISTRIBUTION [, RELEASE [, ARCH ]]] 
    2020 
    21 List content of distrib according arguments given. IE list availlable 
     21List content of distrib according arguments given. IE list available 
    2222C<distribution> if no argument is given, list C<release> if C<DISTRIBUTION> is 
    2323given, list C<arch> if both C<DISTRIBUTION> and C<RELEASE> are given. Etc... Up 
     
    196196    my ( $self, $c ) = @_; 
    197197 
     198    $c->stash->{metarevisite} = 60; 
     199    $c->stash->{metatitle} = 'Available Distribution'; 
     200    push(@{$c->stash->{keywords}}, 'Rpm Distribution'); 
    198201    $c->forward('list'); 
    199202} 
     
    215218        $c->go('/404/index'); 
    216219    } 
     220    $c->stash->{metarevisite} = 60; 
     221    $c->stash->{metatitle} = 'Available release for ' . $distribution; 
     222    push(@{$c->stash->{keywords}}, $distribution); 
    217223    $c->forward('list', [ $c->stash->{dist} ] ); 
    218224} 
     
    229235    $c->stash->{dist}{distribution} = $distribution; 
    230236    $c->stash->{dist}{release} = $release; 
     237    if (!$c->forward('exists', [ $c->stash->{dist} ])) { 
     238        $c->go('/404/index'); 
     239    } 
     240    $c->stash->{metarevisite} = 60; 
     241    $c->stash->{metatitle} = 
     242        'Available architecture for ' . $distribution . ' / ' . $release; 
     243    push(@{$c->stash->{keywords}}, $distribution, $release); 
    231244    $c->forward('list', [ $c->stash->{dist} ] ); 
    232245} 
     
    238251    $c->stash->{dist}{release} = $release; 
    239252    $c->stash->{dist}{arch} = $arch; 
     253    if (!$c->forward('exists', [ $c->stash->{dist} ])) { 
     254        $c->go('/404/index'); 
     255    } 
     256    $c->stash->{metarevisite} = 60; 
     257    $c->stash->{metatitle} = 
     258        'Available medias for ' . $distribution . ' / ' . $release . ' / ' . $arch; 
     259    push(@{$c->stash->{keywords}}, $distribution, $release, $arch); 
    240260    $c->stash->{distrib} = $c->stash->{dist}; 
    241261} 
     
    262282=head2 distrib.anyrpms( DISTRIB ) 
    263283 
    264 Return a list of packages availlable for C<DISTRIB>. 
     284Return a list of packages available for C<DISTRIB>. 
    265285 
    266286C<DISTRIB> is a struct with following keys/values: 
     
    312332=head2 distrib.rpms( DISTRIB ) 
    313333 
    314 Return a list of binary packages availlable for C<DISTRIB>. 
     334Return a list of binary packages available for C<DISTRIB>. 
    315335 
    316336C<DISTRIB> is a struct with following keys/values: 
     
    365385=head2 distrib.srpms( DISTRIB ) 
    366386 
    367 Return a list of sources packages availlable for C<DISTRIB>. 
     387Return a list of sources packages available for C<DISTRIB>. 
    368388 
    369389C<DISTRIB> is a struct with following keys/values: 
  • server/trunk/web/lib/Sophie/Controller/Root.pm

    r150 r196  
    7070    my ( $self, $c ) = @_; 
    7171 
     72    $c->stash->{metarevisite} = 1; 
    7273    $c->stash->{xmlrpc} = $c->forward( 
    7374        '/search/rpms/bydate', 
     
    9697sub default :Path { 
    9798    my ( $self, $c ) = @_; 
    98     $c->response->body( 'Page not found' ); 
    99     $c->response->status(404); 
     99    $c->go('/404/index'); 
    100100} 
    101101 
  • server/trunk/web/lib/Sophie/Controller/Rpms.pm

    r194 r196  
    228228        $c->go('/404/index'); 
    229229    } 
    230     $c->stash->{rpms}{info} = 
     230    my $info = $c->stash->{rpms}{info} = 
    231231        $c->forward('info', [ $c->stash->{pkgid} ]); 
     232 
     233    $c->stash->{metatitle} = sprintf("%s-%s %s", 
     234        $info->{name}, 
     235        $info->{evr}, 
     236        $info->{issrc} ? 'src' : $info->{arch}, 
     237    ); 
     238    push(@{ $c->stash->{keywords} }, $info->{name}, $info->{evr}, 
     239        $info->{issrc} ? 'src' : $info->{arch},); 
     240    $c->stash->{metarevisit} = 30; 
     241 
    232242    $c->stash->{rpms}{location} = 
    233243        $c->forward('location', [ $c->stash->{pkgid} ]); 
Note: See TracChangeset for help on using the changeset viewer.