diff --git a/ground/controllers/FeedController.php b/ground/controllers/FeedController.php index 90e4212..2275e2e 100644 --- a/ground/controllers/FeedController.php +++ b/ground/controllers/FeedController.php @@ -23,7 +23,7 @@ class FeedController extends Controller // --------- POINTS $points = Point::model()->getAll(array( 'where' => '`moderate` = 1', - 'order' => '`date` DESC', + 'order' => '`ord` DESC', 'limit' => 5, )); foreach ($points as $point) { diff --git a/ground/controllers/JsonController.php b/ground/controllers/JsonController.php index be771dd..348446b 100644 --- a/ground/controllers/JsonController.php +++ b/ground/controllers/JsonController.php @@ -267,6 +267,7 @@ class JsonController extends Controller 'type' => Notifications::typePointConfirmed, 'date' => time(), )); + $_POST['ord'] = time(); } $point->setValues($_POST); diff --git a/ground/controllers/PageController.php b/ground/controllers/PageController.php index e976d70..621561b 100644 --- a/ground/controllers/PageController.php +++ b/ground/controllers/PageController.php @@ -75,7 +75,7 @@ class PageController extends Controller krsort($pages); $param = array(); - $param['order'] = 'id DESC'; + $param['order'] = '`ord` DESC'; if (App::getParam('category')) { $param['where'] = 'categoryId = ' . (int) App::getParam('category') . ' AND `moderate` = 1'; } else if (App::getParam('user')) {