mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Internal: new setting to tweak the data model by allowing null for all external keys (use with care!)
SVN:trunk[3016]
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Copyright (C) 2010-2012 Combodo SARL
|
||||
// Copyright (C) 2010-2013 Combodo SARL
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
@@ -2843,7 +2843,15 @@ class AttributeExternalKey extends AttributeDBFieldVoid
|
||||
|
||||
|
||||
public function GetDefaultValue() {return 0;}
|
||||
public function IsNullAllowed() {return $this->Get("is_null_allowed");}
|
||||
public function IsNullAllowed()
|
||||
{
|
||||
if (MetaModel::GetConfig()->Get('disable_mandatory_ext_keys'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return $this->Get("is_null_allowed");
|
||||
}
|
||||
|
||||
|
||||
public function GetBasicFilterOperators()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// Copyright (C) 2010-2012 Combodo SARL
|
||||
// Copyright (C) 2010-2013 Combodo SARL
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
@@ -147,6 +147,14 @@ class Config
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => false,
|
||||
),
|
||||
'disable_mandatory_ext_keys' => array(
|
||||
'type' => 'bool',
|
||||
'description' => 'For developpers: allow every external keys to be undefined',
|
||||
'default' => true,
|
||||
'value' => true,
|
||||
'source_of_value' => '',
|
||||
'show_in_conf_sample' => false,
|
||||
),
|
||||
'graphviz_path' => array(
|
||||
'type' => 'string',
|
||||
'description' => 'Path to the Graphviz "dot" executable for graphing objects lifecycle',
|
||||
|
||||
Reference in New Issue
Block a user