1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
Daniel Neto 2024-12-16 10:09:52 -03:00
parent 5028204f33
commit 8a78d50550
6 changed files with 125 additions and 116 deletions

View file

@ -47,13 +47,15 @@ function getPagination($total, $link = "", $maxVisible = 10, $infinityScrollGetF
{
global $global, $advancedCustom;
if ($total < 2) {
return '<!-- getPagination total < 2 (' . json_encode($total) . ') -->';
return '<!-- getPagination total < 2 (' . json_encode(array('total'=>$total, 'maxVisible'=>$maxVisible, 'total'=>$total, )) . ') -->';
}
$page = getCurrentPage();
if ($total < $page) {
$page = $total;
}
//var_dump($page, $total, getCurrentPage());exit;
$isInfiniteScroll = !empty($infinityScrollGetFromSelector) && !empty($infinityScrollAppendIntoSelector);
@ -87,7 +89,7 @@ function getPagination($total, $link = "", $maxVisible = 10, $infinityScrollGetF
. _getPageItem($link, $page, $uid, true)
. "</ul></nav>";
}
$pag = '<nav aria-label="Page navigation" class="text-center ' . $class . '"><ul class="pagination"><!-- page ' . $page . ' maxVisible = ' . $maxVisible . ' ' . $link . ' -->';
$pag = '<nav aria-label="Page navigation" class="text-center ' . $class . '"><ul class="pagination"><!-- ' . json_encode(array('total'=>$total, 'maxVisible'=>$maxVisible, 'page'=>$page, 'link'=>$link, )) . ' -->';
$start = 1;
$end = $maxVisible;