Fixed backend crash on tag editing
This commit is contained in:
parent
ff66ec2416
commit
703cc4724a
1 changed files with 4 additions and 4 deletions
|
@ -18,7 +18,7 @@ class TagService
|
||||||
private $tagDao;
|
private $tagDao;
|
||||||
private $fileDao;
|
private $fileDao;
|
||||||
private $timeService;
|
private $timeService;
|
||||||
private $historyService;
|
private $postHistoryService;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Validator $validator,
|
Validator $validator,
|
||||||
|
@ -26,7 +26,7 @@ class TagService
|
||||||
PostDao $postDao,
|
PostDao $postDao,
|
||||||
TagDao $tagDao,
|
TagDao $tagDao,
|
||||||
PublicFileDao $fileDao,
|
PublicFileDao $fileDao,
|
||||||
HistoryService $historyService,
|
PostHistoryService $postHistoryService,
|
||||||
TimeService $timeService)
|
TimeService $timeService)
|
||||||
{
|
{
|
||||||
$this->validator = $validator;
|
$this->validator = $validator;
|
||||||
|
@ -34,7 +34,7 @@ class TagService
|
||||||
$this->postDao = $postDao;
|
$this->postDao = $postDao;
|
||||||
$this->tagDao = $tagDao;
|
$this->tagDao = $tagDao;
|
||||||
$this->fileDao = $fileDao;
|
$this->fileDao = $fileDao;
|
||||||
$this->historyService = $historyService;
|
$this->postHistoryService = $postHistoryService;
|
||||||
$this->timeService = $timeService;
|
$this->timeService = $timeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ class TagService
|
||||||
{
|
{
|
||||||
$posts = $this->postDao->findByTagName($tag->getName());
|
$posts = $this->postDao->findByTagName($tag->getName());
|
||||||
foreach ($posts as $post)
|
foreach ($posts as $post)
|
||||||
$this->historyService->saveSnapshot($this->historyService->getPostChangeSnapshot($post));
|
$this->postHistoryService->savePostChange($post);
|
||||||
};
|
};
|
||||||
$this->transactionManager->commit($transactionFunc);
|
$this->transactionManager->commit($transactionFunc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue