🐛 Fix notifications tab in objects no longer displaying items (regression introduced by a9bd5a8)

This commit is contained in:
Molkobain
2019-02-07 12:12:33 +01:00
parent fb5f59e72e
commit 46e99bfb40
3 changed files with 16 additions and 3 deletions

View File

@@ -678,7 +678,8 @@ EOF
foreach($aNotificationClasses as $sNotifClass)
{
$aNotifSearches[$sNotifClass] = DBObjectSearch::FromOQL("SELECT $sNotifClass AS Ev JOIN Trigger AS T ON Ev.trigger_id = T.id WHERE T.id IN (:triggers) AND Ev.object_id = :id");
$oNotifSet = new DBObjectSet($aNotifSearches[$sNotifClass], array(), $aParams);
$aNotifSearches[$sNotifClass]->SetInternalParams($aParams);
$oNotifSet = new DBObjectSet($aNotifSearches[$sNotifClass], array());
$iNotifsCount += $oNotifSet->Count();
}
// Display notifications regarding the object: on block per subclass to have the intersting columns

View File

@@ -249,7 +249,7 @@ class DisplayBlock
$sHtml .= $this->GetRenderContent($oPage, $aExtraParams, $sId);
} catch (Exception $e)
{
IssueLog::Error('Exception during GetDisplay: ' . $e->getMessage());
}
$sHtml .= "</div>\n";
}

View File

@@ -1536,7 +1536,19 @@ class VariableExpression extends UnaryExpression
$oRet = null;
if (array_key_exists($this->m_sName, $aArgs))
{
$oRet = new ScalarExpression($aArgs[$this->m_sName]);
if(is_array($aArgs[$this->m_sName]))
{
$aExpressions = array();
foreach($aArgs[$this->m_sName] as $sValue)
{
$aExpressions[] = new ScalarExpression($sValue);
}
$oRet = new ListExpression($aExpressions);
}
else
{
$oRet = new ScalarExpression($aArgs[$this->m_sName]);
}
}
elseif (($iPos = strpos($this->m_sName, '->')) !== false)
{