aboutsummaryrefslogtreecommitdiffstats
path: root/core/include/user/main.php
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/user/main.php
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/user/main.php')
-rw-r--r--core/include/user/main.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/include/user/main.php b/core/include/user/main.php
index c0cb20d..ef27351 100644
--- a/core/include/user/main.php
+++ b/core/include/user/main.php
@@ -2,8 +2,6 @@
#===============================================================================
# Get repositories
#===============================================================================
-$PageRepository = Application::getRepository('Page');
-$PostRepository = Application::getRepository('Post');
$UserRepository = Application::getRepository('User');
#===============================================================================
@@ -54,8 +52,8 @@ if($NextUser = $UserRepository->findNext($User)) {
$UserTemplate = Template\Factory::build('user/main');
$UserTemplate->set('USER', $user_data);
$UserTemplate->set('COUNT', [
- 'POST' => $PostRepository->getCountByUser($User),
- 'PAGE' => $PageRepository->getCountByUser($User)
+ 'PAGE' => $UserRepository->getNumberOfPages($User),
+ 'POST' => $UserRepository->getNumberOfPosts($User)
]);
$MainTemplate = Template\Factory::build('main');