per-board javascript files

This commit is contained in:
Michael Save 2012-03-14 21:55:22 +11:00
parent d3b1f4cfa3
commit 9df2ce179e

View File

@ -60,6 +60,8 @@
echo "Generating Javascript file...\n";
buildJavascript();
$main_js = $config['file_script'];
$boards = listBoards();
foreach($boards as &$board) {
@ -69,6 +71,12 @@
echo "Creating index pages...\n";
buildIndex();
if($config['file_script'] != $main_js) {
// different javascript file
echo "Generating Javascript file...\n";
buildJavascript();
}
$query = query(sprintf("SELECT `id` FROM `posts_%s` WHERE `thread` IS NULL", $board['uri'])) or error(db_error());
while($post = $query->fetch()) {
echo "Rebuilding #{$post['id']}...\n";