summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-11-28 12:10:16 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-11-28 12:10:16 (GMT)
commitcf0ae1aac7876a383d4f2c48c28905923379a4b8 (patch)
treef7e8ebae47dbc91718f9346cadf877f88e05a851
parentde012552e7655e2fdf46747716870bde7d9bb1fe (diff)
downloadroundcubemail-plugins-kolab-cf0ae1aac7876a383d4f2c48c28905923379a4b8.tar.gz
Fix regression where some (most) of the fields were missing in contact form
-rw-r--r--plugins/kolab_addressbook/kolab_addressbook.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/kolab_addressbook/kolab_addressbook.php b/plugins/kolab_addressbook/kolab_addressbook.php
index f2a896d..22c40a5 100644
--- a/plugins/kolab_addressbook/kolab_addressbook.php
+++ b/plugins/kolab_addressbook/kolab_addressbook.php
@@ -466,8 +466,8 @@ class kolab_addressbook extends rcube_plugin
$p['form']['personal']['content']['pkcs7publickey'] = array('size' => 70);
// re-order fields according to the coltypes list
- $p['form']['contact']['content'] = $this->_sort_form_fields($p['form']['contact']['content']);
- $p['form']['personal']['content'] = $this->_sort_form_fields($p['form']['personal']['content']);
+ $p['form']['contact']['content'] = $this->_sort_form_fields($p['form']['contact']['content'], $GLOBALS['CONTACTS']);
+ $p['form']['personal']['content'] = $this->_sort_form_fields($p['form']['personal']['content'], $GLOBALS['CONTACTS']);
/* define a separate section 'settings'
$p['form']['settings'] = array(
@@ -485,12 +485,11 @@ class kolab_addressbook extends rcube_plugin
}
- private function _sort_form_fields($contents)
+ private function _sort_form_fields($contents, $source)
{
- $block = array();
- $contacts = reset($this->sources);
+ $block = array();
- foreach (array_keys($contacts->coltypes) as $col) {
+ foreach (array_keys($source->coltypes) as $col) {
if (isset($contents[$col]))
$block[$col] = $contents[$col];
}