[#7881] Driver.php,v 1.46 - realm and conf.php
Summary Driver.php,v 1.46 - realm and conf.php
Queue Vacation
Queue Version 3.1-RC1
Type Bug
State Resolved
Priority 2. Medium
Owners Jan Schneider <jan (at) horde (dot) org>
Requester horde (at) smartsector (dot) hu
Created 01/23/09 (419 days ago)
Due
Updated 01/29/09 (413 days ago)
Assigned 01/23/09 (419 days ago)
Resolved 01/29/09 (413 days ago)
Attachments
Milestone
Patch No

History
01/29/09 Jan Schneider State ⇒ Resolved
 
01/29/09 horde (at) smartsector (dot) hu Comment #10 Reply to this comment
looks perfect!
Try now?
01/29/09 Jan Schneider Comment #9 Reply to this comment
Try now?
01/29/09 CVS Commit Comment #8 Reply to this comment
01/29/09 CVS Commit Comment #7 Reply to this comment
01/29/09 horde (at) smartsector (dot) hu Comment #6 Reply to this comment
We tried out the new version, but recived the following notices:



Notice: Undefined variable: realm in 
/usr/share/horde/vacation/lib/Driver.php on line 441



Notice: Undefined variable: realm in 
/usr/share/horde/vacation/lib/Driver/customsql.php on line 41



versions:

$Horde: vacation/lib/Driver.php,v 1.47 2009-01-29 11:16:15 jan Exp $

$Horde: vacation/lib/Driver/customsql.php,v 1.4 2009-01-29 11:16:16 jan Exp $
01/29/09 CVS Commit Comment #5 Reply to this comment
01/29/09 Jan Schneider Comment #4
Taken from Chuck Hagenbuch
Reply to this comment
Realm handling has been moved to the constructor and before retrieving 
the 'hordeauth' parameter, can you test if that fixes things for you.



@Chuck: realms can be set manually in conf.php. It's a cruft from 
pre-conf.xml times.
01/29/09 CVS Commit Comment #3 Reply to this comment
01/23/09 Chuck Hagenbuch Comment #2
State ⇒ Feedback
Assigned to Jan Schneider
Assigned to Chuck Hagenbuch
Reply to this comment
I don't think that will do the right thing either, though. The 
handling of $realm looks really wonky to me - Jan, any thoughts here? 
I think we should move it entirely into the driver. And I also don't 
see where $params['realm'] would ever be set.
01/23/09 horde (at) smartsector (dot) hu Comment #1
State ⇒ Unconfirmed
Patch ⇒
Milestone ⇒
Queue ⇒ Vacation
Summary ⇒ Driver.php,v 1.46 - realm and conf.php
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
There si a little bug when you do not set up any realm and use full 
user names like:

info@example.com



you must set up the $params correctly before you check the hordeauth.

here is a patch, just need change the lines:



The original one:

  function Vacation_Driver($user, $realm, $params = array())

     {

         $this->_params = $params;



         // Check if hordeauth is set to 'full'

         $hordeauth = $this->getParam('hordeauth');

         if ($hordeauth !== 'full') {

             @list($user,) = explode('@', $user, 2);

         }

         $this->_user = $user;



         if (!isset($params[$realm])) {

             $realm = 'default';

         }

         $this->_realm = $realm;

     }



The fixed one:

  function Vacation_Driver($user, $realm, $params = array())

     {

         $this->_params = $params;



         if (!isset($params[$realm])) {

             $realm = 'default';

         }

         $this->_realm = $realm;



         // Check if hordeauth is set to 'full'

         $hordeauth = $this->getParam('hordeauth');

         if ($hordeauth !== 'full') {

             @list($user,) = explode('@', $user, 2);

         }

         $this->_user = $user;

      }