Function __global->cns_edit_topic
Definitions
sources/cns_topics_action2.php
- Edit a topic.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $topic_id | ?AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the topic to edit (null: Private Topic) |
| $description | ?SHORT_TEXT | No | No | Null | N/A | N/A | Description of the topic (null: do not change) |
| $emoticon | ?SHORT_TEXT | No | No | Null | N/A | N/A | The image code of the emoticon for the topic (null: do not change) |
| $validated | ?BINARY | No | No | Null | N/A | N/A | Whether the topic is validated (null: do not change) |
| $open | ?BINARY | No | No | Null | N/A | N/A | Whether the topic is open (null: do not change) |
| $pinned | ?BINARY | No | No | Null | N/A | N/A | Whether the topic is pinned (null: do not change) |
| $cascading | ?BINARY | No | No | Null | N/A | N/A | Whether the topic is cascading (null: do not change) |
| $reason | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | The reason for this action |
| $title | ?string | No | No | Null | N/A | N/A | New title for the topic (null: do not change) |
| $description_link | ?SHORT_TEXT | No | No | Null | N/A | N/A | Link related to the topic (e.g. link to view a ticket) (null: do not change). |
| $check_perms | boolean | No | No | True | N/A | N/A | Whether to check permissions |
| $views | ?integer | No | No | Null | N/A | N/A | Number of views (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 topic.
*
* @param ?AUTO_LINK $topic_id The ID of the topic to edit (null: Private Topic)
* @param ?SHORT_TEXT $description Description of the topic (null: do not change)
* @param ?SHORT_TEXT $emoticon The image code of the emoticon for the topic (null: do not change)
* @param ?BINARY $validated Whether the topic is validated (null: do not change)
* @param ?BINARY $open Whether the topic is open (null: do not change)
* @param ?BINARY $pinned Whether the topic is pinned (null: do not change)
* @param ?BINARY $cascading Whether the topic is cascading (null: do not change)
* @param LONG_TEXT $reason The reason for this action
* @param ?string $title New title for the topic (null: do not change)
* @param ?SHORT_TEXT $description_link Link related to the topic (e.g. link to view a ticket) (null: do not change).
* @param boolean $check_perms Whether to check permissions
* @param ?integer $views Number of views (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 cns_edit_topic(?int $topic_id, ?string $description = null, ?string $emoticon = null, ?int $validated = null, ?int $open = null, ?int $pinned = null, ?int $cascading = null, string $reason = '', ?string $title = null, ?string $description_link = null, bool $check_perms = true, ?int $views = null, bool $null_is_literal = false)
* Edit a topic.
*
* @param ?AUTO_LINK $topic_id The ID of the topic to edit (null: Private Topic)
* @param ?SHORT_TEXT $description Description of the topic (null: do not change)
* @param ?SHORT_TEXT $emoticon The image code of the emoticon for the topic (null: do not change)
* @param ?BINARY $validated Whether the topic is validated (null: do not change)
* @param ?BINARY $open Whether the topic is open (null: do not change)
* @param ?BINARY $pinned Whether the topic is pinned (null: do not change)
* @param ?BINARY $cascading Whether the topic is cascading (null: do not change)
* @param LONG_TEXT $reason The reason for this action
* @param ?string $title New title for the topic (null: do not change)
* @param ?SHORT_TEXT $description_link Link related to the topic (e.g. link to view a ticket) (null: do not change).
* @param boolean $check_perms Whether to check permissions
* @param ?integer $views Number of views (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 cns_edit_topic(?int $topic_id, ?string $description = null, ?string $emoticon = null, ?int $validated = null, ?int $open = null, ?int $pinned = null, ?int $cascading = null, string $reason = '', ?string $title = null, ?string $description_link = null, bool $check_perms = true, ?int $views = null, bool $null_is_literal = false)

