Function __global->cns_check_post
Definitions
sources/cns_posts_action.php
- Check a post would be valid.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $post | LONG_TEXT | No | No | required parameter | N/A | N/A | The post |
| $topic_id | ?AUTO_LINK | No | No | Null | N/A | N/A | The ID of the topic the post would be in (null: don't check with regard to any particular topic) |
| $poster | ?MEMBER | No | No | Null | N/A | N/A | The poster (null: current member) |
Returns
- Row of the existing post if a double post (single row map-element in a list of rows) (null: not a double post)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Check a post would be valid.
*
* @param LONG_TEXT $post The post
* @param ?AUTO_LINK $topic_id The ID of the topic the post would be in (null: don't check with regard to any particular topic)
* @param ?MEMBER $poster The poster (null: current member)
* @return ?array Row of the existing post if a double post (single row map-element in a list of rows) (null: not a double post)
*/
function cns_check_post(string $post, ?int $topic_id = null, ?int $poster = null) : ?array
* Check a post would be valid.
*
* @param LONG_TEXT $post The post
* @param ?AUTO_LINK $topic_id The ID of the topic the post would be in (null: don't check with regard to any particular topic)
* @param ?MEMBER $poster The poster (null: current member)
* @return ?array Row of the existing post if a double post (single row map-element in a list of rows) (null: not a double post)
*/
function cns_check_post(string $post, ?int $topic_id = null, ?int $poster = null) : ?array

