Browse Source

#702 The second implementation of this fix was still incomplete (not compatible with some constraint queries)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2694 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 years ago
parent
commit
f5904fd2ea
1 changed files with 8 additions and 0 deletions
  1. 8 0
      core/dbobjectsearch.class.php

+ 8 - 0
core/dbobjectsearch.class.php

@@ -128,6 +128,14 @@ class DBObjectSearch
 		{
 			$sAlias = $this->GetClassAlias();
 		}
+		else
+		{
+			if (!array_key_exists($sAlias, $this->m_aClasses))
+			{
+				// discard silently - necessary when recursing on the related nodes (see code below)
+				return;
+			}
+		}
 		$sCurrClass = $this->GetClassName($sAlias);
 		if (!MetaModel::IsParentClass($sCurrClass, $sNewClass))
 		{