Commit d3294ded authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(management) Fix multivalue support in Column class

Moved up from LinkColumn

issue #5135
Showing with 10 additions and 17 deletions
+10 -17
......@@ -175,6 +175,15 @@ class Column
$value = $this->getAttributeValue($entry);
if ($value == '') {
return ' ';
} elseif (is_array($value)) {
$value = array_map(
function ($v)
{
return htmlentities($v, ENT_COMPAT, 'UTF-8');
},
$value
);
return implode("<br/>\n", $value);
} else {
return htmlentities($value, ENT_COMPAT, 'UTF-8');
}
......
......@@ -25,23 +25,7 @@ class LinkColumn extends Column
{
function renderCell(ListingEntry $entry)
{
$value = $this->getAttributeValue($entry);
if ($value == '') {
return '&nbsp;';
} else {
if (is_array($value)) {
$value = array_map(
function ($v)
{
return htmlentities($v, ENT_COMPAT, 'UTF-8');
},
$value
);
return $this->renderLink($entry, implode("<br/>\n", $value));
} else {
return $this->renderLink($entry, htmlentities($value, ENT_COMPAT, 'UTF-8'));
}
}
return $this->renderLink($entry, parent::renderCell($entry));
}
protected function renderLink(ListingEntry $entry, $htmlValue)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment