Print statements
This commit is contained in:
parent
a6cd12ed9f
commit
490c766a06
|
@ -113,3 +113,4 @@ sfw/
|
|||
tech/
|
||||
ref/
|
||||
ga/
|
||||
Test/
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
$config['boards'] = array(
|
||||
array(
|
||||
'b',
|
||||
'leftypol',
|
||||
'Test'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -27,7 +29,7 @@ $config['prepended_foreign_boards'] = array(
|
|||
|
||||
// Board categories. Only used in the "Categories" theme.
|
||||
$config['categories'] = array(
|
||||
'Leftypol' => array(
|
||||
'Leftychan' => array(
|
||||
'b',
|
||||
)
|
||||
);
|
||||
|
@ -105,7 +107,7 @@ $config['thread_subject_in_title'] = true;
|
|||
// this functionality is permanently disabled.
|
||||
$config['spam']['enabled'] = false;
|
||||
$config['spam_noticer']['enabled'] = true;
|
||||
$config['spam_noticer']['base_url'] = 'http://192.168.4.6:8888';
|
||||
$config['spam_noticer']['base_url'] = 'http://localhost:8300';
|
||||
$config['spam_noticer']['website_name'] = "leftychan_dev";
|
||||
|
||||
/*
|
||||
|
|
|
@ -1810,6 +1810,7 @@ function mod_ban_post(string $board, $delete, $post_num, $token = false) {
|
|||
$will_spamnoticer = isset($_POST['spamnoticer']);
|
||||
|
||||
require_once 'inc/spamnoticer.php';
|
||||
require_once 'inc/anti-bot.php';
|
||||
|
||||
if ($will_spamnoticer) {
|
||||
$spamnoticer_info = parse_spamnoticer_content_fields($_POST, $po);
|
||||
|
@ -1820,6 +1821,7 @@ function mod_ban_post(string $board, $delete, $post_num, $token = false) {
|
|||
$po,
|
||||
$board,
|
||||
$spamnoticer_info);
|
||||
print_err('$spamnoticer_result: ' . $spamnoticer_result);
|
||||
}
|
||||
|
||||
$will_ban = $spamnoticer_info->ban;
|
||||
|
|
|
@ -137,6 +137,7 @@ function addToSpamNoticer($config, $post, $boardname, BanFormFieldsForSpamnotice
|
|||
|
||||
$status_code = $response->getStatusCode();
|
||||
$result_body = (string) $response->getBody();
|
||||
print_err($result_body);
|
||||
return "$status_code $result_body";
|
||||
|
||||
} catch (GuzzleHttp\Exception\ConnectException $e) {
|
||||
|
@ -204,6 +205,8 @@ function checkWithSpamNoticer($config, $post, $boardname) {
|
|||
|
||||
$result->client = $client;
|
||||
|
||||
print_err($response->getBody());
|
||||
|
||||
return $result;
|
||||
} catch (GuzzleHttp\Exception\ConnectException $e) {
|
||||
$result->reason = $e->getMessage();
|
||||
|
|
5
post.php
5
post.php
|
@ -6,6 +6,7 @@
|
|||
require_once 'inc/functions.php';
|
||||
require_once 'inc/anti-bot.php';
|
||||
require_once 'inc/bans.php';
|
||||
require_once 'inc/anti-bot.php'; // DELETE ME FOR DEBUGGING ONLY
|
||||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
|
||||
|
@ -416,11 +417,15 @@ function handle_report(){
|
|||
function handle_post(){
|
||||
global $config,$dropped_post,$board, $mod,$pdo;
|
||||
|
||||
print_err('handle_post BEGIN');
|
||||
|
||||
if (!isset($_POST['body'], $_POST['board']) && !$dropped_post) {
|
||||
print_err('handle_post bot error 1');
|
||||
error($config['error']['bot']);
|
||||
}
|
||||
|
||||
print_err('handle_post NO SUCH bot error 1');
|
||||
|
||||
$post = array('board' => $_POST['board'], 'files' => array());
|
||||
|
||||
// Check if board exists
|
||||
|
|
Loading…
Reference in New Issue