properly sort attendee picker combo
authorMichael Spahn <m.spahn@metaways.de>
Mon, 24 Jul 2017 09:50:35 +0000 (11:50 +0200)
committerMichael Spahn <m.spahn@metaways.de>
Mon, 24 Jul 2017 10:05:01 +0000 (12:05 +0200)
Change-Id: I78e05ebbd5ff71a310a2dd092839a53b9643aa02
Reviewed-on: http://gerrit.tine20.com/customers/5283
Reviewed-by: Michael Spahn <m.spahn@metaways.de>
Tested-by: Michael Spahn <m.spahn@metaways.de>
tine20/Calendar/Frontend/Json.php

index 1a3ae0f..4967ced 100644 (file)
@@ -599,7 +599,7 @@ class Calendar_Frontend_Json extends Tinebase_Frontend_Json_Abstract
                 $contactFilter[] = $filters['userFilter'];
             }
             $contactPaging = $paging;
-            $contactPaging['sort'] = 'type';
+            $contactPaging['sort'] = 'n_fileas';
             $result[Calendar_Model_Attender::USERTYPE_USER] = $addressBookFE->searchContacts($contactFilter, $contactPaging);
         }
 
@@ -612,7 +612,9 @@ class Calendar_Frontend_Json extends Tinebase_Frontend_Json_Abstract
                 $groupFilter[] = $filters['groupFilter'];
             }
             $groupFilter[] = array('field' => 'type', 'operator' => 'contains', 'value' => 'group');
-            $result[Calendar_Model_Attender::USERTYPE_GROUP] = $addressBookFE->searchLists($groupFilter, $paging);
+            $groupPaging = $paging;
+            $groupPaging['sort'] = 'name';
+            $result[Calendar_Model_Attender::USERTYPE_GROUP] = $addressBookFE->searchLists($groupFilter, $groupPaging);
         }
 
         if (!isset($filters['type']) || in_array(Calendar_Model_Attender::USERTYPE_RESOURCE, $filters['type'])) {
@@ -620,7 +622,9 @@ class Calendar_Frontend_Json extends Tinebase_Frontend_Json_Abstract
             if (isset($filters['resourceFilter'])) {
                 $resourceFilter[] = $filters['resourceFilter'];
             }
-            $result[Calendar_Model_Attender::USERTYPE_RESOURCE] = $this->searchResources($resourceFilter, $paging);
+            $resourcePaging = $paging;
+            $resourcePaging['sort'] = 'name';
+            $result[Calendar_Model_Attender::USERTYPE_RESOURCE] = $this->searchResources($resourceFilter, $resourcePaging);
         }
 
         if (empty($events)) {