diff options
author | Michael Francis <edude03@gmail.com> | 2011-06-05 12:01:12 -0400 |
---|---|---|
committer | Michael Francis <edude03@gmail.com> | 2011-06-05 12:01:12 -0400 |
commit | 266b1b435fcb2600a7850b88c0ed88479b0ba2ab (patch) | |
tree | 7a564589f1947eeb917e3caad92c63ed097c1f7f /models/Anime.php | |
parent | b8d663bbe75e00e21c078b22ef9176116945ad54 (diff) | |
download | otakuhub-266b1b435fcb2600a7850b88c0ed88479b0ba2ab.tar.xz |
Whitespace
Diffstat (limited to 'models/Anime.php')
-rw-r--r-- | models/Anime.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/Anime.php b/models/Anime.php index 0877619..5a2cf00 100644 --- a/models/Anime.php +++ b/models/Anime.php @@ -5,12 +5,11 @@ namespace app\models; class Anime extends \lithium\data\Model { protected $_meta = array('key' => '_id', 'source' => 'anime'); - public static function search($query, $page = 1, $by = 'title') - { + public static function search($query, $page = 1, $by = 'title') + { $defaults = array( 'limit' => 20 ); - $limit = 20; $content = self::find('all', @@ -21,6 +20,7 @@ class Anime extends \lithium\data\Model { 'limit' => $limit, 'page' => $page )); + $total = Anime::count(array('title' => array('like' => $query))); return compact('content', 'by', 'limit', 'total', 'page'); } |