Browse Source

Revert obsolete foreign board top bar code

pull/40/head
discomrade 3 years ago
parent
commit
c27b01a5ac
  1. 33
      inc/display.php

33
inc/display.php

@ -50,37 +50,11 @@ function doBoardListPart($list, $root, &$boards) {
} }
} }
} }
$body = preg_replace('/\/$/', '', $body); $body = preg_replace('/\/$/', '', $body);
return $body; return $body;
} }
function createForeignBoardListSection($configKey){
global $config;
$body = '';
if (isset($config[$configKey])){
$body .= ' <span class="sub">[';
// Append links to foreign boards
$i = 0;
foreach ($config[$configKey] as $fboardname => $fboardurl) {
$i++;
$body .= ' <a href="' . $fboardurl . '">' . $fboardname . '</a>';
// only put slash in between elements
if ($i != count($config[$configKey])) {
$body .= ' /';
}
}
$body .= ']</span> ';
}
return $body;
}
function createBoardlist($mod=false) { function createBoardlist($mod=false) {
global $config; global $config;
@ -91,10 +65,8 @@ function createBoardlist($mod=false) {
foreach ($xboards as $val) { foreach ($xboards as $val) {
$boards[$val['uri']] = $val['title']; $boards[$val['uri']] = $val['title'];
} }
$body = '';
$body .= createForeignBoardListSection('prepended_foreign_boards'); $body = doBoardListPart($config['boards'], $mod?'?/':$config['root'], $boards);
$body .= doBoardListPart($config['boards'], $mod?'?/':$config['root'], $boards);
$body .= createForeignBoardListSection('foreign_boards');
if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body)) if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body))
$body = '[' . $body . ']'; $body = '[' . $body . ']';
@ -110,7 +82,6 @@ function createBoardlist($mod=false) {
); );
} }
function loginForm($error=false, $username=false, $redirect=false) { function loginForm($error=false, $username=false, $redirect=false) {
global $config; global $config;

Loading…
Cancel
Save