Don't use static container id for demoData
authorsstamer <s.stamer@metaways.de>
Mon, 27 Apr 2015 08:52:28 +0000 (10:52 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 27 Apr 2015 10:51:34 +0000 (12:51 +0200)
Change-Id: Ibb2b5f1803bd25c0e3ecff1a5844dd1c4db6d200
Reviewed-on: http://gerrit.tine20.com/customers/1882
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Admin/Setup/DemoData.php
tine20/Tinebase/Setup/DemoData/Abstract.php

index 8c49459..6196c22 100644 (file)
@@ -102,7 +102,9 @@ class Admin_Setup_DemoData extends Tinebase_Setup_DemoData_Abstract
     protected function _createGroups()
     {
         $fe = new Admin_Frontend_Json();
+        $internalAddressbook = Tinebase_Container::getInstance()->getContainerByName('Addressbook', 'Internal Contacts', Tinebase_Model_Container::TYPE_SHARED);
         foreach ($this->_groups as $groupArray) {
+            $groupArray['container_id'] = $internalAddressbook->getId();
             $members = array();
             foreach($groupArray['groupMembers'] as $member) {
                 $members[] = $this->_personas[$member]->getId();
index 1505777..eee786e 100644 (file)
@@ -93,26 +93,26 @@ abstract class Tinebase_Setup_DemoData_Abstract
     protected $_groups = array(
         array(
             'groupData' => array(
-                'visibility' => 'displayed', 'container_id' => 1, 'name' => 'Managers', 'description' => 'Managers of the company'
+                'visibility' => 'displayed', 'name' => 'Managers', 'description' => 'Managers of the company'
             ),
             'groupMembers' => array('pwulf')
         ),
         array(
             'groupData' => array(
-                'visibility' => 'displayed', 'container_id' => 1, 'name' => 'HumanResources', 'description' => 'Human Resources Managment'
+                'visibility' => 'displayed', 'name' => 'HumanResources', 'description' => 'Human Resources Managment'
             ),
             'groupMembers' => 
                 array('sclever', 'pwulf')
             ),
         array(
             'groupData' => array(
-                'visibility' => 'displayed', 'container_id' => 1, 'name' => 'Secretary', 'description' => 'Secretarys of the company'
+                'visibility' => 'displayed', 'name' => 'Secretary', 'description' => 'Secretarys of the company'
             ),
             'groupMembers' => array('sclever', 'pwulf')
         ),
         array(
             'groupData' => array(
-                'visibility' => 'displayed', 'container_id' => 1, 'name' => 'Controllers', 'description' => 'Controllers of the company'
+                'visibility' => 'displayed', 'name' => 'Controllers', 'description' => 'Controllers of the company'
             ),
             'groupMembers' => array('rwright', 'pwulf')
         ),