From 041c93ce0bc00cb6417ce2e4bdce2ed84d37f50a Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 22 May 2012 06:31:37 -0400
Subject: [PATCH] Removed $Id$
---
program/include/rcube_ldap.php | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index d3067e1..f799df2 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -1,4 +1,5 @@
<?php
+
/*
+-----------------------------------------------------------------------+
| program/include/rcube_ldap.php |
@@ -19,9 +20,6 @@
| Andreas Dick <andudi (at) gmx (dot) ch> |
| Aleksander Machniak <machniak@kolabsys.com> |
+-----------------------------------------------------------------------+
-
- $Id$
-
*/
@@ -131,7 +129,7 @@
if ($this->fieldmap['street'] && $this->fieldmap['locality']) {
$this->coltypes['address'] = array(
'limit' => max(1, $this->coltypes['locality']['limit'] + $this->coltypes['address']['limit']),
- 'subtypes' => array_merge((array)$this->coltypes['address']['subtypes'], $this->coltypes['locality']['subtypes']),
+ 'subtypes' => array_merge((array)$this->coltypes['address']['subtypes'], (array)$this->coltypes['locality']['subtypes']),
'childs' => array(),
) + (array)$this->coltypes['address'];
@@ -143,7 +141,14 @@
}
}
else if ($this->coltypes['address']) {
- $this->coltypes['address'] = array('type' => 'textarea', 'childs' => null, 'limit' => 1, 'size' => 40);
+ $this->coltypes['address'] += array('type' => 'textarea', 'childs' => null, 'size' => 40);
+
+ // 'serialized' means the UI has to present a composite address field
+ if ($this->coltypes['address']['serialized']) {
+ $childprop = array('type' => 'text');
+ $this->coltypes['address']['type'] = 'composite';
+ $this->coltypes['address']['childs'] = array('street' => $childprop, 'locality' => $childprop, 'zipcode' => $childprop, 'country' => $childprop);
+ }
}
// make sure 'required_fields' is an array
--
Gitblit v1.9.1