check if attribute value is not null

This commit is contained in:
Uwe Steinmann 2025-11-24 19:56:24 +01:00
parent 8b33ffe27a
commit fc8afd1b5c
2 changed files with 16 additions and 8 deletions

View File

@ -1943,7 +1943,8 @@ $(document).ready(function() {
$attrs = $attribute->getValueAsArray();
$tmp = array();
foreach($attrs as $targetfolder) {
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$targetfolder->getId().'">'.htmlspecialchars($targetfolder->getName()).'</a>';
if ($targetfolder)
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$targetfolder->getId().'">'.htmlspecialchars($targetfolder->getName()).'</a>';
}
return implode('<br />', $tmp);
break;
@ -1951,7 +1952,8 @@ $(document).ready(function() {
$attrs = $attribute->getValueAsArray();
$tmp = array();
foreach($attrs as $targetdoc) {
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$targetdoc->getId().'">'.htmlspecialchars($targetdoc->getName()).'</a>';
if ($targetdoc)
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$targetdoc->getId().'">'.htmlspecialchars($targetdoc->getName()).'</a>';
}
return implode('<br />', $tmp);
break;
@ -1959,7 +1961,8 @@ $(document).ready(function() {
$attrs = $attribute->getValueAsArray();
$tmp = array();
foreach($attrs as $curuser) {
$tmp[] = htmlspecialchars($curuser->getFullname()." (".$curuser->getLogin().")");
if ($curuser)
$tmp[] = htmlspecialchars($curuser->getFullname()." (".$curuser->getLogin().")");
}
return implode('<br />', $tmp);
break;
@ -1967,7 +1970,8 @@ $(document).ready(function() {
$attrs = $attribute->getValueAsArray();
$tmp = array();
foreach($attrs as $curgroup) {
$tmp[] = htmlspecialchars($curgroup->getName());
if ($curgroup)
$tmp[] = htmlspecialchars($curgroup->getName());
}
return implode('<br />', $tmp);
break;

View File

@ -1962,7 +1962,8 @@ $(document).ready(function() {
$attrs = $attribute->getValueAsArray();
$tmp = array();
foreach($attrs as $targetfolder) {
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$targetfolder->getId().'">'.htmlspecialchars($targetfolder->getName()).'</a>';
if ($targetfolder)
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$targetfolder->getId().'">'.htmlspecialchars($targetfolder->getName()).'</a>';
}
return implode('<br />', $tmp);
break;
@ -1970,7 +1971,8 @@ $(document).ready(function() {
$attrs = $attribute->getValueAsArray();
$tmp = array();
foreach($attrs as $targetdoc) {
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$targetdoc->getId().'">'.htmlspecialchars($targetdoc->getName()).'</a>';
if ($targetdoc)
$tmp[] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$targetdoc->getId().'">'.htmlspecialchars($targetdoc->getName()).'</a>';
}
return implode('<br />', $tmp);
break;
@ -1978,7 +1980,8 @@ $(document).ready(function() {
$attrs = $attribute->getValueAsArray();
$tmp = array();
foreach($attrs as $curuser) {
$tmp[] = htmlspecialchars($curuser->getFullname()." (".$curuser->getLogin().")");
if ($curuser)
$tmp[] = htmlspecialchars($curuser->getFullname()." (".$curuser->getLogin().")");
}
return implode('<br />', $tmp);
break;
@ -1986,7 +1989,8 @@ $(document).ready(function() {
$attrs = $attribute->getValueAsArray();
$tmp = array();
foreach($attrs as $curgroup) {
$tmp[] = htmlspecialchars($curgroup->getName());
if ($curgroup)
$tmp[] = htmlspecialchars($curgroup->getName());
}
return implode('<br />', $tmp);
break;