From 942f3c04cbd3e14b514e0534e51f860f2d8a40b2 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 6 Aug 2018 21:46:58 +0200 Subject: [PATCH] change amount for number --- bl-kernel/abstract/dbjson.class.php | 2 +- bl-kernel/abstract/dblist.class.php | 6 ++-- bl-kernel/admin/controllers/content.php | 4 +-- bl-kernel/admin/themes/booty/html/media.php | 4 +-- bl-kernel/admin/views/content.php | 2 +- bl-kernel/ajax/list-files.php | 2 +- bl-kernel/boot/rules/69.pages.php | 2 +- bl-kernel/boot/rules/99.paginator.php | 18 +++++----- bl-kernel/functions.php | 12 +++---- bl-kernel/helpers/paginator.class.php | 40 ++++++++++----------- bl-kernel/pages.class.php | 12 +++---- bl-kernel/pagex.class.php | 14 +++++--- bl-plugins/api/plugin.php | 10 +++--- bl-plugins/navigation/plugin.php | 8 ++--- bl-plugins/rss/plugin.php | 8 ++--- bl-plugins/sitemap/plugin.php | 4 +-- bl-themes/alternative/php/home.php | 2 +- bl-themes/blogx/php/home.php | 2 +- things-to-do | 8 ++--- 19 files changed, 82 insertions(+), 78 deletions(-) diff --git a/bl-kernel/abstract/dbjson.class.php b/bl-kernel/abstract/dbjson.class.php index 09251aab..8c245b55 100644 --- a/bl-kernel/abstract/dbjson.class.php +++ b/bl-kernel/abstract/dbjson.class.php @@ -47,7 +47,7 @@ class dbJSON { return true; } - // Returns the amount of rows in the database + // Returns the number of rows in the database public function count() { return count($this->db); diff --git a/bl-kernel/abstract/dblist.class.php b/bl-kernel/abstract/dblist.class.php index ee36d459..4bb870a8 100644 --- a/bl-kernel/abstract/dblist.class.php +++ b/bl-kernel/abstract/dblist.class.php @@ -34,7 +34,7 @@ class dbList extends dbJSON } // Returns the list of keys filter by pageNumber - public function getList($key, $pageNumber, $amountOfItems) + public function getList($key, $pageNumber, $numberOfItems) { if (!isset($this->db[$key])) { Log::set(__METHOD__.LOG_SEP.'Error key does not exist '.$key); @@ -45,7 +45,7 @@ class dbList extends dbJSON $list = $this->db[$key]['list']; // Returns all the items from the list - if ($amountOfItems==-1) { + if ($numberOfItems==-1) { // Invert keys to values, is necesary returns as key the key pages $list = array_flip($list); return $list; @@ -53,7 +53,7 @@ class dbList extends dbJSON // The first page number is 1, so the real is 0 $realPageNumber = $pageNumber - 1; - $chunks = array_chunk($list, $amountOfItems); + $chunks = array_chunk($list, $numberOfItems); if (isset($chunks[$realPageNumber])) { return $chunks[$realPageNumber]; } diff --git a/bl-kernel/admin/controllers/content.php b/bl-kernel/admin/controllers/content.php index a4342a7c..3ea7755f 100644 --- a/bl-kernel/admin/controllers/content.php +++ b/bl-kernel/admin/controllers/content.php @@ -24,9 +24,9 @@ checkRole(array('admin', 'editor')); // List of published pages $onlyPublished = true; -$amountOfItems = ITEMS_PER_PAGE_ADMIN; +$numberOfItems = ITEMS_PER_PAGE_ADMIN; $pageNumber = $url->pageNumber(); -$published = $pages->getList($pageNumber, $amountOfItems, $onlyPublished); +$published = $pages->getList($pageNumber, $numberOfItems, $onlyPublished); // Check if out of range the pageNumber if (empty($published) && $url->pageNumber()>1) { diff --git a/bl-kernel/admin/themes/booty/html/media.php b/bl-kernel/admin/themes/booty/html/media.php index 5d21ebac..ed523f77 100644 --- a/bl-kernel/admin/themes/booty/html/media.php +++ b/bl-kernel/admin/themes/booty/html/media.php @@ -9,7 +9,7 @@ if (!empty($listOfFilesByPage[0])) { } } // Amount of pages for the paginator -$amountOfPages = count($listOfFilesByPage); +$numberOfPages = count($listOfFilesByPage); ?>