diff options
author | raylu <raylu@mixpanel.com> | 2011-07-17 17:35:41 -0700 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2011-07-17 17:35:41 -0700 |
commit | 2baaf56e140a06eed8fe0b1d28d744d34a537d49 (patch) | |
tree | 1f410c05a51bf46c8970f418c40e2660fa11bfbf /controllers/AnimeController.php | |
parent | 384834c9fb85d3a408c60dd38e8d1474116793ad (diff) | |
download | otakuhub-2baaf56e140a06eed8fe0b1d28d744d34a537d49.tar.xz |
cast (chars/VAs) on anime view page
there isn't yet a views/anime/cast.html.php for non-JS, but the
controller is set up for it
Diffstat (limited to 'controllers/AnimeController.php')
-rw-r--r-- | controllers/AnimeController.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/controllers/AnimeController.php b/controllers/AnimeController.php index 09c0828..3a40cee 100644 --- a/controllers/AnimeController.php +++ b/controllers/AnimeController.php @@ -5,7 +5,7 @@ namespace app\controllers; use app\models\Anime; class AnimeController extends \lithium\action\Controller { - public $publicActions = array('index', 'view'); + public $publicActions = array('index', 'view', 'cast'); public function index() { @@ -34,6 +34,13 @@ class AnimeController extends \lithium\action\Controller { { return $this->redirect(array('controller' => 'search','q' => array('search' => $id))); } - + } + + public function cast($id = null) + { + if (is_numeric($id)) + { + return Anime::search($id, null, 'special_id'); + } } } |