6.0.0-beta1
7/21/25

[#1648] fixes/enhancements for vacation ldap driver
Summary fixes/enhancements for vacation ldap driver
Queue Vacation
Queue Version HEAD
Type Enhancement
State Resolved
Priority 1. Low
Owners
Requester caffolter (at) purplehaze (dot) ch
Created 03/30/2005 (7418 days ago)
Due
Updated 05/30/2005 (7357 days ago)
Assigned 03/31/2005 (7417 days ago)
Resolved 05/30/2005 (7357 days ago)
Milestone
Patch No

History
05/30/2005 06:34:56 PM Chuck Hagenbuch Comment #6
State ⇒ Resolved
Reply to this comment
Cleaned up a little and committed - thanks very much for the patch and 
taking the time to resubmit it.
05/30/2005 01:19:25 PM caffolter (at) purplehaze (dot) ch Comment #5
New Attachment: vacation[1].diff Download
Reply to this comment
OK, here it goes. The diff was made against the latest CVS code...

Sorry for the previous mess.
05/30/2005 04:31:55 AM Chuck Hagenbuch Comment #4
Taken from Horde DevelopersHorde Developers
State ⇒ Feedback
Reply to this comment
I'm a bit lost as to what's in what file and how many are needed. 
Please upload *one* diff, containing all of the changes, in unified 
format (diff -u). Thanks.
04/04/2005 04:07:35 PM caffolter (at) purplehaze (dot) ch Comment #3
New Attachment: ldap.php[1].diff Download
Reply to this comment
There was an other issue with the decoding of the ldap vacation 
message. So here's the new diff for the ldap driver. I'm sorry, that 
it wasn't included in the previous patch.
03/31/2005 04:48:41 AM Chuck Hagenbuch State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
 
03/30/2005 02:04:12 PM caffolter (at) purplehaze (dot) ch Comment #2
New Attachment: ldap.php.diff Download
Reply to this comment
I'm sorry, but here's another patch for lib/Driver/ldap.php:

The function _getVacation() generates errors, if the ldap 
attributes/values (for the message and the activation status) aren't 
present (ex. a new user, want's to display the vacation for the first 
time).

This patch takes care of this, so you wont get any errors, in this case.



Please use this patch for lib/Driver/ldap.php instead the one I've 
posted befor for this class.



I'm sorry for any circumstances caused!
03/30/2005 09:41:26 AM caffolter (at) purplehaze (dot) ch Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ fixes/enhancements for vacation ldap driver
Queue ⇒ Vacation
New Attachment: vacation.diff Download
State ⇒ New
Reply to this comment
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 :)

Saved Queries