>> > You mean move an article from one topic to another? You can use 
>> > mgd_move_article for that.
>> 
>> No, I need mgd_copy_article
> 
> Why not use this? You can easily make it a function.
> 
> <?php
> 
> $newarticle = mgd_get_article();
> $oldarticle = mgd_get_article($oldarticleid);
> 
> $newarticle->title = $oldarticle->title;
> $newarticle->name = $oldarticle->name;
> $newarticle->content = $oldarticle->content;
> // for all fields to be copied
> 
> $newarticle->topic = $destinationtopicid;
> 
> $newarticle->create();

Can be even shorter. Create disregards the id field present, creates a new 
article in the database and sets the id field to the created object:

$article = mgd_get_article($oldarticleid);
$article->topic = $destinationtopicid;
$article->create();

Emile


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to