[Tickets #6686] Re: Vacation and forward conflict in SunOne LDAP schema

bugs at horde.org bugs at horde.org
Thu Sep 18 08:24:33 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/6686
------------------------------------------------------------------------------
  Ticket             | 6686
  Updated By         | falon at csi.it
  Summary            | Vacation and forward conflict in SunOne LDAP schema
  Queue              | Vacation
  Version            | 3.0.1
  Type               | Bug
  State              | Assigned
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Ben Klang
------------------------------------------------------------------------------


falon at csi.it (2008-09-18 04:24) wrote:

I have written a little patch to ldap driver which let vacation works  
without interfering forward module.
But a new driver (named SunOneLDAPMessaging or something analog)  
should be done. Also,  ldap attribute vacationEndDate,  
vacationStartDate and mailAutoReplyTimeout could be added.

With minimum changes I done, $conf[server][params][default][disabled]  
is only the value that must always exists in a mailbox account.  
Vacation is activated and disabled managing a single value.

Similar changes should be done to forward SunOne module...

To view behavior is sufficient to patch ldap driver as follow:

diff ldap.php.orig ldap.php
222d221
<         $newDetails[$this->_params[$realm]['active']] = explode("|",  
$this->_params[$realm]['enabled']);
226,227d224
<             $this->_disconnect();
<             return false;
228a226,237
>    unset($newDetails);        // $message was already replaced
>    $_ = explode("|", $this->_params[$realm]['enabled']);
>    foreach ( $_ as $value )
>               $newDetails[$this->_params[$realm]['active']][] = $value;
>               $res = ldap_mod_add($this->_ds, $userdn, $newDetails);
>               if (!$res) {
>               $res = PEAR::raiseError(ldap_error($this->_ds));
>               $this->_disconnect();
>               return false;
>         }
>
>
349a359,364
>        if  
> (in_array($this->_params[$realm]['enabled'],$retAttrs[$vacationAttr]))
>               $retAttrs[$vacationAttr] =  
> array($this->_params[$realm]['enabled']);
>        else {
>               if  
> (in_array($this->_params[$realm]['disabled'],$retAttrs[$vacationAttr]))
>                       $retAttrs[$vacationAttr] =  
> array($this->_params[$realm]['disabled']);
>        }
398,399c413,414
<         $newDetails[$this->_params[$realm]['active']] =  
$this->_params[$realm]['disabled'];
<         $result = ldap_mod_replace($this->_ds, $userdn, $newDetails);
---
>         $newDetails[$this->_params[$realm]['active']][] =  
> $this->_params[$realm]['enabled'];
>         $result = ldap_mod_del($this->_ds, $userdn, $newDetails);





More information about the bugs mailing list