From 8b4e097b3c9bd974a59a4b3acdad2f957b510a2f Mon Sep 17 00:00:00 2001 From: Sebastian Stal Date: Wed, 4 Jul 2012 10:17:51 -0700 Subject: [PATCH] Share antibot hash across index pages fixes an issue with slow boards and multi-page indexes --- inc/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index f175ba05..eedbf9b9 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1202,6 +1202,7 @@ function buildIndex() { global $board, $config; $pages = getPages(); + $antibot = create_antibot($board['uri']); $page = 1; while ($page <= $config['max_pages'] && $content = index($page)) { @@ -1211,7 +1212,7 @@ function buildIndex() { $content['pages'] = $pages; $content['pages'][$page-1]['selected'] = true; $content['btn'] = getPageButtons($content['pages']); - $content['antibot'] = create_antibot($board['uri']); + $content['antibot'] = $antibot; file_write($filename, Element('index.html', $content)); if (isset($md5) && $md5 == md5_file($filename)) {