diff options
author | raylu <raylu@mixpanel.com> | 2011-07-16 23:08:10 -0700 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2011-07-16 23:08:10 -0700 |
commit | dcc965ab293655136c251afe4fb6f4f41ac5cb75 (patch) | |
tree | 06d69723a766ff1bbe88f716a9a427fb397f158b /models/Kdrama.php | |
parent | 994c36b8279480b6e3374017140e36d77401d3a4 (diff) | |
download | otakuhub-dcc965ab293655136c251afe4fb6f4f41ac5cb75.tar.xz |
manga/kdrama individual search pages
Diffstat (limited to 'models/Kdrama.php')
-rw-r--r-- | models/Kdrama.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/models/Kdrama.php b/models/Kdrama.php index f1eee22..12c136d 100644 --- a/models/Kdrama.php +++ b/models/Kdrama.php @@ -13,7 +13,7 @@ class Kdrama extends \lithium\data\Model { switch($by) { case 'special_id': - $content = parent::find('first', + $kdrama = parent::find('first', array('conditions' => array( $by => $query ), @@ -21,13 +21,11 @@ class Kdrama extends \lithium\data\Model { 'page' => $page )); - - $total = parent::count(array($by => $query)); break; default: - $content = parent::find('all', + $kdrama = parent::find('all', array('conditions' => array( $by => array('like' => $query) ), @@ -36,6 +34,6 @@ class Kdrama extends \lithium\data\Model { )); $total = parent::count(array($by => array('like' => $query))); } - return compact('content', 'by', 'limit', 'total', 'page'); + return compact('kdrama', 'by', 'limit', 'total', 'page'); } -}
\ No newline at end of file +} |