| @@ 439-446 (lines=8) @@ | ||
| 436 | if ($totalPostOptions < 2) |
|
| 437 | { |
|
| 438 | // Need two? |
|
| 439 | if ($totalPostOptions == 0) |
|
| 440 | $context['choices'][] = array( |
|
| 441 | 'id' => $last_id++, |
|
| 442 | 'number' => $number++, |
|
| 443 | 'label' => '', |
|
| 444 | 'votes' => -1, |
|
| 445 | 'is_last' => false |
|
| 446 | ); |
|
| 447 | $poll_errors[] = 'poll_few'; |
|
| 448 | } |
|
| 449 | ||
| @@ 512-520 (lines=9) @@ | ||
| 509 | 'is_last' => false |
|
| 510 | ); |
|
| 511 | ||
| 512 | if (count($context['choices']) < 2) |
|
| 513 | { |
|
| 514 | $context['choices'][] = array( |
|
| 515 | 'id' => $choice_id++, |
|
| 516 | 'number' => $choice_id, |
|
| 517 | 'label' => '', |
|
| 518 | 'is_last' => false |
|
| 519 | ); |
|
| 520 | } |
|
| 521 | $context['last_choice_id'] = $choice_id; |
|
| 522 | $context['choices'][count($context['choices']) - 1]['is_last'] = true; |
|
| 523 | } |
|