(Retrofit from trunk) Portal : External keys OQL now intersect with scopes in forms!

SVN:2.3[4381]
This commit is contained in:
Guillaume Lajarige
2016-09-06 07:06:13 +00:00
parent 746c97818e
commit 096236cb3a
2 changed files with 28 additions and 4 deletions

View File

@@ -4365,9 +4365,13 @@ class AttributeExternalKey extends AttributeDBFieldVoid
$oTmpField = $oFormField;
$oFormField->SetOnFinalizeCallback(function() use ($oTmpField, $oTmpAttDef, $oObject)
{
$oSearch = DBSearch::FromOQL($oTmpAttDef->GetValuesDef()->GetFilterExpression());
$oSearch->SetInternalParams(array('this' => $oObject));
$oTmpField->SetSearch($oSearch);
// We set search object only if it has not already been set (overrided)
if ($oTmpField->GetSearch() === null)
{
$oSearch = DBSearch::FromOQL($oTmpAttDef->GetValuesDef()->GetFilterExpression());
$oSearch->SetInternalParams(array('this' => $oObject));
$oTmpField->SetSearch($oSearch);
}
});
}
else