aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2011-09-21 21:19:37 +0100
committerChris Smith <toonarmy@phpbb.com>2011-09-21 21:19:37 +0100
commita1febdd4290cf2b5aabf5fe6b656da1b3ad4f4c9 (patch)
treedf71dc56529fd1dbf112d4e6d2a494c739a7ae27
parentabc0c336af4ace1f836cce107fcb307fa32e182c (diff)
downloadforums-a1febdd4290cf2b5aabf5fe6b656da1b3ad4f4c9.tar
forums-a1febdd4290cf2b5aabf5fe6b656da1b3ad4f4c9.tar.gz
forums-a1febdd4290cf2b5aabf5fe6b656da1b3ad4f4c9.tar.bz2
forums-a1febdd4290cf2b5aabf5fe6b656da1b3ad4f4c9.tar.xz
forums-a1febdd4290cf2b5aabf5fe6b656da1b3ad4f4c9.zip
[ticket/10239] Add confirm box to backup restore.
PHPBB3-10239
-rw-r--r--phpBB/includes/acp/acp_database.php6
-rw-r--r--phpBB/language/en/acp/database.php1
2 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 193dd001c0..1bf10b0e57 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -247,7 +247,7 @@ 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', '');
@@ -411,6 +411,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 ae8f76d6b7..9c8ecbf13a 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',