Compare commits

..

No commits in common. "1eace91823d241d595571e7a960c69a8d1be26ce" and "f11c4cb1e760fa0af7e9f3a2b0123d246778f2b2" have entirely different histories.

4 changed files with 24 additions and 47 deletions

View File

@ -96,7 +96,6 @@ $config['db']['password'] = '';
$config['cookies']['mod'] = 'mod';
$config['cookies']['salt'] = 'MGYwNjhlNjU5Y2QxNWU3YjQ3MzQ1Yj';
$config['dns_system'] = true;
$config['search']['enable'] = true;
$config['flood_cache'] = 60 * 15; // 15 minutes. The oldest a post can be in the flood table
$config['flood_time_any'] = 120; // time between thread creation
@ -598,5 +597,5 @@ $config['filters'][] = array(
'message' => 'New threads are being created too quickly. Wait [at most] 10 minutes'
);
$config['global_message'] = '<span><a href="https://talk.leftychan.net/#/room/#welcome:matrix.leftychan.net">Matrix</a></span> &nbsp; <span><a href="ircs://irc.leftychan.net:6697/#leftychan">IRC Chat</a></span> &nbsp; <span><a href="mumble://leftychan.net">Mumble</a></span> &nbsp; <span><a href="https://discord.gg/AcZeFKXPmZ">Discord</a></span>';
$config['global_message'] = '<span><a href="https://talk.leftychan.net/#/room/#welcome:matrix.leftychan.net">Matrix</a></span> &nbsp; <span><a href="ircs://irc.leftychan.net:6697/#leftychan">IRC Chat</a></span> &nbsp; <span><a href="mumble://leftychan.net">Mumble</a></span> &nbsp; <span><a href="https://t.me/+RegtyzzrE0M1NDMx">Telegram</a></span> &nbsp; <span><a href="https://discord.gg/AcZeFKXPmZ">Discord</a></span>';
$config['debug'] = false;

View File

