mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
- Fixed bug with change tracking of TEXT attributes
- Log any email notification (successful or not) - Class selection always made through a Combo box - Automatic creation of indexes for external keys - New trigger: on object creation - Application log: added a status string - Added documentation to the WSDL (+ anyType replaced by string) - SOAP: improved handling of enumeration attributes - SOAP: returned logs to mention the name of the parameter as advertised in the WSDL file (different than the name of the attribute in Itop) - Finalized SOAP tests - Added a SOAP client example SVN:trunk[246]
This commit is contained in:
@@ -128,16 +128,23 @@ class ValueSetObjects extends ValueSetDefinition
|
||||
*/
|
||||
class ValueSetEnum extends ValueSetDefinition
|
||||
{
|
||||
protected $m_values;
|
||||
|
||||
public function __construct($Values)
|
||||
{
|
||||
if (is_array($Values))
|
||||
$this->m_values = $Values;
|
||||
}
|
||||
|
||||
protected function LoadValues($aArgs)
|
||||
{
|
||||
if (is_array($this->m_values))
|
||||
{
|
||||
$aValues = $Values;
|
||||
$aValues = $this->m_values;
|
||||
}
|
||||
else
|
||||
{
|
||||
$aValues = array();
|
||||
foreach (explode(",", $Values) as $sVal)
|
||||
foreach (explode(",", $this->m_values) as $sVal)
|
||||
{
|
||||
$sVal = trim($sVal);
|
||||
$sKey = $sVal;
|
||||
@@ -145,10 +152,6 @@ class ValueSetEnum extends ValueSetDefinition
|
||||
}
|
||||
}
|
||||
$this->m_aValues = $aValues;
|
||||
}
|
||||
|
||||
protected function LoadValues($aArgs)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -166,20 +169,25 @@ class ValueSetEnum extends ValueSetDefinition
|
||||
*/
|
||||
class ValueSetEnumClasses extends ValueSetEnum
|
||||
{
|
||||
public function __construct($sCategory = '', $sAdditionalValues = '')
|
||||
{
|
||||
// First, build it from the series of additional values
|
||||
parent::__construct($sAdditionalValues);
|
||||
protected $m_sCategories;
|
||||
|
||||
// Second: add the list of classes
|
||||
foreach (MetaModel::GetClasses($sCategory) as $sClass)
|
||||
{
|
||||
$this->m_aValues[$sClass] = MetaModel::GetName($sClass);
|
||||
}
|
||||
public function __construct($sCategories = '', $sAdditionalValues = '')
|
||||
{
|
||||
$this->m_sCategories = $sCategories;
|
||||
parent::__construct($sAdditionalValues);
|
||||
}
|
||||
|
||||
protected function LoadValues($aArgs)
|
||||
{
|
||||
{
|
||||
// First, get the additional values
|
||||
parent::LoadValues($aArgs);
|
||||
|
||||
// Then, add the classes from the category definition
|
||||
foreach (MetaModel::GetClasses($this->m_sCategories) as $sClass)
|
||||
{
|
||||
$this->m_aValues[$sClass] = MetaModel::GetName($sClass);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user