summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-04-19 23:27:24 +0200
committerThomas Lange <code@nerdmind.de>2017-04-19 23:27:24 +0200
commit1ab7ed73b0ea9d1f8597cf9b87bf272a7e6b99e6 (patch)
tree45f480a8ed8267489ad62f12c486e7ab16c748ce /admin
parent772f4ebd5d9b22fdfad044a42d4ab9f16cee925b (diff)
downloadblog-1ab7ed73b0ea9d1f8597cf9b87bf272a7e6b99e6.tar.gz
blog-1ab7ed73b0ea9d1f8597cf9b87bf272a7e6b99e6.tar.xz
blog-1ab7ed73b0ea9d1f8597cf9b87bf272a7e6b99e6.zip
Comments added and unnecessary "abs" function calls removed.
Diffstat (limited to 'admin')
-rw-r--r--admin/page/index.php5
-rw-r--r--admin/post/index.php5
-rw-r--r--admin/user/index.php5
3 files changed, 12 insertions, 3 deletions
diff --git a/admin/page/index.php b/admin/page/index.php
index 1405ff4..eeedbc1 100644
--- a/admin/page/index.php
+++ b/admin/page/index.php
@@ -10,13 +10,16 @@ define('AUTHENTICATION', TRUE);
#===============================================================================
require '../../core/application.php';
+#===============================================================================
+# Pagination
+#===============================================================================
$site_size = Application::get('PAGE.LIST_SIZE');
$site_sort = Application::get('PAGE.LIST_SORT');
$lastSite = ceil($Database->query(sprintf('SELECT COUNT(id) FROM %s', Page\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();
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();
diff --git a/admin/user/index.php b/admin/user/index.php
index 8631ac9..ca4dcab 100644
--- a/admin/user/index.php
+++ b/admin/user/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', User\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();