3 commits - plugins/kolab_delegation

Aleksander Machniak machniak at kolabsys.com
Mon Apr 14 18:23:51 CEST 2014


 plugins/kolab_delegation/kolab_delegation.php        |    6 +++---
 plugins/kolab_delegation/kolab_delegation_engine.php |    5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 1a6f7e8b2847e3190c08ea6748df1eb687fbc38d
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Mon Apr 14 18:23:08 2014 +0200

    Fix bug where "searching..." message wasn't removed on autocomplete response

diff --git a/plugins/kolab_delegation/kolab_delegation.php b/plugins/kolab_delegation/kolab_delegation.php
index 62b8d04..fb3e4be 100644
--- a/plugins/kolab_delegation/kolab_delegation.php
+++ b/plugins/kolab_delegation/kolab_delegation.php
@@ -376,10 +376,10 @@ class kolab_delegation extends rcube_plugin
         // Delegate autocompletion
         else if ($this->rc->action == 'plugin.delegation-autocomplete') {
             $search = get_input_value('_search', RCUBE_INPUT_GPC, true);
-            $sid    = get_input_value('_id', RCUBE_INPUT_GPC);
+            $reqid  = get_input_value('_reqid', RCUBE_INPUT_GPC);
             $users  = $engine->list_users($search);
 
-            $this->rc->output->command('ksearch_query_results', $users, $search, $sid);
+            $this->rc->output->command('ksearch_query_results', $users, $search, $reqid);
         }
 
         $this->rc->output->send();


commit 02102bea4c6b43da8e961c5812d078f4250e004b
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Mon Apr 14 18:14:47 2014 +0200

    Do not send localization in ajax responses

diff --git a/plugins/kolab_delegation/kolab_delegation.php b/plugins/kolab_delegation/kolab_delegation.php
index 8b4a5ef..62b8d04 100644
--- a/plugins/kolab_delegation/kolab_delegation.php
+++ b/plugins/kolab_delegation/kolab_delegation.php
@@ -320,7 +320,7 @@ class kolab_delegation extends rcube_plugin
      */
     public function controller_action()
     {
-        $this->add_texts('localization/', true);
+        $this->add_texts('localization/');
 
         $engine = $this->engine();
 


commit 0bd58bddfc87a637ab73b6f0d8fd558418843b38
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Mon Apr 14 18:13:51 2014 +0200

    Fix bug where user could delegate himself (Bug #2981)

diff --git a/plugins/kolab_delegation/kolab_delegation_engine.php b/plugins/kolab_delegation/kolab_delegation_engine.php
index ef869f2..ad96831 100644
--- a/plugins/kolab_delegation/kolab_delegation_engine.php
+++ b/plugins/kolab_delegation/kolab_delegation_engine.php
@@ -427,6 +427,11 @@ class kolab_delegation_engine
         $result = $ldap->search($fields, $search, $mode, (array)$this->ldap_login_field, $max);
 
         foreach ($result as $record) {
+            // skip self
+            if ($record['dn'] == $_SESSION['kolab_dn']) {
+                continue;
+            }
+
             $user = $this->parse_ldap_record($record);
 
             if ($user['name']) {




More information about the commits mailing list