N°917: Fix TagSet search

This commit is contained in:
Pierre Goiffon
2018-09-27 15:20:37 +02:00
committed by Eric
parent 333c51b0f9
commit f55c0aa1c9
5 changed files with 64 additions and 65 deletions

View File

@@ -137,38 +137,6 @@ class QueryOQL extends Query
return $aFieldsMap;
}
public function ComputeValues()
{
parent::ComputeValues();
// Remove unwanted attribute codes
$aChanges = $this->ListChanges();
if (isset($aChanges['fields']))
{
$oAttDef = MetaModel::GetAttributeDef(get_class($this), 'fields');
$aArgs = array('this' => $this);
$aAllowedValues = $oAttDef->GetAllowedValues($aArgs);
/** @var \ormSet $oValue */
$oValue = $this->Get('fields');
$aValues = $oValue->GetValues();
$bChanged = false;
foreach($aValues as $key => $sValue)
{
if (!isset($aAllowedValues[$sValue]))
{
unset($aValues[$key]);
$bChanged = true;
}
}
if ($bChanged)
{
$oValue->SetValues($aValues);
$this->Set('fields', $oValue);
}
}
}
}
?>