#!/usr/bin/php "{$config['dir']['template']}/cache" )); $twig->clearCacheFiles(); echo 'Regenerating theme files...'."\n"; rebuildThemes('all'); echo 'Generating Javascript file...'."\n"; buildJavascript(); $boards = listBoards(); foreach($boards as &$board) { echo "Opening board /{$board['uri']}/...\n"; openBoard($board['uri']); echo 'Creating index pages...'+"\n"; buildIndex(); $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"; buildThread($post['id']); } } echo 'Complete!'."\n"; printf('Took %g seconds.'."\n", microtime(true) - $start); //modLog('Rebuilt everything using tools/rebuild.php'); ?>