From 1ab7ed73b0ea9d1f8597cf9b87bf272a7e6b99e6 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 19 Apr 2017 23:27:24 +0200 Subject: Comments added and unnecessary "abs" function calls removed. --- admin/post/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'admin/post') diff --git a/admin/post/index.php b/admin/post/index.php index 54ddd6c..5130612 100644 --- a/admin/post/index.php +++ b/admin/post/index.php @@ -10,13 +10,16 @@ define('AUTHENTICATION', TRUE); #=============================================================================== require '../../core/application.php'; +#=============================================================================== +# 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(); -- cgit v1.2.3