Hi,
From: "Michael Ed" <[EMAIL PROTECTED]>
> OK, I start with code-global
>
> <?php
>
> $my_prefs=init_prefs($midgard->user);
>
> ?>
>
> Fatal error: Call to unsupported or undefined function init_prefs() in
> code-global on line 2
>
> so I change it to this ...
>
> <?php
>
> function init_prefs($user)
>
> $pref["_user_id"]=$user;
> if($lp=mgd_list_preferences($user))
> while($lp->fetch())
>
> $pref[$lp->domain][$lp->name][id]=$lp->id;
> $pref[$lp->domain][$lp->name][val]=$lp->value;
> }
> return $pref;
> }
>
> $my_prefs=init_prefs($midgard->user);
>
> ?>
>
> Fatal error: Can't redeclare already declared function in code-global on
> line 13
>
First, you have to declare the function for it to work.
Second, check that you don't include the code element twice or recursively.
If not, try to rename the init_prefs functions to an absolutely unique name
like my_own_init_prefs
If it still generate an error, then you're doomed ;-) well, I really don't
know where it could be coming from !...
Best regards,
David
--
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]