Function __global->edit_poll
Definitions
sources/polls2.php
- Edit a poll.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the poll to edit |
| $question | SHORT_TEXT | No | No | required parameter | N/A | N/A | The question |
| $a1 | SHORT_TEXT | No | No | required parameter | N/A | 1 max | The first choice |
| $a2 | SHORT_TEXT | No | No | required parameter | N/A | 1 max | The second choice |
| $a3 | SHORT_TEXT | No | No | required parameter | N/A | N/A | The third choice (blank means not a choice) |
| $a4 | SHORT_TEXT | No | No | required parameter | N/A | N/A | The fourth choice (blank means not a choice) |
| $a5 | SHORT_TEXT | No | No | required parameter | N/A | N/A | The fifth choice (blank means not a choice) |
| $a6 | SHORT_TEXT | No | No | required parameter | N/A | N/A | The sixth choice (blank means not a choice) |
| $a7 | SHORT_TEXT | No | No | required parameter | N/A | N/A | The seventh choice (blank means not a choice) |
| $a8 | SHORT_TEXT | No | No | required parameter | N/A | N/A | The eighth choice (blank means not a choice) |
| $a9 | SHORT_TEXT | No | No | required parameter | N/A | N/A | The ninth choice (blank means not a choice) |
| $a10 | SHORT_TEXT | No | No | required parameter | N/A | N/A | The tenth choice (blank means not a choice) |
| $num_options | integer | No | No | required parameter | N/A | N/A | The number of choices |
| $allow_rating | BINARY | No | No | required parameter | N/A | N/A | Whether to allow rating of this poll |
| $allow_comments | SHORT_INTEGER | No | No | required parameter | N/A | N/A | Whether comments are allowed (0=no, 1=yes, 2=review style) |
| $allow_trackbacks | BINARY | No | No | required parameter | N/A | N/A | Whether to allow trackbacking on this poll |
| $notes | LONG_TEXT | No | No | required parameter | N/A | N/A | Notes about this poll |
| $edit_time | ?TIME | No | No | Null | N/A | N/A | Edit time (null: either means current time, or if $null_is_literal, means reset to to null) |
| $add_time | ?TIME | No | No | Null | N/A | N/A | Add time (null: do not change) |
| $views | ?integer | No | No | Null | N/A | N/A | Number of views (null: do not change) |
| $submitter | ?MEMBER | No | No | Null | N/A | N/A | Submitter (null: do not change) |
| $null_is_literal | boolean | No | No | False | N/A | N/A | Determines whether some nulls passed mean 'use a default' or literally mean 'set to null' |
Preview
Code (PHP)
/**
* Edit a poll.
*
* @param AUTO_LINK $id The ID of the poll to edit
* @param SHORT_TEXT $question The question
* @param SHORT_TEXT $a1 The first choice
* @range 1 max
* @param SHORT_TEXT $a2 The second choice
* @range 1 max
* @param SHORT_TEXT $a3 The third choice (blank means not a choice)
* @param SHORT_TEXT $a4 The fourth choice (blank means not a choice)
* @param SHORT_TEXT $a5 The fifth choice (blank means not a choice)
* @param SHORT_TEXT $a6 The sixth choice (blank means not a choice)
* @param SHORT_TEXT $a7 The seventh choice (blank means not a choice)
* @param SHORT_TEXT $a8 The eighth choice (blank means not a choice)
* @param SHORT_TEXT $a9 The ninth choice (blank means not a choice)
* @param SHORT_TEXT $a10 The tenth choice (blank means not a choice)
* @param integer $num_options The number of choices
* @param BINARY $allow_rating Whether to allow rating of this poll
* @param SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style)
* @param BINARY $allow_trackbacks Whether to allow trackbacking on this poll
* @param LONG_TEXT $notes Notes about this poll
* @param ?TIME $edit_time Edit time (null: either means current time, or if $null_is_literal, means reset to to null)
* @param ?TIME $add_time Add time (null: do not change)
* @param ?integer $views Number of views (null: do not change)
* @param ?MEMBER $submitter Submitter (null: do not change)
* @param boolean $null_is_literal Determines whether some nulls passed mean 'use a default' or literally mean 'set to null'
*/
function edit_poll(int $id, string $question, string $a1, string $a2, string $a3, string $a4, string $a5, string $a6, string $a7, string $a8, string $a9, string $a10, int $num_options, int $allow_rating, int $allow_comments, int $allow_trackbacks, string $notes, ?int $edit_time = null, ?int $add_time = null, ?int $views = null, ?int $submitter = null, bool $null_is_literal = false)
* Edit a poll.
*
* @param AUTO_LINK $id The ID of the poll to edit
* @param SHORT_TEXT $question The question
* @param SHORT_TEXT $a1 The first choice
* @range 1 max
* @param SHORT_TEXT $a2 The second choice
* @range 1 max
* @param SHORT_TEXT $a3 The third choice (blank means not a choice)
* @param SHORT_TEXT $a4 The fourth choice (blank means not a choice)
* @param SHORT_TEXT $a5 The fifth choice (blank means not a choice)
* @param SHORT_TEXT $a6 The sixth choice (blank means not a choice)
* @param SHORT_TEXT $a7 The seventh choice (blank means not a choice)
* @param SHORT_TEXT $a8 The eighth choice (blank means not a choice)
* @param SHORT_TEXT $a9 The ninth choice (blank means not a choice)
* @param SHORT_TEXT $a10 The tenth choice (blank means not a choice)
* @param integer $num_options The number of choices
* @param BINARY $allow_rating Whether to allow rating of this poll
* @param SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style)
* @param BINARY $allow_trackbacks Whether to allow trackbacking on this poll
* @param LONG_TEXT $notes Notes about this poll
* @param ?TIME $edit_time Edit time (null: either means current time, or if $null_is_literal, means reset to to null)
* @param ?TIME $add_time Add time (null: do not change)
* @param ?integer $views Number of views (null: do not change)
* @param ?MEMBER $submitter Submitter (null: do not change)
* @param boolean $null_is_literal Determines whether some nulls passed mean 'use a default' or literally mean 'set to null'
*/
function edit_poll(int $id, string $question, string $a1, string $a2, string $a3, string $a4, string $a5, string $a6, string $a7, string $a8, string $a9, string $a10, int $num_options, int $allow_rating, int $allow_comments, int $allow_trackbacks, string $notes, ?int $edit_time = null, ?int $add_time = null, ?int $views = null, ?int $submitter = null, bool $null_is_literal = false)

