Changeset 226
- Timestamp:
- 12/29/10 15:31:35 (13 years ago)
- Location:
- server/trunk/web
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Compat.pm
r224 r226 48 48 } 49 49 50 # /distrib/foo,bar,baz/RPM 51 sub distrib :Private { 52 my ($self, $c, $distrib, $rpm) = @_; 53 54 my @args = split(',', $distrib); 55 if (@args == 2) { 56 unshift(@args, ''); 57 } 58 $c->res->redirect($c->uri_for('/distrib', @args, 'rpms', $rpm)); 59 } 60 50 61 =head1 AUTHOR 51 62 -
server/trunk/web/lib/Sophie/Controller/Distrib.pm
r196 r226 233 233 sub list_arch :Path :Args(2) { 234 234 my ( $self, $c, $distribution, $release ) = @_; 235 236 # Compatability with Sophie1 237 if ($distribution =~ /^([^,]+,)?[^,]+,[^,]+$/) { 238 $c->go('/compat/distrib', [ $distribution, $release ]); 239 } 240 235 241 $c->stash->{dist}{distribution} = $distribution; 236 242 $c->stash->{dist}{release} = $release; -
server/trunk/web/t/controller_Compat.t
r224 r226 8 8 ok( request('/viewrpm')->is_redirect, 'Request should succeed' ); 9 9 ok( request('/viewrpm/azerty')->is_redirect, 'Request should succeed' ); 10 ok( request('/distrib/Mandriva,cooker,i586/azerty')->is_redirect, 'Request should succeed' ); 10 11 done_testing();
Note: See TracChangeset
for help on using the changeset viewer.