mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-20 07:42:09 +02:00
Merge pull request #6218 from marc1706/ticket/16783
[ticket/16783] Remove structure only backup
This commit is contained in:
commit
f007aef3d8
@ -58,7 +58,6 @@
|
||||
<dl>
|
||||
<dt><label for="type">{L_BACKUP_TYPE}{L_COLON}</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="type" value="full" id="type" checked="checked" /> {L_FULL_BACKUP}</label>
|
||||
<label><input type="radio" name="type" class="radio" value="structure" /> {L_STRUCTURE_ONLY}</label>
|
||||
<label><input type="radio" class="radio" name="type" value="data" /> {L_DATA_ONLY}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
|
@ -69,20 +69,6 @@ class acp_database
|
||||
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(0);
|
||||
|
||||
@ -92,14 +78,14 @@ class acp_database
|
||||
|
||||
/** @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
|
||||
if ($structure)
|
||||
if ($type == 'full')
|
||||
{
|
||||
$extractor->write_table($table_name);
|
||||
}
|
||||
@ -123,15 +109,11 @@ class acp_database
|
||||
|
||||
default:
|
||||
$extractor->flush('TRUNCATE TABLE ' . $table_name . ";\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Data
|
||||
if ($schema_data)
|
||||
{
|
||||
$extractor->write_data($table_name);
|
||||
}
|
||||
// Only supported types are full and data, therefore always write the data
|
||||
$extractor->write_data($table_name);
|
||||
}
|
||||
|
||||
$extractor->write_end();
|
||||
|
@ -70,7 +70,6 @@ $lang = array_merge($lang, array(
|
||||
'START_RESTORE' => 'Start restore',
|
||||
'STORE_AND_DOWNLOAD' => 'Store and download',
|
||||
'STORE_LOCAL' => 'Store file locally',
|
||||
'STRUCTURE_ONLY' => 'Structure only',
|
||||
|
||||
'TABLE_SELECT' => 'Table select',
|
||||
'TABLE_SELECT_ERROR'=> 'You must select at least one table.',
|
||||
|
Loading…
x
Reference in New Issue
Block a user