summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2015-01-06 08:50:05 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2015-01-06 08:50:05 (GMT)
commit9f5c1783654268d573888ab99578324d137871b0 (patch)
tree2f4ebaa21c16c2eb8d1f9c282810978da64857aa
parent87af7747c2c2f2548abf5a796b5478a6220b5694 (diff)
downloadkolab-wap-9f5c1783654268d573888ab99578324d137871b0.tar.gz
Fix bug where user couldn't edit himself anymore due to error in parse_input_attributes (#4166)
This was a regression introduced in 47b1217a1c
-rw-r--r--lib/kolab_api_service.php4
1 files changed, 3 insertions, 1 deletions
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]);
}