diff options
author | Michal Čihař <michal@cihar.com> | 2017-04-12 10:00:09 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2017-04-12 10:01:11 +0300 |
commit | dbdd7bcb9db9c7a54221aec6344c8c889768aea6 (patch) | |
tree | ed89486eb485de96d63cf2fa1fd1545f3d3d4c0f /db_operations.php | |
parent | 34795cd7420e02203bfff526c46a5fa0f4baf82a (diff) |
Adds error if copy database name have the same name
Fixes #13099
Fixes #13104
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'db_operations.php')
-rw-r--r-- | db_operations.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/db_operations.php b/db_operations.php index a934fc43aa..e0b2b2425d 100644 --- a/db_operations.php +++ b/db_operations.php @@ -48,6 +48,10 @@ if (strlen($GLOBALS['db']) > 0 if (! isset($_REQUEST['newname']) || strlen($_REQUEST['newname']) === 0) { $message = PMA\libraries\Message::error(__('The database name is empty!')); + } else if($_REQUEST['newname'] === $_REQUEST['db']) { + $message = PMA\libraries\Message::error( + __('Cannot copy database to the same name. Change the name and try again.') + ); } else { $_error = false; if ($move || ! empty($_REQUEST['create_database_before_copying'])) { |