|
@ -14,6 +14,8 @@ check_login(true); |
|
|
if (!$mod || $mod['type'] != ADMIN) |
|
|
if (!$mod || $mod['type'] != ADMIN) |
|
|
die("You need to be logged in as 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'; |
|
|
$page['title'] = 'Updating Database - Temporarly Deletion of Threads'; |
|
|
|
|
|
|
|
@ -38,13 +40,6 @@ switch($step) |
|
|
$boards = listBoards(); |
|
|
$boards = listBoards(); |
|
|
foreach ($boards as &$_board) { |
|
|
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 |
|
|
// Create Temp Posts Table for Boards |
|
|
$query = Element('posts.sql', array('board' => $_board['uri'])); |
|
|
$query = Element('posts.sql', array('board' => $_board['uri'])); |
|
|
$query = str_replace("``posts_", "``shadow_posts_", $query); |
|
|
$query = str_replace("``posts_", "``shadow_posts_", $query); |
|
|