2015-02-25 17:21:49 -08:00
|
|
|
<?php
|
2021-06-29 23:10:12 -02:00
|
|
|
include 'inc/bootstrap.php';
|
2022-01-17 11:05:32 -01:00
|
|
|
require_once 'inc/mod/pages.php';
|
2015-02-25 17:21:49 -08:00
|
|
|
|
|
|
|
if (!isset($_GET['board']) || !preg_match("/{$config['board_regex']}/u", $_GET['board'])) {
|
|
|
|
http_response_code(400);
|
|
|
|
error('Bad board.');
|
|
|
|
}
|
|
|
|
if (!openBoard($_GET['board'])) {
|
|
|
|
http_response_code(404);
|
|
|
|
error('No board.');
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($config['public_logs'] == 0) error('This board has public logs disabled. Ask the board owner to enable it.');
|
|
|
|
if ($config['public_logs'] == 1) $hide_names = false;
|
|
|
|
if ($config['public_logs'] == 2) $hide_names = true;
|
|
|
|
|
|
|
|
if (!isset($_GET['page'])) {
|
|
|
|
$page = 1;
|
|
|
|
} else {
|
|
|
|
$page = (int)$_GET['page'];
|
|
|
|
};
|
|
|
|
|
2024-12-07 16:37:21 +01:00
|
|
|
mod_board_log(Vichan\build_context($config), $board['uri'], $page, $hide_names, true);
|