Tinebase_Path - addressbook lists should respect relations in path generation
authorPaul Mehrer <p.mehrer@metaways.de>
Mon, 31 Jul 2017 14:05:37 +0000 (16:05 +0200)
committerPaul Mehrer <p.mehrer@metaways.de>
Tue, 1 Aug 2017 09:25:51 +0000 (11:25 +0200)
adb lists implement their own getPathNeighbours(). Now it uses
parent::getPathNeighbours() to merge the results of both implementations

Change-Id: I14f2cf51ab544f80e8cb5199025e0e3be33f7980
Reviewed-on: http://gerrit.tine20.com/customers/5359
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Paul Mehrer <p.mehrer@metaways.de>
Tested-by: Paul Mehrer <p.mehrer@metaways.de>
tine20/Addressbook/Model/List.php

index 1df3be6..799cb46 100644 (file)
@@ -161,6 +161,8 @@ class Addressbook_Model_List extends Tinebase_Record_Abstract
      */
     public function getPathNeighbours()
     {
+        $result = parent::getPathNeighbours();
+
         if (!empty($this->members)) {
             foreach(Addressbook_Controller_Contact::getInstance()->getMultiple($this->members, true) as $member) {
                 $members[$member->getId()] = $member;
@@ -193,10 +195,7 @@ class Addressbook_Model_List extends Tinebase_Record_Abstract
 
         }
 
-        $result = array(
-            'parents' => array(),
-            'children' => $members
-        );
+        $result['children'] = array_merge($result['children'], $members);
 
         return $result;
     }