[Tickets #1648] NEW: fixes/enhancements for vacation ldap driver

bugs at bugs.horde.org bugs at bugs.horde.org
Wed Mar 30 01:41:26 PST 2005


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

Ticket URL: http://bugs.horde.org/ticket/?id=1648
-----------------------------------------------------------------------
 Ticket             | 1648
 Created By         | caffolter at purplehaze.ch
 Summary            | fixes/enhancements for vacation ldap driver
 Queue              | Vacation
 Version            | HEAD
 State              | New
 Priority           | 1. Low
 Type               | Enhancement
 Owners             | 
+New Attachment     | vacation.diff
-----------------------------------------------------------------------


caffolter at purplehaze.ch (2005-03-30 01:41) wrote:

As suggested by Chuck, I upload my modifications to this bugzilla.

config/conf.xml
Added missing and new non-hard coded configuration values


lib/Driver.php
function isEnabled()
Check vacation flag: 'Y' / 'N' value is now configurable, but I didn't
remove
the old hard coded values for backward compatibility with other drivers.


lib/Driver/ldap.php
Constructor Vacation_Driver_ldap:
The ldap class uses $this->_params, the parent class uses $this->params.
This
leads to problems while trying to access values in the parent class.
I wasn't sure if I should replace this var everywhere inside the ldap
class.
So I decided to do an array_merge($this->params, $this->_params) of both
vars.
If there is no explicit reason I would like to get rid of $this->_params
and
change it to $this->params. Just let me know :)

function setVacation() / unsetVacation()
UTF-8 encoding: removed the hard coded ISO-8859-1 to UTF-8 (or backwards)
translation. The reason for this is, that if the page gets served as UTF-8
(or
other non-ISO-8859-1 encoding), the browser will encode all form values
with
this encoding. This leads to double UTF-8 or other broken encoding.
Both functions are trying to detect the encoding, before they convert to
UTF-8.

function _getVacation():
removed hard coded DN in ldap_search(), that's why $realm was also
necessary
to this function.

function _setVacationAlias() / _unsetVacationAlias():
These are the two new functions, with the purpose for creating special mail
aliases, if necessary. They don't affect the current driver, if not used.

Just send me an email, in case of problems/questions :)




More information about the bugs mailing list