Browse Source

#711 Audit error drill-down not working when zero error (requires to bookmark the link when there are some errors, then use it later when there is no error anymore)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2729 a333f486-631f-4898-b8df-5754b55c2be0
romainq 12 years ago
parent
commit
ad9c098b7d
1 changed files with 8 additions and 1 deletions
  1. 8 1
      application/displayblock.class.inc.php

+ 8 - 1
application/displayblock.class.inc.php

@@ -78,7 +78,14 @@ class DisplayBlock
 			$aKeys[] = $oObject->GetKey();	
 		}
 		$oSet->Rewind();
-		$oDummyFilter->AddCondition('id', $aKeys, 'IN');
+		if (count($aKeys) > 0)
+		{
+			$oDummyFilter->AddCondition('id', $aKeys, 'IN');
+		}
+		else
+		{
+			$oDummyFilter->AddCondition('id', 0, '=');
+		}
 		$oBlock = new DisplayBlock($oDummyFilter, $sStyle, false, $aParams); // DisplayBlocks built this way are synchronous
 		return $oBlock;
 	}