From 06e5052a5da55ac8661991754cf1ca9ae907f8e7 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Wed, 19 Apr 2017 07:09:02 +0900 Subject: [PATCH] Add ['boards_alias'] in order to have Unicode icons in top bar that route to non unicode board names intelligently. --- inc/display.php | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/inc/display.php b/inc/display.php index d65cd1b8..05f91c2b 100644 --- a/inc/display.php +++ b/inc/display.php @@ -30,12 +30,23 @@ function doBoardListPart($list, $root, &$boards) { if (gettype($key) == 'string') { $body .= ' ' . $key . ' /'; } else { - $title = ''; - if (isset ($boards[$board])) { - $title = ' title="'.$boards[$board].'"'; - } - - $body .= ' ' . $board . ' /'; + $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 .= ' ' . $board . ' /'; + } + else + { + if (isset ($boards[$board])) { + $title = ' title="'.$boards[$board].'"'; + } + + $body .= ' ' . $board . ' /'; + } } } }