diff --git a/plugin/Gallery/view/mainAreaCategory.php b/plugin/Gallery/view/mainAreaCategory.php index 2637baab9..be6c4cf97 100644 --- a/plugin/Gallery/view/mainAreaCategory.php +++ b/plugin/Gallery/view/mainAreaCategory.php @@ -1,64 +1,62 @@ CategoriesRowCount * 3; $videos = Video::getAllVideos("viewableNotUnlisted", false, !$obj->hidePrivateVideos); if (!empty($videos)) { + $total = Video::getTotalVideos("viewableNotUnlisted", false, !$obj->hidePrivateVideos); + $totalPages = ceil($total / getRowCount()); + $page = getCurrentPage(); + if ($totalPages < $page) { + $page = $totalPages; + } ?>

- hidePrivateVideos); - $totalPages = ceil($total / getRowCount()); - $page = getCurrentPage(); - if ($totalPages < $page) { - $page = $totalPages; - } - ?>