This commit is contained in:
Krivchikov Dmitry 2015-10-27 00:29:35 +03:00
parent 8a8408302e
commit 5bdeeaa5c0
2 changed files with 4 additions and 1 deletions

View File

@ -38,9 +38,12 @@ class PageController extends Controller
}
// ------------------------------------------
$param = array();
$param['where'] = '`moderate` = 1';
$pointsCount = Point::model()->getCount($param);
$pagesCount = ceil($pointsCount/self::elementsByPage);
$page = isset($_GET['page']) ? abs((int)$_GET['page']) : $pagesCount;
$param = array();
$param['order'] = 'id DESC';
if (App::getParam('category')) {

View File

@ -59,7 +59,7 @@ if (App::getParam('user')) {
</div>
</div>
</div>
<?php if (!(int) App::getParam('category')):?>
<?php if (!(int) App::getParam('category') && !(int) App::getParam('user')):?>
<nav>
<ul class="pagination">
<li class="<?= ($page >= $pagesCount) ? 'disabled' : '' ?>">