1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 02:04:35 +01:00

Remove openBoard() from ukko

This commit is contained in:
8chan 2014-04-19 20:02:15 +00:00
parent 8756bd8544
commit c70b4e3959

View File

@ -10,7 +10,7 @@
class ukko {
public $settings;
public function build($mod = false) {
global $config;
global $config, $board;
$boards = listBoards();
$body = '';
@ -41,7 +41,9 @@
}
if($count < $this->settings['thread_limit']) {
openBoard($post['board']);
$config['uri_thumb'] = '/'.$post['board'].'/thumb/';
$config['uri_img'] = '/'.$post['board'].'/src/';
$board['dir'] = $post['board'].'/';
$thread = new Thread($post, $mod ? '?/' : $config['root'], $mod);
$posts = prepare(sprintf("SELECT * FROM ``posts_%s`` WHERE `thread` = :id ORDER BY `id` DESC LIMIT :limit", $post['board']));
@ -51,6 +53,9 @@
$num_images = 0;
while ($po = $posts->fetch()) {
$config['uri_thumb'] = '/'.$post['board'].'/thumb/';
$config['uri_img'] = '/'.$post['board'].'/src/';
if ($po['file'])
$num_images++;
@ -87,6 +92,7 @@
$body .= '<script> var overflow = ' . json_encode($overflow) . '</script>';
$body .= '<script type="text/javascript" src="ukko.js"></script>';
$config['default_stylesheet'] = array('Yotsuba B', $config['stylesheets']['Yotsuba B']);
file_write($this->settings['uri'] . '/index.html', Element('index.html', array(
'config' => $config,
'board' => $board,