Fixed history for posts uploaded anonymously
Until now posts uploaded anonymously were not so anonymous - the author was clearly visible in post history (and tag history if the upload has led to creation of any new tags). Both of these are fixed now.
This commit is contained in:
parent
8a33b9581d
commit
839e97b1e2
1 changed files with 4 additions and 1 deletions
|
@ -109,10 +109,13 @@ class PostService
|
|||
{
|
||||
$formData->validate($this->validator);
|
||||
|
||||
if ($formData->anonymous)
|
||||
$this->authService->loginAnonymous();
|
||||
|
||||
$post = new Post();
|
||||
$post->setUploadTime($this->timeService->getCurrentTime());
|
||||
$post->setLastEditTime($this->timeService->getCurrentTime());
|
||||
$post->setUser($formData->anonymous ? null : $this->authService->getLoggedInUser());
|
||||
$post->setUser($this->authService->getLoggedInUser());
|
||||
$post->setOriginalFileName($formData->contentFileName);
|
||||
$post->setName($this->getUniqueRandomPostName());
|
||||
|
||||
|
|
Loading…
Reference in a new issue