Add ['boards_alias'] in order to have Unicode icons in top bar that route to non unicode board names intelligently.

This commit is contained in:
Benjamin Southall 2017-04-19 07:09:02 +09:00
parent 8a5850aa11
commit 06e5052a5d

View File

@ -31,6 +31,16 @@ function doBoardListPart($list, $root, &$boards) {
$body .= ' <a href="' . $board . '">' . $key . '</a> /';
} else {
$title = '';
if (array_key_exists($board,$config['boards_alias'])){
$actual_board = $config['boards_alias'][$board];
if (isset ($boards[$actual_board])) {
$title = ' title="'.$boards[$actual_board].'"';
}
$body .= ' <a href="' . $root . $actual_board . '/' . $config['file_index'] . '"'.$title.'>' . $board . '</a> /';
}
else
{
if (isset ($boards[$board])) {
$title = ' title="'.$boards[$board].'"';
}
@ -39,6 +49,7 @@ function doBoardListPart($list, $root, &$boards) {
}
}
}
}
$body = preg_replace('/\/$/', '', $body);
return $body;