mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
Fix regression on hierarchical keys
SVN:trunk[1496]
This commit is contained in:
@@ -2440,14 +2440,14 @@ if (!array_key_exists($sAttCode, self::$m_aAttribDefs[$sClass]))
|
|||||||
|
|
||||||
// Note: there is no search condition in $oExtFilter, because normalization did merge the condition onto the top of the filter tree
|
// Note: there is no search condition in $oExtFilter, because normalization did merge the condition onto the top of the filter tree
|
||||||
|
|
||||||
|
//echo "MAKEQUERY-array_key_exists($sTableClass, \$aExtKeys)<br/>\n";
|
||||||
|
if (array_key_exists($sTableClass, $aExtKeys) && array_key_exists($sKeyAttCode, $aExtKeys[$sTableClass]))
|
||||||
|
{
|
||||||
if ($iOperatorCode == TREE_OPERATOR_EQUALS)
|
if ($iOperatorCode == TREE_OPERATOR_EQUALS)
|
||||||
{
|
{
|
||||||
// Specify expected attributes for the target class query
|
// Specify expected attributes for the target class query
|
||||||
// ... and use the current alias !
|
// ... and use the current alias !
|
||||||
$aTranslateNow = array(); // Translation for external fields - must be performed before the join is done (recursion...)
|
$aTranslateNow = array(); // Translation for external fields - must be performed before the join is done (recursion...)
|
||||||
//echo "MAKEQUERY-array_key_exists($sTableClass, \$aExtKeys)<br/>\n";
|
|
||||||
if (array_key_exists($sTableClass, $aExtKeys) && array_key_exists($sKeyAttCode, $aExtKeys[$sTableClass]))
|
|
||||||
{
|
|
||||||
foreach($aExtKeys[$sTableClass][$sKeyAttCode] as $sAttCode => $oAtt)
|
foreach($aExtKeys[$sTableClass][$sKeyAttCode] as $sAttCode => $oAtt)
|
||||||
{
|
{
|
||||||
//echo "MAKEQUERY aExtKeys[$sTableClass][$sKeyAttCode] => $sAttCode-oAtt: <pre>".print_r($oAtt, true)."</pre><br/>\n";
|
//echo "MAKEQUERY aExtKeys[$sTableClass][$sKeyAttCode] => $sAttCode-oAtt: <pre>".print_r($oAtt, true)."</pre><br/>\n";
|
||||||
@@ -2500,7 +2500,6 @@ if (!array_key_exists($sAttCode, self::$m_aAttribDefs[$sClass]))
|
|||||||
$oSelectBase->AddInnerJoin($oSelectExtKey, $sLocalKeyField, $sExternalKeyField, $sExternalKeyTable);
|
$oSelectBase->AddInnerJoin($oSelectExtKey, $sLocalKeyField, $sExternalKeyField, $sExternalKeyTable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$oQBExpr->PushJoinField(new FieldExpression($sKeyAttCode, $sKeyClassAlias));
|
$oQBExpr->PushJoinField(new FieldExpression($sKeyAttCode, $sKeyClassAlias));
|
||||||
@@ -2521,6 +2520,7 @@ if (!array_key_exists($sAttCode, self::$m_aAttribDefs[$sClass]))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Translate the selected columns
|
// Translate the selected columns
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user