summaryrefslogtreecommitdiff
path: root/plugins/kolab_addressbook/kolab_addressbook.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-11-25 18:53:14 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-11-25 18:53:14 +0000
commit7ba2c23d26f12bd53b39ce677c6c3de594cea0cb (patch)
tree984f379e1341708e5a22b22ffe13e07455a8cb96 /plugins/kolab_addressbook/kolab_addressbook.php
parent2106a1f886fa89cad8df5b6e5746f24046419ce6 (diff)
Complete implementation of rcube_kolab_contacts; add localization texts for proprietary contact fields
git-svn-id: https://svn.roundcube.net/trunk@4269 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/kolab_addressbook/kolab_addressbook.php')
-rw-r--r--plugins/kolab_addressbook/kolab_addressbook.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php
index 807dfb8ec..edf8e1f45 100644
--- a/plugins/kolab_addressbook/kolab_addressbook.php
+++ b/plugins/kolab_addressbook/kolab_addressbook.php
@@ -24,6 +24,8 @@ class kolab_addressbook extends rcube_plugin
// load required plugin
$this->require_plugin('kolab_core');
+ $this->add_texts('localization');
+
// register hooks
$this->add_hook('addressbooks_list', array($this, 'address_sources'));
$this->add_hook('addressbook_get', array($this, 'get_address_book'));
@@ -121,7 +123,15 @@ class kolab_addressbook extends rcube_plugin
// TODO: add more Kolab-specific fields
- // TODO: re-order fields
+ // re-order fields according to the coltypes list
+ $block = array();
+ $contacts = reset($this->sources);
+ foreach ($contacts->coltypes as $col => $prop) {
+ if (isset($p['form']['info']['content'][$col]))
+ $block[$col] = $p['form']['info']['content'][$col];
+ }
+
+ $p['form']['info']['content'] = $block;
}
return $p;