[turba] two patches
Stefan Lüthje
stefan+list at luethje.ch
Wed Apr 13 12:43:11 PDT 2005
Hello,
the first patch is for horde and supports the "/" character in phone
numbers. This is often used delimiter:
--- /usr/share/horde3/lib/Horde/Form.php.save 2005-04-13
20:48:18.707475000 +0200
+++ /usr/share/horde3/lib/Horde/Form.php 2005-04-13
20:48:47.270811175 +0200
@@ -1247,9 +1247,9 @@
if (!$valid) {
$message = _("This field is required.");
}
} else {
- $valid = preg_match('/^\+?[\d()\- ]*$/', $value);
+ $valid = preg_match('/^\+?[\d()\- \/]*$/', $value);
if (!$valid) {
$message = _("You have to enter a valid cellphone number,
digits only with an optional '+' for the international
dialing prefix.");
}
}
The second patch is against turba and allow german special caracters in
the DN:
--- /usr/share/horde3/turba/lib/Driver/ldap.php.save 2005-04-13
21:23:36.292378000 +0200
+++ /usr/share/horde3/turba/lib/Driver/ldap.php 2005-04-13
21:26:59.242023704 +0200
@@ -297,9 +297,9 @@
if (isset($this->_params['dn']) &&
is_array($this->_params['dn']) &&
count($this->_params['dn'])) {
$pairs = array();
foreach ($this->_params['dn'] as $param) {
if (isset($attributes[$param])) {
- $pairs[] = array($param, $attributes[$param]);
+
$pairs[] = array($param,
String::convertCharset($attributes[$param], NLS::getCharset(),
$this->_params['charset']));
}
}
$newrdn = $this->_quoteDN($pairs);
} else {
@@ -369,9 +369,9 @@
$dn = '';
if (is_array($this->_params['dn'])) {
foreach ($this->_params['dn'] as $param) {
if (isset($attributes[$param])) {
- $dn .= $param . '=' . $attributes[$param] . ',';
+ $dn .= $param . '=' .
String::convertCharset($attributes[$param], NLS::getCharset(),
$this->_params['charset']) . ',';
}
}
}
I use turba 2.0.2 and horde 3.0.4.
It is possible to integrate the patch into horde/turba ?
Thanks.
Best Regards
Stefan Luethje
More information about the turba
mailing list