N°1232 Portal: Harmonize right checks for external url in forms

This commit is contained in:
Stephen Abello
2019-08-02 11:04:32 +02:00
parent 305b236f41
commit d2015b7d7b
5 changed files with 8 additions and 88 deletions

View File

@@ -329,9 +329,9 @@ EOF
// Note : AllowAllData set to true here instead of checking scope's flag because we are displaying a value that has been set and validated
$oFieldValue = MetaModel::GetObject($sFieldValueClass, $this->oField->GetCurrentValue(), true, true);
$sFieldHtmlValue = $oFieldValue->GetName();
if ($this->oField->GetRemoteObjectAccessible())
$sFieldUrl = ApplicationContext::MakeObjectUrl($sFieldValueClass, $this->oField->GetCurrentValue());
if(!empty($sFieldUrl))
{
$sFieldUrl = ApplicationContext::MakeObjectUrl($sFieldValueClass, $this->oField->GetCurrentValue());
$sFieldHtmlValue = '<a href="'.$sFieldUrl.'" data-toggle="itop-portal-modal">'.$sFieldHtmlValue.'</a>';
}
}