Dear Midgarders,
We just created an article in Aegir from X company. And then we also made a login
page, we loggod on as the X company administrator. There is a list of articles, we
click one of them to edit.
And by using the mgd_update_article() taken from the example on the midgard-project
website we process the modification we made from the article. And we got "Article X is
updated" message, and we also capture all the values to make sure, and all captured
well. But the big question is, the article is not changed, what's wrong?
Below is the code we use :
<?
$id = $_REQUEST["id"];
$score = $_REQUEST["score"];
$type = $_REQUEST["type"];
$name = $_REQUEST["name"];
$abstract = $_REQUEST["abstract"];
$topic = $_REQUEST["topic"];
$extra2= $_REQUEST["extra2"];
$extra3= $_REQUEST["extra3"];
$title = $_REQUEST["title"];
$content = $_REQUEST["isi"];
if(! $article = mgd_get_article( $id ))
{
echo "<center><font color=\"red\"><strong>Could not get article
$article->title.<br>\n";
echo "reason: " . mgd_errstr()."</strong></font></center>";
}
mgd_update_article($id, $topic, $title, $abstract, $content, $extra2, $extra3, $name,
$score, $type);
$err = mgd_errno();
if( $err )
{
echo "<center><font color=\"red\"><strong>Could not update article
$article->title.<br>\n";
echo "reason: " . mgd_errstr( $err )."</strong></font></center>";
}
else
{
echo "<center><strong>Article $article->title is Updated</strong></center>";
}
?>
Any Idea? Thank you all
regards
Willy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]