summaryrefslogtreecommitdiffstats
path: root/controllers/AnimeController.php
blob: 2fc35cc69c923dfa8d5d0950702c8a09289e3b65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

namespace app\controllers;

use app\models\Anime;

class AnimeController extends \lithium\action\Controller {
	public $publicActions = array('view');

	public function view($id = null)
	{
		if (is_numeric($id)) {
			return Anime::search($id, null, 'special_id');
		}
		else {
			return $this->redirect(array('controller' => 'search','q' => array('search' => $id)));
		}
	
	}
}