| @@ 112-122 (lines=11) @@ | ||
| 109 | } |
|
| 110 | } |
|
| 111 | ||
| 112 | if (! $game->getForm()) { |
|
| 113 | return $this->redirect()->toUrl( |
|
| 114 | $this->frontendUrl()->fromRoute( |
|
| 115 | 'postvote', |
|
| 116 | array( |
|
| 117 | 'id' => $identifier, |
|
| 118 | ||
| 119 | ) |
|
| 120 | ) |
|
| 121 | ); |
|
| 122 | } |
|
| 123 | ||
| 124 | $form = $sg->createFormFromJson($game->getForm()->getForm(), 'postvoteForm'); |
|
| 125 | ||
| @@ 293-303 (lines=11) @@ | ||
| 290 | // Je recherche le post associé à entry + status == 0. Si non trouvé, je redirige vers home du jeu. |
|
| 291 | $post = $sg->getPostVotePostMapper()->findById($postId); |
|
| 292 | ||
| 293 | if (! $post || $post->getStatus() === 9) { |
|
| 294 | return $this->redirect()->toUrl( |
|
| 295 | $this->frontendUrl()->fromRoute( |
|
| 296 | 'postvote', |
|
| 297 | array( |
|
| 298 | 'id' => $identifier, |
|
| 299 | ||
| 300 | ) |
|
| 301 | ) |
|
| 302 | ); |
|
| 303 | } |
|
| 304 | ||
| 305 | $formModeration = new Form(); |
|
| 306 | $formModeration->setAttribute('method', 'post'); |
|