mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Merge remote-tracking branch 'cs278/ticket/10239' into develop-olympus
* cs278/ticket/10239: [ticket/10239] Correct undefined variable error. [ticket/10239] Add confirm box to backup restore.
This commit is contained in:
commit
fb43029935
2 changed files with 7 additions and 3 deletions
|
@ -221,6 +221,7 @@ class acp_database
|
||||||
case 'submit':
|
case 'submit':
|
||||||
$delete = request_var('delete', '');
|
$delete = request_var('delete', '');
|
||||||
$file = request_var('file', '');
|
$file = request_var('file', '');
|
||||||
|
$download = request_var('download', '');
|
||||||
|
|
||||||
if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
||||||
{
|
{
|
||||||
|
@ -247,10 +248,8 @@ class acp_database
|
||||||
confirm_box(false, $user->lang['DELETE_SELECTED_BACKUP'], build_hidden_fields(array('delete' => $delete, 'file' => $file)));
|
confirm_box(false, $user->lang['DELETE_SELECTED_BACKUP'], build_hidden_fields(array('delete' => $delete, 'file' => $file)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if ($download || confirm_box(true))
|
||||||
{
|
{
|
||||||
$download = request_var('download', '');
|
|
||||||
|
|
||||||
if ($download)
|
if ($download)
|
||||||
{
|
{
|
||||||
$name = $matches[0];
|
$name = $matches[0];
|
||||||
|
@ -411,6 +410,10 @@ class acp_database
|
||||||
trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action));
|
trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if (!$download)
|
||||||
|
{
|
||||||
|
confirm_box(false, $user->lang['RESTORE_SELECTED_BACKUP'], build_hidden_fields(array('file' => $file)));
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$methods = array('sql');
|
$methods = array('sql');
|
||||||
|
|
|
@ -59,6 +59,7 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'RESTORE_FAILURE' => 'The backup file may be corrupt.',
|
'RESTORE_FAILURE' => 'The backup file may be corrupt.',
|
||||||
'RESTORE_OPTIONS' => 'Restore options',
|
'RESTORE_OPTIONS' => 'Restore options',
|
||||||
|
'RESTORE_SELECTED_BACKUP' => 'Are you sure you want to restore the selected backup?',
|
||||||
'RESTORE_SUCCESS' => 'The database has been successfully restored.<br /><br />Your board should be back to the state it was when the backup was made.',
|
'RESTORE_SUCCESS' => 'The database has been successfully restored.<br /><br />Your board should be back to the state it was when the backup was made.',
|
||||||
|
|
||||||
'SELECT_ALL' => 'Select all',
|
'SELECT_ALL' => 'Select all',
|
||||||
|
|
Loading…
Add table
Reference in a new issue