mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-05 04:18:03 +01:00
d970baa5d8
Note: In a previous commit, I began making inc/mod/auth.php more modular with the check_login() function. Including it does NOT check mod login by default anymore like it does on vichan. You have to call check_login(). I've finally included it in inc/functions.php. If you have any custom pages that use inc/mod/auth.php, just including functions.php is enough now.
25 lines
649 B
PHP
25 lines
649 B
PHP
<?php
|
|
include 'inc/functions.php';
|
|
include 'inc/mod/pages.php';
|
|
|
|
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 ($board['public_logs'] == 0) error('This board has public logs disabled. Ask the board owner to enable it.');
|
|
if ($board['public_logs'] == 1) $hide_names = false;
|
|
if ($board['public_logs'] == 2) $hide_names = true;
|
|
|
|
if (!isset($_GET['page'])) {
|
|
$page = 1;
|
|
} else {
|
|
$page = (int)$_GET['page'];
|
|
};
|
|
|
|
mod_board_log($board['uri'], $page, $hide_names, true);
|