|
@@ 337-341 (lines=5) @@
|
| 334 |
|
$smcFunc['db_free_result']($request); |
| 335 |
|
|
| 336 |
|
// If we are adding a new poll - make sure that there isn't already a poll there. |
| 337 |
|
if (!$context['is_edit'] && !empty($pollinfo['id_poll'])) |
| 338 |
|
fatal_lang_error('poll_already_exists'); |
| 339 |
|
// Otherwise, if we're editing it, it does exist I assume? |
| 340 |
|
elseif ($context['is_edit'] && empty($pollinfo['id_poll'])) |
| 341 |
|
fatal_lang_error('poll_not_found'); |
| 342 |
|
|
| 343 |
|
// Can you do this? |
| 344 |
|
if ($context['is_edit'] && !allowedTo('poll_edit_any')) |
|
@@ 632-636 (lines=5) @@
|
| 629 |
|
$smcFunc['db_free_result']($request); |
| 630 |
|
|
| 631 |
|
// Check their adding/editing is valid. |
| 632 |
|
if (!$isEdit && !empty($bcinfo['id_poll'])) |
| 633 |
|
fatal_lang_error('poll_already_exists'); |
| 634 |
|
// Are we editing a poll which doesn't exist? |
| 635 |
|
elseif ($isEdit && empty($bcinfo['id_poll'])) |
| 636 |
|
fatal_lang_error('poll_not_found'); |
| 637 |
|
|
| 638 |
|
// Check if they have the power to add or edit the poll. |
| 639 |
|
if ($isEdit && !allowedTo('poll_edit_any')) |