mgd_copy_article

(Midgard 1.4.2 'Bifrost')

mgd_copy_article -- Copy an article

Description

id mgd_copy_article (int id, int [topic])

Minimum version: Midgard 1.4 (Bifrost)

Copies the article with id id. If the optional parameter topic is given, the copy will reside under that topic.

Returns the id of the created copy if successful. Returns FALSE on failure.


<?php
   if(! $newarticle = mgd_copy_article(123)) {
    echo "Could not create copy article.<br>\n";
    echo "Reason: " . mgd_errstr(); . "<br>\n";
   } else {
    echo "Created copy of article 123.<br>\n";
    echo "id is: " . $newarticle->id ;
   } 
 }
?>