aboutsummaryrefslogtreecommitdiffstats
path: root/core/include/category
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-07-20 00:27:46 +0200
committerThomas Lange <code@nerdmind.de>2021-07-20 00:34:47 +0200
commit01d4727f939c0b9530fe5fc976b7accb9e078db1 (patch)
tree2053b57a25ef42cec5c6e79ae837e5a4d0ceb69e /core/include/category
parentdd4b3d9ebb85c9bc8138212fd7cb207ab154f626 (diff)
downloadblog-01d4727f939c0b9530fe5fc976b7accb9e078db1.tar.gz
blog-01d4727f939c0b9530fe5fc976b7accb9e078db1.tar.xz
blog-01d4727f939c0b9530fe5fc976b7accb9e078db1.zip
Rename and reorganize several "get count" methods
Diffstat (limited to 'core/include/category')
-rw-r--r--core/include/category/main.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/include/category/main.php b/core/include/category/main.php
index 2e84aa1..46ffa75 100644
--- a/core/include/category/main.php
+++ b/core/include/category/main.php
@@ -74,7 +74,7 @@ foreach($child_categories as $ChildCategory) {
$site_size = Application::get('POST.LIST_SIZE');
$site_sort = Application::get('POST.LIST_SORT');
-$count = $PostRepository->getCountByCategory($Category);
+$count = $CategoryRepository->getNumberOfPosts($Category);
$lastSite = ceil($count / $site_size);
$currentSite = HTTP::GET('site') ?? 1;
@@ -106,8 +106,8 @@ $CategoryTemplate = Template\Factory::build('category/main');
$CategoryTemplate->set('CATEGORY', $category_data);
$CategoryTemplate->set('CATEGORIES', $category_list ?? []);
$CategoryTemplate->set('COUNT', [
- 'POST' => $PostRepository->getCountByCategory($Category),
- 'CHILDREN' => $CategoryRepository->getChildrenCount($Category)
+ 'POST' => $CategoryRepository->getNumberOfPosts($Category),
+ 'CHILDREN' => $CategoryRepository->getNumberOfChildren($Category)
]);
$CategoryTemplate->set('PAGINATION', [
'THIS' => $currentSite,