From c5571549723b4f7e423b3d048a889be71b9badd6 Mon Sep 17 00:00:00 2001 From: filesite Date: Mon, 29 Jul 2024 19:45:35 +0800 Subject: [PATCH] improve pagination support --- themes/beauty/controller/ListController.php | 2 ++ themes/beauty/controller/SiteController.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/themes/beauty/controller/ListController.php b/themes/beauty/controller/ListController.php index 1a77048..4c80e5e 100644 --- a/themes/beauty/controller/ListController.php +++ b/themes/beauty/controller/ListController.php @@ -136,6 +136,8 @@ Class ListController extends Controller { //翻页支持 $page = $this->get('page', 1); $pageSize = $this->get('limit', 24); + $page = (int)$page; + $pageSize = (int)$pageSize; //底部版权申明配置支持 diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index cec2f52..6ce25d7 100644 --- a/themes/beauty/controller/SiteController.php +++ b/themes/beauty/controller/SiteController.php @@ -122,6 +122,8 @@ Class SiteController extends Controller { //翻页支持 $page = $this->get('page', 1); $pageSize = $this->get('limit', 24); + $page = (int)$page; + $pageSize = (int)$pageSize; $pageTitle = !empty($titles) ? $titles[0]['name'] : "FileSite.io"; if (!empty($readmeFile['title'])) {