Name
mgd_update_article_type -- Set the type of an article
Synopsis
bool mgd_update_article_type
(int id, int type);
Description
Minimum version: Midgard 1.2.6 (Mad King)
Sets the type field of an article. The type field is used
in functions like
mgd_list_topic_articles to limit
returned articles to those with a specific type field.
Only owners of an article are allowed to modify the type.
Returns true if successfull. Returns false on failure.
Example
<?php
$id = 123;
$type = 17;
$update = mgd_update_article_type( $id, $type );
if(! $update ) {
echo "Update of article type failed.<br>\n";
echo "reason: " . mgd_errstr();
} else {
echo "Updated type of article $id to be $type.";
}
?>