Re: vacation 3.0-rc1: per realm configuration problems
Jan Schneider <[email protected]>
| Newsgroups | gmane.comp.horde.sork |
|---|---|
| Message-ID | <[email protected]> |
Zitat von Rafael Varela Pet <[email protected]>: > 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? That makes sense now. I simply removed the check, checkConfig() should be called internally already. Can you try a cvs checkout or snapshot? Jan. -- Do you need professional PHP or Horde consulting? http://horde.org/consulting/ -- Sork mailing list - Join the hunt: http://horde.org/bounties/#sork Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]