Skip to content

Commit

Permalink
fix: corrected base URL for pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Jun 18, 2024
1 parent c1fcae5 commit b4f31e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 7 additions & 1 deletion phpmyfaq/admin/attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@

$crumbs = array_slice($allCrumbs, ($page - 1) * $itemsPerPage, $itemsPerPage);

$baseUrl = sprintf(
'%sadmin/?action=attachments&page=%d',
$faqConfig->getDefaultUrl(),
$page
);

$pagination = new Pagination(
[
'baseUrl' => $faqConfig->getDefaultUrl() . $request->getRequestUri(),
'baseUrl' => $baseUrl,
'total' => is_countable($allCrumbs) ? count($allCrumbs) : 0,
'perPage' => $itemsPerPage,
]
Expand Down
3 changes: 0 additions & 3 deletions phpmyfaq/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,6 @@
case 'cutcategory':
require 'category.cut.php';
break;
case 'movecategory':
require 'category.move.php';
break;
case 'showcategory':
require 'category.showstructure.php';
break;
Expand Down

0 comments on commit b4f31e9

Please sign in to comment.