remove the if(pages>1) so that the if > line always happens

This commit is contained in:
Isaac Connor 2016-04-15 16:11:53 -04:00
parent 28b30ecb47
commit 50f2747bb4
1 changed files with 5 additions and 7 deletions

View File

@ -66,14 +66,12 @@ if ( !empty($limit) && $nEvents > $limit )
$nEvents = $limit;
}
$pages = (int)ceil($nEvents/ZM_WEB_EVENTS_PER_PAGE);
if ( $pages > 1 ) {
if ( !empty($page) ) {
if ( $page < 0 )
$page = 1;
if ( $page > $pages )
$page = $pages;
}
}
if ( !empty($page) ) {
$limitStart = (($page-1)*ZM_WEB_EVENTS_PER_PAGE);
if ( empty( $limit ) )