Advanced Search: Display links also when the object is not visible

SVN:trunk[5708]
This commit is contained in:
Eric Espié
2018-04-20 13:45:02 +00:00
parent c734eec9e1
commit aa4416ac4e
2 changed files with 11 additions and 4 deletions

View File

@@ -227,7 +227,13 @@ class DisplayBlock
{
// render now
$sHtml .= "<div id=\"$sId\" class=\"display_block\" >\n";
$sHtml .= $this->GetRenderContent($oPage, $aExtraParams, $sId);
try
{
$sHtml .= $this->GetRenderContent($oPage, $aExtraParams, $sId);
} catch (Exception $e)
{
}
$sHtml .= "</div>\n";
}
else

View File

@@ -786,8 +786,7 @@ class ScalarExpression extends UnaryExpression
{
/** @var AttributeExternalKey $oAttDef */
$sTarget = $oAttDef->GetTargetClass();
$oObj = MetaModel::GetObject($sTarget, $this->GetValue());
$oObj = MetaModel::GetObject($sTarget, $this->GetValue(), true, true);
$aValue['label'] = $oObj->Get("friendlyname");
}
}
@@ -1017,6 +1016,7 @@ class FieldExpression extends UnaryExpression
* @param string sDefault The default value if no relevant label could be computed
*
* @return The label
* @throws \CoreException
*/
public function MakeValueLabel($oFilter, $sValue, $sDefault)
{
@@ -1033,11 +1033,12 @@ class FieldExpression extends UnaryExpression
// Exceptions...
if ($oAttDef->IsExternalKey())
{
/** @var AttributeExternalKey $oAttDef */
$sObjClass = $oAttDef->GetTargetClass();
$iObjKey = (int)$sValue;
if ($iObjKey > 0)
{
$oObject = MetaModel::GetObjectWithArchive($sObjClass, $iObjKey);
$oObject = MetaModel::GetObjectWithArchive($sObjClass, $iObjKey, true, true);
$sRes = $oObject->GetHyperlink();
}
else