From 7406f76a5aeea0e72debf6b3e96335942dba5f96 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Fri, 31 Oct 2014 23:22:20 +0100 Subject: [PATCH] Fixed post featuring --- src/Services/PostFeatureService.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Services/PostFeatureService.php b/src/Services/PostFeatureService.php index c8014a39..d48d5001 100644 --- a/src/Services/PostFeatureService.php +++ b/src/Services/PostFeatureService.php @@ -7,7 +7,7 @@ use Szurubooru\Dao\TransactionManager; use Szurubooru\Entities\GlobalParam; use Szurubooru\Entities\Post; use Szurubooru\Services\AuthService; -use Szurubooru\Services\HistoryService; +use Szurubooru\Services\PostHistoryService; use Szurubooru\Services\TimeService; use Szurubooru\Validator; @@ -19,7 +19,7 @@ class PostFeatureService private $globalParamDao; private $authService; private $timeService; - private $historyService; + private $postHistoryService; public function __construct( TransactionManager $transactionManager, @@ -28,7 +28,7 @@ class PostFeatureService GlobalParamDao $globalParamDao, AuthService $authService, TimeService $timeService, - HistoryService $historyService) + PostHistoryService $postHistoryService) { $this->transactionManager = $transactionManager; $this->postDao = $postDao; @@ -36,7 +36,7 @@ class PostFeatureService $this->globalParamDao = $globalParamDao; $this->authService = $authService; $this->timeService = $timeService; - $this->historyService = $historyService; + $this->postHistoryService = $postHistoryService; } public function getFeaturedPost() @@ -87,8 +87,8 @@ class PostFeatureService $this->globalParamDao->save($globalParam); if ($previousFeaturedPost) - $this->historyService->saveSnapshot($this->historyService->getPostChangeSnapshot($previousFeaturedPost)); - $this->historyService->saveSnapshot($this->historyService->getPostChangeSnapshot($post)); + $this->postHistoryService->savePostChange($previousFeaturedPost); + $this->postHistoryService->savePostChange($post); }; $this->transactionManager->commit($transactionFunc); }