| @@ 88-93 (lines=6) @@ | ||
| 85 | } |
|
| 86 | } |
|
| 87 | ||
| 88 | if (empty($pollAnswers)) { |
|
| 89 | $this->Flash->error(__d('admin', 'You must add at least one answer for this poll.')); |
|
| 90 | $this->set(compact('poll', 'articles')); |
|
| 91 | ||
| 92 | return; |
|
| 93 | } |
|
| 94 | $poll->user_id = $this->Auth->user('id'); |
|
| 95 | $poll->polls_answers = $pollAnswers; |
|
| 96 | $poll->unsetProperty('anwsers'); |
|
| @@ 174-179 (lines=6) @@ | ||
| 171 | } |
|
| 172 | } |
|
| 173 | ||
| 174 | if (empty($poll->polls_answers)) { |
|
| 175 | $this->Flash->error(__d('admin', 'You must add at least one answer for this poll.')); |
|
| 176 | $this->set(compact('poll', 'articles')); |
|
| 177 | ||
| 178 | return; |
|
| 179 | } |
|
| 180 | ||
| 181 | $poll->user_id = $this->Auth->user('id'); |
|
| 182 | $poll->unsetProperty('anwsers'); |
|