Skip to content

Commit

Permalink
Merge pull request #8 from dimadimx/feature/add_per_page_option
Browse files Browse the repository at this point in the history
fix old hashes
  • Loading branch information
SanderVanKeer authored May 27, 2024
2 parents 6b6d7e6 + 1821132 commit 5b9398d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Skeleton/Pager/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ protected static function get_options_from_hash($hash) {
$data = @gzdecode(base64_decode(rawurldecode($hash)));
if ($data !== false) {
$options = json_decode($data, true);
//support for old hashes
if (isset($options['per_page']) === false) {
$options['per_page'] = Config::$items_per_page;
}
} else {
$options = [
'conditions' => [],
Expand Down

0 comments on commit 5b9398d

Please sign in to comment.