[sork] vacation 3.0-rc1: per realm configuration problems

Rafael Varela Pet srrafa at usc.es
Mon Apr 10 01:33:08 PDT 2006


Hi,

El sáb, 08-04-2006 a las 10:34 +0200, Jan Schneider escribió:

> > After some investigation, I have found that the problem is solved   
> > applying the
> > following patch to main.php
> >
> >
> > --- main.php.dist        2006-04-04 17:40:58.000000000 +0200
> > +++ main.php        2006-04-04 12:03:09.000000000 +0200
> > @@ -21,7 +21,7 @@
> >  $split = explode('@', Auth::getAuth());
> >  $user = @$split[0];
> >  $realm = @$split[1];
> > -if (empty($realm) || !@is_array($driver->params[$realm])) {
> > +if (empty($realm)) {
> >      $realm = 'default';
> >  }
> 
> This doesn't make any sense, because with this change you add an  
> additional case where the realm is *not* used.

I'm not sure that I understand you. I was trying to get your attention
on this check:

@is_array($driver->params[$realm]

I suppose that the idea is revert to the default config if there is no 
specific configuration for some realm, but it seems that it always
returns false. I guess that it has to do with the fact that it does not
exist any member called 'params' in Driver.php 

What it does exist is '_params'. We can use the following patch to
achieve the same result:

--- main.php.dist	2006-04-04 17:40:58.000000000 +0200
+++ main.php	2006-04-10 10:25:00.000000000 +0200
@@ -21,7 +21,7 @@
 $split = explode('@', Auth::getAuth());
 $user = @$split[0];
 $realm = @$split[1];
-if (empty($realm) || !@is_array($driver->params[$realm])) {
+if (empty($realm) || !@is_array($driver->_params[$realm])) {
     $realm = 'default';
 }

btw, it is a bit ugly to check it against a private member, why do not
use the function 'checkConfig' which is available on all the drivers?

Regards,


-- 
--------------------------------------------------
Rafael Varela Pet
Area de Tecnoloxías da Información e Comunicacións

Universidade de Santiago de Compostela
15782 Santiago de Compostela
http://www.usc.es/saus
--------------------------------------------------



More information about the sork mailing list