Minimum version: Midgard 1.2.6
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 on success, FALSE on failure.
<?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.";
}
?>
|