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 .= '