Changeset 272
- Timestamp:
- 01/02/11 15:33:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Distrib.pm
r263 r272 277 277 my ( $self, $c ) = @_; 278 278 $c->forward('list', [ $c->stash->{dist} ]); 279 # TODO store properly results 280 # No call from json here 281 } 279 } 280 281 # Url: /distrib/<DISTRIBUTION>/<RELEASE>/<ARCH>/media 282 282 283 283 sub media :Chained('/distrib/distrib_view') PathPart('media') :Args(0) { … … 480 480 sub list_rpms :Chained('distrib_view') PathPart('rpms') Args(0) { 481 481 my ( $self, $c ) = @_; 482 if (!$c->forward('exists', [ $c->stash->{dist} ])) { 483 $c->go('/404/index'); 484 } 485 $c->stash->{metarevisite} = 60; 486 $c->stash->{metatitle} = sprintf( 487 'Available Rpms for %s / %s / %s', 488 $c->stash->{dist}{distribution}, 489 $c->stash->{dist}{release}, 490 $c->stash->{dist}{arch} 491 ); 492 push(@{$c->stash->{keywords}}, 493 $c->stash->{dist}{distribution}, 494 $c->stash->{dist}{release}, 495 $c->stash->{dist}{arch}); 482 496 $c->forward('rpms', [ $c->stash->{dist} ]); 483 497 } … … 492 506 sub list_srpms :Chained('distrib_view') PathPart('srpms') Args(0) { 493 507 my ( $self, $c ) = @_; 508 if (!$c->forward('exists', [ $c->stash->{dist} ])) { 509 $c->go('/404/index'); 510 } 511 $c->stash->{metarevisite} = 60; 512 $c->stash->{metatitle} = sprintf( 513 'Available Srpms for %s / %s / %s', 514 $c->stash->{dist}{distribution}, 515 $c->stash->{dist}{release}, 516 $c->stash->{dist}{arch} 517 ); 518 push(@{$c->stash->{keywords}}, 519 $c->stash->{dist}{distribution}, 520 $c->stash->{dist}{release}, 521 $c->stash->{dist}{arch}); 494 522 $c->forward('srpms', [ $c->stash->{dist} ]); 495 523 } … … 508 536 [ $c->stash->{dist}, $name ]) }; 509 537 $c->go('/404/index') unless ($c->stash->{pkgid}); 538 push(@{$c->stash->{keywords}}, 539 $c->stash->{dist}{distribution}, 540 $c->stash->{dist}{release}, 541 $c->stash->{dist}{arch}); 510 542 $c->go('/rpms/rpms', [ $c->stash->{pkgid}, @subpart ]); 511 543 } … … 524 556 [ $c->stash->{dist}, $name ]) }; 525 557 $c->go('/404/index') unless ($c->stash->{pkgid}); 558 push(@{$c->stash->{keywords}}, 559 $c->stash->{dist}{distribution}, 560 $c->stash->{dist}{release}, 561 $c->stash->{dist}{arch}); 526 562 $c->go('/rpms/rpms', [ $c->stash->{pkgid}, @subpart ]); 527 563 } … … 544 580 [ $c->stash->{dist}, $pkgid ]) } ) { 545 581 $c->go('/rpms/rpms', [ $pkgid, @subpart ]); 582 push(@{$c->stash->{keywords}}, 583 $c->stash->{dist}{distribution}, 584 $c->stash->{dist}{release}, 585 $c->stash->{dist}{arch}); 546 586 } else { 547 587 $c->go('/404/index'); … … 555 595 my ( $self, $c, $media ) = @_; 556 596 $c->stash->{dist}{media} = $media; 597 push(@{$c->stash->{keywords}}, 598 $c->stash->{dist}{distribution}, 599 $c->stash->{dist}{release}, 600 $c->stash->{dist}{arch}, 601 $c->stash->{dist}{media}, 602 ); 557 603 } 558 604
Note: See TracChangeset
for help on using the changeset viewer.