mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
Patch for supporting a data model without any Organization.
SVN:trunk[1015]
This commit is contained in:
@@ -431,12 +431,18 @@ class UserRightsProfile extends UserRightsAddOnAPI
|
|||||||
$oChange->Set("userinfo", "Initialization");
|
$oChange->Set("userinfo", "Initialization");
|
||||||
$iChangeId = $oChange->DBInsert();
|
$iChangeId = $oChange->DBInsert();
|
||||||
|
|
||||||
|
// Support drastic data model changes: no organization class !
|
||||||
|
if (MetaModel::IsValidClass('Organization'))
|
||||||
|
{
|
||||||
$oOrg = new Organization();
|
$oOrg = new Organization();
|
||||||
$oOrg->Set('name', 'My Company/Department');
|
$oOrg->Set('name', 'My Company/Department');
|
||||||
$oOrg->Set('code', 'SOMECODE');
|
$oOrg->Set('code', 'SOMECODE');
|
||||||
// $oOrg->Set('status', 'implementation');
|
|
||||||
//$oOrg->Set('parent_id', xxx);
|
|
||||||
$iOrgId = $oOrg->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
$iOrgId = $oOrg->DBInsertTrackedNoReload($oChange, true /* skip security */);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$iOrgId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$oContact = new Person();
|
$oContact = new Person();
|
||||||
$oContact->Set('name', 'My last name');
|
$oContact->Set('name', 'My last name');
|
||||||
|
|||||||
Reference in New Issue
Block a user