lib/kolab_api_service.php
Aleksander Machniak
machniak at kolabsys.com
Tue Jan 6 09:51:23 CET 2015
lib/kolab_api_service.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 9f5c1783654268d573888ab99578324d137871b0
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Tue Jan 6 03:50:05 2015 -0500
Fix bug where user couldn't edit himself anymore due to error in parse_input_attributes (#4166)
This was a regression introduced in 47b1217a1c
diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php
index 6809bd5..e3c66c5 100644
--- a/lib/kolab_api_service.php
+++ b/lib/kolab_api_service.php
@@ -311,7 +311,9 @@ abstract class kolab_api_service
foreach ($type_attrs['form_fields'] as $key => $value) {
Log::trace("Running parse input attributes for key $key");
- if (($value['type'] == 'text' || empty($value['type'])) && is_array($attribs[$key])) {
+ $type = $value['type'] ?: ($type_attrs['auto_form_fields'][$key] ? $type_attrs['auto_form_fields'][$key]['type'] : '');
+
+ if (($type == 'text' || empty($type)) && is_array($attribs[$key])) {
$attribs[$key] = array_shift($attribs[$key]);
}
More information about the commits
mailing list