From 886ff883a98147c094f84891061c15823468a53b Mon Sep 17 00:00:00 2001 From: danpros Date: Sun, 3 Mar 2024 18:37:24 +0700 Subject: [PATCH] Update admin.php --- system/admin/admin.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/system/admin/admin.php b/system/admin/admin.php index 4237632..f79382e 100644 --- a/system/admin/admin.php +++ b/system/admin/admin.php @@ -1627,7 +1627,6 @@ function reorder_subpages($subpages = null) rebuilt_cache(); } -// Return image gallery in pager. // Return image gallery in pager. function image_gallery($images, $page = 1, $perpage = 0) { @@ -1635,8 +1634,8 @@ function image_gallery($images, $page = 1, $perpage = 0) $images = scan_images(); } $tmp = ''; - $images = array_slice($images, ($page - 1) * $perpage, $perpage); - $pagination = has_pagination(count($images), $perpage, $page); + $pagination = has_pagination(count($images), $perpage, $page); + $images = array_slice($images, ($page - 1) * $perpage, $perpage); $tmp .= '
'; foreach ($images as $index => $v) { $tmp .= '
';