Skip to content

Commit ea3ee2b

Browse files
committed
Ensure page works well in subfolders. Fixes #2505
1 parent acae11b commit ea3ee2b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

system/Pager/Pager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ protected function ensureGroup(string $group)
503503
}
504504

505505
$this->groups[$group] = [
506-
'uri' => clone Services::request()->uri,
506+
'uri' => clone current_url(true),
507507
'hasMore' => false,
508508
'total' => null,
509509
'perPage' => $this->config->perPage,
@@ -520,7 +520,7 @@ protected function ensureGroup(string $group)
520520
}
521521

522522
//--------------------------------------------------------------------
523-
523+
524524
/**
525525
* Calculating the current page
526526
*
@@ -545,7 +545,7 @@ protected function calculateCurrentPage(string $group)
545545

546546
$page = (int) ($_GET[$pageSelector] ?? 1);
547547

548-
$this->groups[$group]['currentPage'] = $page < 1 ? 1 : $page;
548+
$this->groups[$group]['currentPage'] = $page < 1 ? 1 : $page;
549549
}
550550
}
551551

0 commit comments

Comments
 (0)