Add antibot to Element constructor in yukko themes, in the hope that posting from overboards as a normal user is not incorrectly blocked as spam / request looks automated.

This commit is contained in:
Benjamin Southall 2017-05-11 21:10:24 +09:00
parent cefd46ec2a
commit c9ece2d968
3 changed files with 27 additions and 7 deletions

View file

@ -138,7 +138,13 @@
$json = json_encode($api->translateCatalog($catalog, true));
$jsonFilename = $board['dir'] . 'threads.json';
file_write($jsonFilename, $json);
}
}
$antibot = null;
if (!$antibot) {
$antibot = create_antibot($board['uri']);
}
$antibot->reset();
return Element('index.html', array(
'config' => $config,
'board' => $board,
@ -146,7 +152,8 @@
'body' => $body,
'mod' => $mod,
'boardlist' => createBoardlist($mod),
'boards' => $boardsforukko3 )
'boards' => $boardsforukko3,
'antibot' => $antibot )
);
}