' . $entry['html'];
$links = array();
foreach ($this->getConf('filetypes') as $type)
{
$file = $this->getConf('papers_ns') . '/' . $entry['id'] . '.' . mb_strtolower($type);
if (file_exists(PAPERS_DATADIR . $file))
{
$size = round(filesize(PAPERS_DATADIR . $file) / 1024) . ' ' . $this->getLang('KiB');
$links[] = '{{:' . preg_replace('/\//u', ':', $file) . "|$type $size}}";
}
}
if (!empty($links))
{
$link_text = $this->wikirender('(' . implode(' | ', $links) . ')');
$link_text = preg_replace('/<\/?p>/u', '', $link_text);
$link_text = preg_replace('/\s+(\d+)\s+/u', ' \1 ', $link_text);
$res .= '' . $link_text . '';
}
$res .= "
\n";
}
$res .= "