aboutsummaryrefslogtreecommitdiffstats
path: root/core/include/post/list.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/include/post/list.php')
-rw-r--r--core/include/post/list.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/include/post/list.php b/core/include/post/list.php
index f2edd0b..4b8ea28 100644
--- a/core/include/post/list.php
+++ b/core/include/post/list.php
@@ -5,13 +5,16 @@
$Database = Application::getDatabase();
$Language = Application::getLanguage();
+#===============================================================================
+# Pagination
+#===============================================================================
$site_size = Application::get('POST.LIST_SIZE');
$site_sort = Application::get('POST.LIST_SORT');
$lastSite = ceil($Database->query(sprintf('SELECT COUNT(id) FROM %s', Post\Attribute::TABLE))->fetchColumn() / $site_size);
$currentSite = HTTP::GET('site') ?? 1;
-$currentSite = abs(intval($currentSite));
+$currentSite = intval($currentSite);
if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) {
Application::error404();