Plugin have issue with paging
-
function setupPaginationSplitted(&$arr, $copyTopLevel, $arrayChildren) {
if ($this->posts_per_page == 0) {
$this->paginationMaxPage = -1;
return;
}$_childrenSizeBuff = 0;
$itemsCount = $this->getCountArrayRecursive($arrayChildren, $_childrenSizeBuff);
$this->paginationMaxPage = ceil($itemsCount / $this->posts_per_page);$currentPage = max($this->paged – 1, 0);
//$currentPage = 0;//
$itemsPerPage = $this->posts_per_page;
$maxPage = max(($this->paginationMaxPage – 1), 0);$arrayPages = array();
$allowedIDs = $this->prepareArrayPages($arrayPages, $copyTopLevel, $arrayChildren, $currentPage, $itemsPerPage, $maxPage);$new_arr = array();
$arr_copy = $arr;
$this->dropNotIncluded($arr, $allowedIDs, $new_arr);
$arr = $new_arr;if ($currentPage > 0) {
$prev_arrayPages = array();
$prev_allowedIDs = $this->prepareArrayPages($prev_arrayPages, $copyTopLevel, $arrayChildren, ($currentPage – 1), $itemsPerPage, $maxPage);
$prev_new_arr = array();
$this->dropNotIncluded($arr_copy, $prev_allowedIDs, $prev_new_arr);
$this->previousPage = $prev_new_arr;
//print_r($this->previousPage);
}
}If $currentPage = 0 is wrong line
The page I need help with: [log in to see the link]
The topic ‘Plugin have issue with paging’ is closed to new replies.