lib/api

Aleksander Machniak machniak at kolabsys.com
Fri Oct 5 09:22:24 CEST 2012


 lib/api/kolab_api_service_form_value.php |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 3e4e4268b51e9873553f274638080c00a3d51953
Author: Aleksander Machniak <alec at alec.pl>
Date:   Fri Oct 5 09:21:43 2012 +0200

    Join optional and required attributes in select_options_attribute response

diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index fd57060..b6c68b2 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -785,6 +785,10 @@ class kolab_api_service_form_value extends kolab_api_service
         $list = $auth->schema_attributes($postdata['classes']);
 
         if (is_array($list['may'])) {
+            // return required + optional
+            if (is_array($list['must']) && !empty($list['must'])) {
+                $list['may'] = array_unique(array_merge($list['may'], $list['must']));
+            }
             sort($list['may']);
         }
 





More information about the commits mailing list