mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Retrofit from trunk
N°1561 - Fix auto-complete error when the friendlyname depends on other classes [from revision 5948] SVN:2.4[5949]
This commit is contained in:
@@ -210,6 +210,19 @@ class ValueSetObjects extends ValueSetDefinition
|
||||
}
|
||||
}
|
||||
|
||||
$oExpression = DBObjectSearch::GetPolymorphicExpression($oFilter->GetClass(), 'friendlyname');
|
||||
$aFields = $oExpression->ListRequiredFields();
|
||||
$sClass = $oFilter->GetClass();
|
||||
foreach($aFields as $sField)
|
||||
{
|
||||
$aFieldItems = explode('.', $sField);
|
||||
if ($aFieldItems[0] != $sClass)
|
||||
{
|
||||
$sOperation = 'contains';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch ($sOperation)
|
||||
{
|
||||
case 'equals_start_with':
|
||||
|
||||
Reference in New Issue
Block a user