diff --git a/controllers/JsonController.php b/controllers/JsonController.php index cde835a..d0c2fe7 100644 --- a/controllers/JsonController.php +++ b/controllers/JsonController.php @@ -102,7 +102,7 @@ class JsonController extends Controller */ 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( "id" => "0", @@ -111,6 +111,8 @@ class JsonController extends Controller "ord" => "0" ); + $categories = array_reverse($categories); + self::renderPartial('json.php', array( 'data' => $categories, ));