N°6384 - fix typo

This commit is contained in:
Eric Espie
2023-06-08 17:19:45 +02:00
parent 7ebf5a6dd4
commit 99e84e86cd
6 changed files with 12 additions and 12 deletions

View File

@@ -1732,7 +1732,7 @@ class AttributeLinkedSet extends AttributeDefinition
*/
public function GetHasConstraint()
{
return $this->GetOptional('with_constrain', false);
return $this->GetOptional('with_constraint', false);
}
/**

View File

@@ -482,8 +482,8 @@
<type>boolean</type>
<default>true</default>
</property>
<property id="with_constrain">
<php_param>with_constrain</php_param>
<property id="with_constraint">
<php_param>with_constraint</php_param>
<mandatory>false</mandatory>
<type>boolean</type>
<default>false</default>

View File

@@ -248,8 +248,8 @@ abstract class User extends cmdbAbstractObject
"depends_on" => array(),
)));
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("profile_list",array("linked_class" => "URP_UserProfile", "ext_key_to_me" => "userid", "ext_key_to_remote" => "profileid", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), "display_style" => 'property', "with_constrain" => true)));
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("allowed_org_list", array("linked_class" => "URP_UserOrg", "ext_key_to_me" => "userid", "ext_key_to_remote" => "allowed_org_id", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), 'with_constrain' => true)));
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("profile_list",array("linked_class" => "URP_UserProfile", "ext_key_to_me" => "userid", "ext_key_to_remote" => "profileid", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), "display_style" => 'property', "with_constraint" => true)));
MetaModel::Init_AddAttribute(new AttributeLinkedSetIndirect("allowed_org_list", array("linked_class" => "URP_UserOrg", "ext_key_to_me" => "userid", "ext_key_to_remote" => "allowed_org_id", "allowed_values" => null, "count_min" => 1, "count_max" => 0, "depends_on" => array(), 'with_constraint' => true)));
MetaModel::Init_AddAttribute(new AttributeCaseLog("log", array("sql" => 'log', "is_null_allowed" => true, "default_value" => '', "allowed_values" => null, "depends_on" => array(), "always_load_in_tables" => false)));
// Display lists

View File

@@ -2064,7 +2064,7 @@ EOF
$this->CompileCommonProperty('display_style', $oField, $aParameters, $sModuleRelativeDir);
$this->CompileCommonProperty('filter', $oField, $aParameters, $sModuleRelativeDir);
$this->CompileCommonProperty('allowed_values', $oField, $aParameters, $sModuleRelativeDir);
$this->CompileCommonProperty('with_constrain', $oField, $aParameters, $sModuleRelativeDir, false);
$this->CompileCommonProperty('with_constraint', $oField, $aParameters, $sModuleRelativeDir, false);
$aParameters['depends_on'] = $sDependencies;
} elseif ($sAttType == 'AttributeLinkedSet') {
$this->CompileCommonProperty('linked_class', $oField, $aParameters, $sModuleRelativeDir);
@@ -2074,7 +2074,7 @@ EOF
$this->CompileCommonProperty('display_style', $oField, $aParameters, $sModuleRelativeDir);
$this->CompileCommonProperty('edit_mode', $oField, $aParameters, $sModuleRelativeDir);
$this->CompileCommonProperty('filter', $oField, $aParameters, $sModuleRelativeDir);
$this->CompileCommonProperty('with_constrain', $oField, $aParameters, $sModuleRelativeDir, false);
$this->CompileCommonProperty('with_constraint', $oField, $aParameters, $sModuleRelativeDir, false);
$aParameters['depends_on'] = $sDependencies;
} elseif ($sAttType == 'AttributeExternalKey') {
$this->CompileCommonProperty('target_class', $oField, $aParameters, $sModuleRelativeDir);

View File

@@ -1133,9 +1133,9 @@ class iTopDesignFormat
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSetIndirect']/display_style");
// N°6228 - Remove last Profil of a User / Exceed SaaS User quota without control
// - Remove with_constrain
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSet']/with_constrain");
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSetIndirect']/with_constrain");
// - Remove with_constraint
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSet']/with_constraint");
$this->RemoveNodeFromXPath("/itop_design/classes//class/fields/field[@xsi:type='AttributeLinkedSetIndirect']/with_constraint");
// N°2783 - Custom zlists
$this->RemoveNodeFromXPath("/itop_design/classes//class/presentation/custom_presentations");

View File

@@ -92,14 +92,14 @@
<class id="ClassWithAttributeLinkedSetWithConstraint">
<fields>
<field id="status" xsi:type="AttributeLinkedSet">
<with_constrain>true</with_constrain>
<with_constraint>true</with_constraint>
</field>
</fields>
</class>
<class id="ClassWithAttributeLinkedSetIndirectWithConstraint">
<fields>
<field id="status" xsi:type="AttributeLinkedSetIndirect">
<with_constrain>true</with_constrain>
<with_constraint>true</with_constraint>
</field>
</fields>
</class>