Archived
1
0
Fork 0

Print array of authors

This commit is contained in:
Alexander Yakovlev 2018-04-11 18:11:03 +07:00
parent 6b005fb6a9
commit 3aea8f89f3

View file

@ -32,7 +32,11 @@ class Game {
if (FORMAT === 'HTML') {
$output = "<li><a rel='nofollow' target='_blank' href='".trim($this->url)."'>«".trim($this->title)."»</a>";
if ($this->author) {
$output .= " — <em>".trim($this->author)."</em>";
if (is_array($this->author)) {
$output .= " — <em>".implode(', ', array_map('trim', $this->author))."</em>";
} else {
$output .= " — <em>".trim($this->author)."</em>";
}
}
}
}