1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-12 10:00:49 +01:00

Merge pull request #54 from stal888/derp

Share an antibot hash set across index pages
This commit is contained in:
Michael 2012-07-13 01:27:04 -07:00
commit a6adb8a6a5

View File

@ -1202,6 +1202,7 @@ function buildIndex() {
global $board, $config; global $board, $config;
$pages = getPages(); $pages = getPages();
$antibot = create_antibot($board['uri']);
$page = 1; $page = 1;
while ($page <= $config['max_pages'] && $content = index($page)) { while ($page <= $config['max_pages'] && $content = index($page)) {
@ -1211,7 +1212,7 @@ function buildIndex() {
$content['pages'] = $pages; $content['pages'] = $pages;
$content['pages'][$page-1]['selected'] = true; $content['pages'][$page-1]['selected'] = true;
$content['btn'] = getPageButtons($content['pages']); $content['btn'] = getPageButtons($content['pages']);
$content['antibot'] = create_antibot($board['uri']); $content['antibot'] = $antibot;
file_write($filename, Element('index.html', $content)); file_write($filename, Element('index.html', $content));
if (isset($md5) && $md5 == md5_file($filename)) { if (isset($md5) && $md5 == md5_file($filename)) {