4 commits - lib/client lib/ext lib/kolab_api_service.php lib/locale

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Thu Nov 1 14:38:52 CET 2012


 lib/client/kolab_client_task_user.php |    1 +
 lib/ext/Net/LDAP3.php                 |   14 ++++++++++++--
 lib/kolab_api_service.php             |    2 +-
 lib/locale/en_US.php                  |    1 +
 4 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 2362449d989db81668eb3712bb6dd8fa9d459362
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Thu Nov 1 14:38:28 2012 +0100

    Fix additional attributes requested not being returned, due to array position offsets

diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php
index ea62318..fc04314 100644
--- a/lib/kolab_api_service.php
+++ b/lib/kolab_api_service.php
@@ -457,7 +457,7 @@ abstract class kolab_api_service
 
         // Get extra attributes
         if (!empty($extra_attrs)) {
-            $extra_attrs = $auth->get_entry_attributes($dn, $extra_attrs);
+            $extra_attrs = $auth->get_entry_attributes($dn, array_values($extra_attrs));
 
             if (!empty($extra_attrs)) {
                 $attrs = array_merge($attrs, $extra_attrs);


commit f0220ce6bcbf0bab1f7e55ec8f70589f7e467194
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Oct 31 14:54:58 2012 +0100

    Add mailforwardingaddress to Configuration tab

diff --git a/lib/client/kolab_client_task_user.php b/lib/client/kolab_client_task_user.php
index 166f8a5..85b58e7 100644
--- a/lib/client/kolab_client_task_user.php
+++ b/lib/client/kolab_client_task_user.php
@@ -270,6 +270,7 @@ class kolab_client_task_user extends kolab_client_task
             'kolabdelegate'             => 'config',
             'kolaballowsmtprecipient'   => 'config',
             'kolaballowsmtpsender'      => 'config',
+            'mailforwardingaddress'     => 'config',
 
             /* Asterisk Settings */
             'astaccountallowedcodec'    => 'asterisk',


commit 50a97867b84c9e4b48aed0cf219afece490c6b58
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Oct 31 14:54:25 2012 +0100

    Add text for mailforwardingaddress label

diff --git a/lib/locale/en_US.php b/lib/locale/en_US.php
index ec9b3ca..a19869c 100644
--- a/lib/locale/en_US.php
+++ b/lib/locale/en_US.php
@@ -249,6 +249,7 @@ $LANG['user.list'] = 'Users List';
 $LANG['user.loginshell'] = 'Shell';
 $LANG['user.mail'] = 'Primary Email Address';
 $LANG['user.mailalternateaddress'] = 'External Email Address(es)';
+$LANG['user.mailforwardingaddress'] = 'Forward Mail To';
 $LANG['user.mailhost'] = 'Email Server';
 $LANG['user.mailquota'] = 'Quota';
 $LANG['user.mailquota.desc'] = 'Leave blank for unlimited';


commit 3cb215b24f8ea39b54d61bf5d181ee475c03dcc8
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Oct 31 14:53:53 2012 +0100

    Ensure attributes are not marked as needing replacement if in fact they did not change

diff --git a/lib/ext/Net/LDAP3.php b/lib/ext/Net/LDAP3.php
index 466b351..c857ee9 100644
--- a/lib/ext/Net/LDAP3.php
+++ b/lib/ext/Net/LDAP3.php
@@ -1001,7 +1001,7 @@ class Net_LDAP3
                 }
 
                 if (!($new_attrs[$attr] === $old_attr_value) && !($_sort1 === $_sort2)) {
-                    $this->_debug("Attribute $attr changed from", $old_attr_value, "to", $new_attrs[$attr]);
+                    $this->_debug("Attribute $attr changed from " . var_export($old_attr_value, TRUE) . " to " . var_export($new_attrs[$attr], TRUE));
                     if ($attr === $rdn_attr) {
                         $this->_debug("This attribute is the RDN attribute. Let's see if it is multi-valued, and if the original still exists in the new value.");
                         if (is_array($old_attrs[$attr])) {
@@ -1087,6 +1087,16 @@ class Net_LDAP3
 
         foreach ($new_attrs as $attr => $value) {
             if (array_key_exists($attr, $old_attrs)) {
+                if (is_array($new_attrs[$attr]) && is_array($old_attrs[$attr])) {
+                    $_sort1 = $old_attrs[$attr];
+                    sort($_sort1);
+                    $_sort2 = $value;
+                    sort($_sort2);
+                } else {
+                    $_sort1 = TRUE;
+                    $_sort2 = FALSE;
+                }
+
                 if (empty($value)) {
                     if (!array_key_exists($attr, $mod_array['del'])) {
                         switch ($attr) {
@@ -1099,7 +1109,7 @@ class Net_LDAP3
                         }
                     }
                 } else {
-                    if (!($old_attrs[$attr] === $value) && !($attr === $rdn_attr)) {
+                    if (!($old_attrs[$attr] === $value) && !($attr === $rdn_attr) && !($_sort1 === $_sort2)) {
                         if (!array_key_exists($attr, $mod_array['replace'])) {
                             $this->_debug("Adding to replace(2): $attr");
                             $mod_array['replace'][$attr] = $value;





More information about the commits mailing list