diff --git a/backend/controllers/SiteController.php b/backend/controllers/SiteController.php index 08b1afa7..5be5cdf8 100644 --- a/backend/controllers/SiteController.php +++ b/backend/controllers/SiteController.php @@ -160,11 +160,11 @@ public function actionMain() $statics = [ 'ARTICLE' => [ $temp['ARTICLE'], - $temp['ARTICLE'] ? sprintf("%01.2f",($articleService->getArticlesCountByPeriod(strtotime(date('Y-m-01 00:00:00')), strtotime(date('Y-m-01 23:59:59') . " +1 month -1 day")) / $temp['USER']) * 100) : $percent + $temp['ARTICLE'] ? sprintf("%01.2f",($articleService->getArticlesCountByPeriod(strtotime(date('Y-m-01 00:00:00')), strtotime(date('Y-m-01 23:59:59') . " +1 month -1 day")) / $temp['ARTICLE']) * 100) : $percent ], 'COMMENT' => [ $temp['COMMENT'], - $temp['COMMENT'] ? sprintf("%01.2f",($commentService->getCommentCountByPeriod(strtotime(date('Y-m-01 00:00:00')), strtotime(date('Y-m-01 23:59:59'))) / $temp['USER']) * 100) : $percent + $temp['COMMENT'] ? sprintf("%01.2f",($commentService->getCommentCountByPeriod(strtotime(date('Y-m-01 00:00:00')), strtotime(date('Y-m-01 23:59:59'))) / $temp['COMMENT']) * 100) : $percent ], 'USER' => [ $temp['USER'], @@ -172,7 +172,7 @@ public function actionMain() ], 'FRIENDLY_LINK' => [ $temp['FRIENDLY_LINK'], - $temp['FRIENDLY_LINK'] ? sprintf("%01.2f",($friendlyLinkService->getFriendlyLinkCountByPeriod(strtotime(date('Y-m-01 00:00:00')), strtotime(date('Y-m-01 23:59:59') . " +1 month -1 day")) / $temp['USER']) * 100) : $percent + $temp['FRIENDLY_LINK'] ? sprintf("%01.2f",($friendlyLinkService->getFriendlyLinkCountByPeriod(strtotime(date('Y-m-01 00:00:00')), strtotime(date('Y-m-01 23:59:59') . " +1 month -1 day")) / $temp['FRIENDLY_LINK']) * 100) : $percent ], ]; /** @var CommentServiceInterface $commentService */