ADD вывод точек в порядке прохождения модерации

This commit is contained in:
Krivchikov Dmitry 2015-11-25 23:15:00 +03:00
parent 6a01f3a52b
commit 09fddc0061
3 changed files with 3 additions and 2 deletions

View File

@ -23,7 +23,7 @@ class FeedController extends Controller
// --------- POINTS // --------- POINTS
$points = Point::model()->getAll(array( $points = Point::model()->getAll(array(
'where' => '`moderate` = 1', 'where' => '`moderate` = 1',
'order' => '`date` DESC', 'order' => '`ord` DESC',
'limit' => 5, 'limit' => 5,
)); ));
foreach ($points as $point) { foreach ($points as $point) {

View File

@ -267,6 +267,7 @@ class JsonController extends Controller
'type' => Notifications::typePointConfirmed, 'type' => Notifications::typePointConfirmed,
'date' => time(), 'date' => time(),
)); ));
$_POST['ord'] = time();
} }
$point->setValues($_POST); $point->setValues($_POST);

View File

@ -75,7 +75,7 @@ class PageController extends Controller
krsort($pages); krsort($pages);
$param = array(); $param = array();
$param['order'] = 'id DESC'; $param['order'] = '`ord` DESC';
if (App::getParam('category')) { if (App::getParam('category')) {
$param['where'] = 'categoryId = ' . (int) App::getParam('category') . ' AND `moderate` = 1'; $param['where'] = 'categoryId = ' . (int) App::getParam('category') . ' AND `moderate` = 1';
} else if (App::getParam('user')) { } else if (App::getParam('user')) {