Line 67 | Line 67 |
---|
if (!check_form_key($form_key)) { trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
if (!check_form_key($form_key)) { trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
}
$store = true; $structure = false; $schema_data = false;
if ($type == 'full' || $type == 'structure') { $structure = true; }
if ($type == 'full' || $type == 'data') { $schema_data = true;
| |
}
@set_time_limit(1200);
| }
@set_time_limit(1200);
|
Line 92 | Line 78 |
---|
/** @var phpbb\db\extractor\extractor_interface $extractor Database extractor */ $extractor = $phpbb_container->get('dbal.extractor');
|
/** @var phpbb\db\extractor\extractor_interface $extractor Database extractor */ $extractor = $phpbb_container->get('dbal.extractor');
|
$extractor->init_extractor($format, $filename, $time, false, $store);
| $extractor->init_extractor($format, $filename, $time, false, true);
|
$extractor->write_start($table_prefix);
foreach ($table as $table_name) { // Get the table structure
|
$extractor->write_start($table_prefix);
foreach ($table as $table_name) { // Get the table structure
|
if ($structure)
| if ($type == 'full')
|
{ $extractor->write_table($table_name); }
| { $extractor->write_table($table_name); }
|
Line 123 | Line 109 |
---|
default: $extractor->flush('TRUNCATE TABLE ' . $table_name . ";\n");
|
default: $extractor->flush('TRUNCATE TABLE ' . $table_name . ";\n");
|
break;
| |
} }
|
} }
|
// Data if ($schema_data) {
| // Only supported types are full and data, therefore always write the data
|
$extractor->write_data($table_name);
|
$extractor->write_data($table_name);
|
}
| |
}
$extractor->write_end();
| }
$extractor->write_end();
|