forked from GNUsocial/gnu-social
[Actor] Refactor GSActor into Actor
This commit is contained in:
@@ -82,7 +82,7 @@ class AnswerPoll
|
||||
if (PollResponse::exits($poll->getId(), $user->getId())) {
|
||||
throw new ServerException('User already responded to poll');
|
||||
}
|
||||
$pollResponse = PollResponse::create(['poll_id' => $poll->getId(), 'gsactor_id' => $user->getId(), 'selection' => $selection]);
|
||||
$pollResponse = PollResponse::create(['poll_id' => $poll->getId(), 'actor_id' => $user->getId(), 'selection' => $selection]);
|
||||
DB::persist($pollResponse);
|
||||
DB::flush();
|
||||
|
||||
|
@@ -83,7 +83,7 @@ class NewPoll
|
||||
if ($form->isValid()) {
|
||||
$data = $form->getData();
|
||||
|
||||
$note = Note::create(['gsactor_id' => $user->getId(), $is_local = true]);
|
||||
$note = Note::create(['actor_id' => $user->getId(), $is_local = true]);
|
||||
DB::persist($note);
|
||||
|
||||
Security::sanitize($question = $data['Question']);
|
||||
@@ -92,7 +92,7 @@ class NewPoll
|
||||
}
|
||||
|
||||
$options = implode("\n",$opt);
|
||||
$poll = Poll::create(['gsactor_id' => $user->getId(), 'question' => $question, 'options' => $options, 'note_id' => $note->getId()]);
|
||||
$poll = Poll::create(['actor_id' => $user->getId(), 'question' => $question, 'options' => $options, 'note_id' => $note->getId()]);
|
||||
DB::persist($poll);
|
||||
DB::flush();
|
||||
throw new RedirectException('root');
|
||||
|
Reference in New Issue
Block a user