Порядок следования категорий в приложении
This commit is contained in:
parent
de9d8409eb
commit
ce23eb6680
|
|
@ -102,7 +102,7 @@ class JsonController extends Controller
|
||||||
*/
|
*/
|
||||||
static function actionCategories()
|
static function actionCategories()
|
||||||
{
|
{
|
||||||
$categories = Category::model()->getAll(array('order' => 'ord ASC', 'asArray' => true, 'noKeys' => true));
|
$categories = Category::model()->getAll(array('order' => 'ord DESC', 'asArray' => true, 'noKeys' => true));
|
||||||
|
|
||||||
$categories[] = array(
|
$categories[] = array(
|
||||||
"id" => "0",
|
"id" => "0",
|
||||||
|
|
@ -111,6 +111,8 @@ class JsonController extends Controller
|
||||||
"ord" => "0"
|
"ord" => "0"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$categories = array_reverse($categories);
|
||||||
|
|
||||||
self::renderPartial('json.php', array(
|
self::renderPartial('json.php', array(
|
||||||
'data' => $categories,
|
'data' => $categories,
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue