-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

[EMAIL PROTECTED] wrote:

| So, I notice a couple of things...
|
| 1. The final mgd_auth_midgard _SOMETIMES_ fails mysteriously, for no
good reason. Printing mgd_errstr() shows something like "Object does not
exist". As a result the mgd_update_sitegroup also fails.

Try to set

$midgard = mgd_get_midgard();

after each authentication call.

| 2. I notice that doing:   unset( $midgard);
| After the mgd_unsetuid() seems to help.  Can anyone explain why?

Can't remember the reason, but this shouldn't be needed
if you re-call $midgard after mgd_auth.

| 3. Documentation on midgard functions seems to be out of date:
|    - mgd_update_sitegroup seems to take 4 args, not 3.

Yes, the docs are quite old. You'd do well to use
the object update functionality instead of old mgd_update_X and
mgd_create_X funtions.

I.e. (obviously you should add some if-elseing to tackle possible errors)

$newsg = mgd_get_sitegroup();
$newsg->name = "My New SG";
$sgid = $newsg->create();

$sg = mgd_get_sitegroup($sgid);
$sg->admingroup = $admingroupid;
$sg->update();

| 4. Could someone elaborate on the $midgard global var?  Is it always
advised to set it after doing a mgd_auth_midgard????  E.g.
|
|    $midgard = mgd_get_midgard();

YES, still can't remember the reason for this.
There should be some archives in MARC (in midgard-user list).

| 5. I've also noticed that when switching sitegroups, PHP variables get
clobbered. E.g.
|
|     mgd_auth_midgard( ROOT."!sitethree". ROOT_ADMIN, 0);
|     $art = mgd_get_article( 12);
|
|     mgd_auth_midgard( ROOT."!sitefive". ROOT_ADMIN, 0);
|
| sometimes even causes apache to segfault!

Again, try to re-call $midgard after mgd_auth...

| TIA for any insight into these subjects...

NP, hope this helps.

| /jim
|

Cheers!

~  //Henri

- --
Henri Kaukola                   [EMAIL PROTECTED]
Consultant                      Tel: +358-20-198 6037
Nemein Oy                       http://www.nemein.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBIu2x3xWc2AolrKgRAreEAKCWhYcW2+AUdkv32ZbMtqwp8GxriACfQYSA
+mOfo/65JQk34IQmGxCMCHk=
=oUwu
-----END PGP SIGNATURE-----

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



Reply via email to