Browse Source

Small Update - Updated Rebuild to archive threads/running cleanup before building index, Also added php_timeout to update scripts.

main
PupperWoff 7 years ago
committed by discomrade
parent
commit
0778052ef7
  1. 3
      UPDATE_SCRIPT__ARCHIVING_OF_THREADS.php
  2. 3
      UPDATE_SCRIPT__HASHING_OF_IP_ADDRESSES.php
  3. 9
      UPDATE_SCRIPT__SHADOW_DELETE.php
  4. 1
      inc/mod/pages.php

3
UPDATE_SCRIPT__ARCHIVING_OF_THREADS.php

@ -16,6 +16,9 @@ if (!$mod || $mod['type'] != ADMIN)
// Set timelimit to what it is for rebuild
@set_time_limit($config['mod']['rebuild_timelimit']);
$page['title'] = 'Updating Database - Archiving of Threads';

3
UPDATE_SCRIPT__HASHING_OF_IP_ADDRESSES.php

@ -16,6 +16,9 @@ if (!$mod || $mod['type'] != ADMIN)
// Set timelimit to what it is for rebuild
@set_time_limit($config['mod']['rebuild_timelimit']);
$page['title'] = 'Updating Database Hashing IP';

9
UPDATE_SCRIPT__SHADOW_DELETE.php

@ -14,6 +14,8 @@ check_login(true);
if (!$mod || $mod['type'] != ADMIN)
die("You need to be logged in as admin");
// Set timelimit to what it is for rebuild
@set_time_limit($config['mod']['rebuild_timelimit']);
$page['title'] = 'Updating Database - Temporarly Deletion of Threads';
@ -38,13 +40,6 @@ switch($step)
$boards = listBoards();
foreach ($boards as &$_board) {
// Create Temp Posts Table for Boards
$query = Element('../UPDATE_SQL__SHADOW_DELETE.sql');
if (mysql_version() < 50503)
$query = preg_replace('/(CHARSET=|CHARACTER SET )utf8mb4/', '$1utf8', $query);
query($query) or $sql_errors .= "<li>Add Shared Shadow Post DB Tables<br/>" . db_error() . '</li>';
// Create Temp Posts Table for Boards
$query = Element('posts.sql', array('board' => $_board['uri']));
$query = str_replace("``posts_", "``shadow_posts_", $query);

1
inc/mod/pages.php

@ -3011,6 +3011,7 @@ function mod_rebuild() {
$config['try_smarter'] = false;
if (isset($_POST['rebuild_index'])) {
clean("Rebuild");
buildIndex();
$log[] = '<strong>' . sprintf($config['board_abbreviation'], $board['uri']) . '</strong>: Creating index pages';
}

Loading…
Cancel
Save