@ -296,8 +296,6 @@ function checkWithSpamNoticer($config, $post, $boardname) {
print_err($body);
$reasons_bitmap = json_decode($body)->reason;
$result->reason = renderReasons($reasons_bitmap);
} else if ($config['debug']) {
print_err((string) $response->getBody());
}
} else {
print_err("spamnoticer status code: " . $status_code);

View File

@ -458,6 +458,7 @@ function handle_post(){
global $config, $dropped_post, $board, $mod, $pdo, $debug;
$time_1 = microtime(true);
$debug['time']['post'] = array();
init_global_post_cleanup();
@ -471,8 +472,6 @@ function handle_post(){
if (!openBoard($post['board']))
error($config['error']['noboard']);
$debug['time']['post'] = array();
$board_locked_check = (!isset($_POST['mod']) || !$_POST['mod'])
&& ($config['board_locked']===true
|| (is_array($config['board_locked']) && in_array(strtolower($_POST['board']), $config['board_locked'])));
@ -554,14 +553,10 @@ function handle_post(){
error($config['error']['referer']);
}
$time_dnsbl = microtime(true);
checkDNSBL();
$debug['time']['post']['dnsbl'] = round((microtime(true) - $time_dnsbl) * 1000, 2) . 'ms';
$time_ban = microtime(true);
// Check if banned
checkBan($board['uri']);
$debug['time']['post']['check_ban'] = round((microtime(true) - $time_ban) * 1000, 2) . 'ms';
if ($post['mod'] = isset($_POST['mod']) && $_POST['mod']) {
check_login(false);
@ -601,10 +596,6 @@ function handle_post(){
else {
$mod = $post['mod'] = false;
}
$time_rolling2 = microtime(true);
$debug['time']['post']['pre_noticer1'] = round(($time_rolling2 - $time_1) * 1000, 2) . 'ms';
$time_rolling1 = $time_rolling2;
//Check if thread exists
if (!$post['op']) {
@ -621,9 +612,6 @@ function handle_post(){
$thread = false;
}
$time_rolling2 = microtime(true);
$debug['time']['post']['pre_noticer2'] = round(($time_rolling2 - $time_rolling1) * 1000, 2) . 'ms';
$time_rolling1 = $time_rolling2;
// Check for an embed field
if ($config['enable_embedding'] && isset($_POST['embed']) && !empty($_POST['embed'])) {
@ -724,10 +712,6 @@ function handle_post(){
}
$time_rolling2 = microtime(true);
$debug['time']['post']['pre_noticer3'] = round(($time_rolling2 - $time_rolling1) * 1000, 2) . 'ms';
$time_rolling1 = $time_rolling2;
$post['name'] = $_POST['name'] != '' ? $_POST['name'] : $config['anonymous'];
$post['subject'] = $_POST['subject'];
$post['email'] = str_replace(' ', '%20', htmlspecialchars($_POST['email']));
@ -771,10 +755,6 @@ function handle_post(){
}
}
$time_rolling2 = microtime(true);
$debug['time']['post']['pre_noticer4'] = round(($time_rolling2 - $time_rolling1) * 1000, 2) . 'ms';
$time_rolling1 = $time_rolling2;
if ($post['has_file']) {
// Determine size sanity
$size = 0;
@ -810,10 +790,6 @@ function handle_post(){
$post['filesize'] = $size;
}
$time_rolling2 = microtime(true);
$debug['time']['post']['pre_noticer5'] = round(($time_rolling2 - $time_rolling1) * 1000, 2) . 'ms';
$time_rolling1 = $time_rolling2;
$post['capcode'] = false;
if ($mod && preg_match('/^((.+) )?## (.+)$/', $post['name'], $matches)) {
@ -897,10 +873,6 @@ function handle_post(){
}
}
$time_rolling2 = microtime(true);
$debug['time']['post']['pre_noticer6'] = round(($time_rolling2 - $time_rolling1) * 1000, 2) . 'ms';
$time_rolling1 = $time_rolling2;
if ($config['strip_combining_chars']) {
$post['name'] = strip_combining_chars($post['name']);
$post['email'] = strip_combining_chars($post['email']);
@ -1060,12 +1032,8 @@ function handle_post(){
validate_images($post);
$time_rolling2 = microtime(true);
$debug['time']['post']['pre_noticer7'] = round(($time_rolling2 - $time_rolling1) * 1000, 2) . 'ms';
$time_rolling1 = $time_rolling2;
$time_2 = microtime(true);
$debug['time']['post']['pre_noticer_total'] = round(($time_2 - $time_1) * 1000, 2) . 'ms';
$debug['time']['post']['pre_noticer'] = round(($time_2 - $time_1) * 1000, 2) . 'ms';
if ($config['spam_noticer']['enabled']) {
require_once 'inc/spamnoticer.php';
@ -1076,10 +1044,6 @@ function handle_post(){
$spam_noticer_result = checkWithSpamNoticer($config, $post, $board['uri']);
if ($spam_noticer_result->succeeded && $spam_noticer_result->noticed) {
error($config['error']['spam_noticer'] . $spam_noticer_result->reason);
}
/*
* If we have an error with posting this later, send back the
* delete token to spamnoticer to remove the post from the recent
@ -1091,7 +1055,11 @@ function handle_post(){
push_global_post_cleanup($f_spamnoticer_cleanup_on_err);
$debug['time']['post']['spam_noticer'] = round((microtime(true) - $time_2) * 1000, 2) . 'ms';
if ($spam_noticer_result->succeeded && $spam_noticer_result->noticed) {
error($config['error']['spam_noticer'] . $spam_noticer_result->reason);
}
$debug['time']['post']['spam_noticer'] = round(($microtime(true) - $time_1) * 1000, 2) . 'ms';
}
$time_3 = microtime(true);

View File

@ -9,21 +9,34 @@ body {
font-size: 15px;
}
.theme-catalog .replies {
font-family: serif;
}
div.post div.body {
font-family: serif;
}
span.heading {
font-size: 15px;
}
.theme-catalog .replies .meta,
.theme-catalog .replies .intro,
div.post div.body a,
div.post div.body .toolong {
font-family: Courier, monospace;
}
/* LINKS */
a, a:link, a:visited, .intro a.email span.name {
color: #FFB300;
text-decoration: none;
}
a:link:hover, a:visited:hover {
color: #FFB300;
text-shadow: 0px 0px 5px #117743;
}
div.pages a.selected {
color: #FFB300;
}
@ -31,14 +44,13 @@ div.pages a.selected {
/* INTRO */
h1, div.title, header div.subtitle {
color: #FFB300;
font-family: Courier, monospace;
}
h1 {
font-size: 18pt;
font-weight: bold;
letter-spacing: 0px;
}
header div.subtitle {
font-size: 10pt;
}