diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-11-19 21:54:20 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-11-19 21:54:20 -0500 |
commit | f33dcacabef1ceb461a7bc2783a3300dc066b4f4 (patch) | |
tree | 2df642536f6b5f1e8efae7156e1eb6dcecded729 | |
parent | f5b009158c08776b5c9dc8d43b4fcc1fc1b820e7 (diff) | |
parent | fb430299356a027686a3216ba4974b955f3701ae (diff) | |
download | forums-f33dcacabef1ceb461a7bc2783a3300dc066b4f4.tar forums-f33dcacabef1ceb461a7bc2783a3300dc066b4f4.tar.gz forums-f33dcacabef1ceb461a7bc2783a3300dc066b4f4.tar.bz2 forums-f33dcacabef1ceb461a7bc2783a3300dc066b4f4.tar.xz forums-f33dcacabef1ceb461a7bc2783a3300dc066b4f4.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10239] Correct undefined variable error.
[ticket/10239] Add confirm box to backup restore.
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 9 | ||||
-rw-r--r-- | phpBB/language/en/acp/database.php | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index 632578ef2d..38d4d3c8e4 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -221,6 +221,7 @@ class acp_database case 'submit': $delete = request_var('delete', ''); $file = request_var('file', ''); + $download = request_var('download', ''); 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))); } } - else + else if ($download || confirm_box(true)) { - $download = request_var('download', ''); - if ($download) { $name = $matches[0]; @@ -411,6 +410,10 @@ class acp_database trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action)); break; } + else if (!$download) + { + confirm_box(false, $user->lang['RESTORE_SELECTED_BACKUP'], build_hidden_fields(array('file' => $file))); + } default: $methods = array('sql'); diff --git a/phpBB/language/en/acp/database.php b/phpBB/language/en/acp/database.php index 1854e009b4..2f9431462b 100644 --- a/phpBB/language/en/acp/database.php +++ b/phpBB/language/en/acp/database.php @@ -59,6 +59,7 @@ $lang = array_merge($lang, array( 'RESTORE_FAILURE' => 'The backup file may be corrupt.', '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.', 'SELECT_ALL' => 'Select all', |