On Tue, 7 Dec 1999, Philipp Rotmann wrote:
> I understand that in such a way that I wrote the following code,
> which doesn't work :-)
>
> if ($argc == 1) $id = $argv[0];
> if ($id) $article = mgd_get_article($id);
> $topic = mgd_get_topic($article->id);
>
> (from code-init in my article page)
>
> $topic is not set in this case...
article->id is the ID of the article. What you want is
if ($argv[0]) {
$article = mgd_get_article($argv[0]);
/* the ID in $argv[0] may be bogus. $article will be unset if so */
if ($article) $topic = mgd_get_topic($article->topic);
}
Bye,
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]