Permalink
Browse files

Merge pull request #112 from cosmocode/fixPagination

Fix pagination if not multiple of column count
  • Loading branch information...
splitbrain committed Jul 20, 2018
2 parents 02b9064 + 73eb96b commit 9a5962f94fba369fadb5384f920251b1d2e38987
Showing with 3 additions and 2 deletions.
  1. +3 −2 syntax.php
View
@@ -403,7 +403,7 @@ function _gallery($data){
$ret .= '</td>';
$i++;
// done with this row? cloase it
// done with this row? close it
$close_tr = true;
if($i % $data['cols'] == 0){
$ret .= '</tr>';
@@ -423,9 +423,10 @@ function _gallery($data){
$ret .= '</table>';
$ret .= '</div>';
$close_pg = false;
$i = 0; // reset counter to ensure next page is properly started
}
}
} // foreach
if ($close_tr){
// add remaining empty cells

0 comments on commit 9a5962f

Please sign in to comment.