Tarjei Huse wrote:
> when I go to Article Object Definition in the manual I get the Attachment
> Object Definition. Is this wrong? Is it going to be fixed?
Can you give me a specific url or file for that?
> Also, I can't get the update() function to work on an article. Heres the
> script:
> <?php
> 2: function listpage($id)
>
> 3: $list = mgd_list_pages($id);
> 4: while( $list->fetch() )
>
> 5: echo "<h1>Side:".$list->name . ":</h1>";
> 6: echo "ID:". $list->id . "<br><br>";
> 7: $list->sitegroup = "2";
> 8: $list->update();
> 9: echo "$list->sitegroup";
>
> Basicly I get the message: unknown function update.
$article->update() updates only those fields that are updated by
mgd_update_article. To update the sitegroup you'd need to call
$article->setsitegroup(2); on a complete article object. The list
functions do not return full objects, omitting the larger text fields
and most object methods. So to do the above you'd do:
$article = mgd_get_article($list->id);
$article->setsitegroup(2);
You need to be root to be able to change sitegroups on resources.
Changing the sitegroup of resources is noth without risks BTW, since
you can easily create orphans, and while being root you will not see
them being orphans.
Emile
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]