diff options
author | Michael Francis <edude03@gmail.com> | 2011-07-17 20:38:31 -0400 |
---|---|---|
committer | Michael Francis <edude03@gmail.com> | 2011-07-17 20:38:31 -0400 |
commit | c9994190d2ba584e1eb95b6b47ff586da7b0f29f (patch) | |
tree | ff4d02327f8e988925036f7406c760dfba8791d3 /models/Kdrama.php | |
parent | 7be960630a8c0b4dab94245c73453b22db3f305e (diff) | |
parent | 2baaf56e140a06eed8fe0b1d28d744d34a537d49 (diff) | |
download | otakuhub-c9994190d2ba584e1eb95b6b47ff586da7b0f29f.tar.xz |
Merge branch 'master' of git.raylu.net:otakuhub
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 +} |