From 09fddc006178063e1a9d90f7e0be441389e7aa24 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Wed, 25 Nov 2015 23:15:00 +0300 Subject: [PATCH] =?UTF-8?q?ADD=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D1=82?= =?UTF-8?q?=D0=BE=D1=87=D0=B5=D0=BA=20=D0=B2=20=D0=BF=D0=BE=D1=80=D1=8F?= =?UTF-8?q?=D0=B4=D0=BA=D0=B5=20=D0=BF=D1=80=D0=BE=D1=85=D0=BE=D0=B6=D0=B4?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BC=D0=BE=D0=B4=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/FeedController.php | 2 +- ground/controllers/JsonController.php | 1 + ground/controllers/PageController.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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')) {