From 4af9cd152ba7d939d261f526106d027b94670034 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 4 Oct 2009 10:34:11 +0000 Subject: [PATCH] Using the synchronize databases button did not work when one of the servers was not remote --- server_synchronize.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server_synchronize.php b/server_synchronize.php index c9330ca21..514966b0d 100644 --- a/server_synchronize.php +++ b/server_synchronize.php @@ -1085,8 +1085,16 @@ if (isset($_REQUEST['synchronize_db'])) { /** * connecting the source and target servers */ - $src_link = PMA_DBI_connect($src_username, $src_password, $is_controluser = false); - $trg_link = PMA_DBI_connect($trg_username, $trg_password, $is_controluser = false); + if ('rmt' == $_SESSION['src_type']) { + $src_link = PMA_DBI_connect($src_username, $src_password, $is_controluser = false, $_SESSION['src_server']); + } else { + $src_link = $GLOBALS['userlink']; + } + if ('rmt' == $_SESSION['trg_type']) { + $trg_link = PMA_DBI_connect($trg_username, $trg_password, $is_controluser = false, $_SESSION['trg_server']); + } else { + $trg_link = $GLOBALS['userlink']; + } /** * Displaying the queries.