diff --git a/inc/display.php b/inc/display.php index 9009be9a..d16b12aa 100644 --- a/inc/display.php +++ b/inc/display.php @@ -19,19 +19,23 @@ function format_bytes($size) { return round($size, 2).$units[$i]; } -function doBoardListPart($list, $root) { +function doBoardListPart($list, $root, &$boards) { global $config; $body = ''; - foreach ($list as $board) { + foreach ($list as $key => $board) { if (is_array($board)) - // $body .= ' [' . doBoardListPart($board, $root) . '] '; - $body .= ' [' . doBoardListPart($board, $root) . '] '; + $body .= ' [' . doBoardListPart($board, $root, $boards) . '] '; else { - if (($key = array_search($board, $list)) && gettype($key) == 'string') { + if (gettype($key) == 'string') { $body .= ' ' . $key . ' /'; - } else { - $body .= ' ' . $board . ' /'; + } else { + $title = ''; + if (isset ($boards[$board])) { + $title = ' title="'.$boards[$board].'"'; + } + + $body .= ' ' . $board . ' /'; } } } @@ -45,7 +49,13 @@ function createBoardlist($mod=false) { if (!isset($config['boards'])) return array('top'=>'','bottom'=>''); - $body = doBoardListPart($config['boards'], $mod?'?/':$config['root']); + $xboards = listBoards(); + $boards = array(); + foreach ($xboards as $val) { + $boards[$val['uri']] = $val['title']; + } + + $body = doBoardListPart($config['boards'], $mod?'?/':$config['root'], $boards); if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body)) $body = '[' . $body . ']';