|
|
@@ -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');
|
|
|
}
|
|
|
-}
|
|
|
+}
|