diff options
author | Dirk-jan <dirkjan@sanoweb.nl> | 2013-03-13 16:28:36 +0400 |
---|---|---|
committer | Dirk-jan <dirkjan@sanoweb.nl> | 2013-03-13 16:28:36 +0400 |
commit | eae3a030f79e23430700dbb5f8d36003d0233d53 (patch) | |
tree | b1275eee9c755c1d42c1afcf553b43e4cda60d28 /js/replication.js | |
parent | 3ff03706e1eb51aed23106ac8995530538c0e163 (diff) |
Fix replication pages to use correct mysql config syntax
Diffstat (limited to 'js/replication.js')
-rw-r--r-- | js/replication.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/js/replication.js b/js/replication.js index a3c877eb6a..820213e84d 100644 --- a/js/replication.js +++ b/js/replication.js @@ -5,23 +5,26 @@ */ var random_server_id = Math.floor(Math.random() * 10000000); -var conf_prefix = "server-id=" + random_server_id + "\nlog-bin=mysql-bin\nlog-error=mysql-bin.err\n"; +var conf_prefix = "server-id=" + random_server_id + "\nlog_bin=mysql-bin\nlog_error=mysql-bin.err\n"; function update_config() { var conf_ignore = "binlog_ignore_db="; var conf_do = "binlog_do_db="; - var database_list = $('#db_select option:selected:first').val(); - $('#db_select option:selected:not(:first)').each(function() { - database_list += ',' + $(this).val(); - }); + var database_list = ''; if ($('#db_select option:selected').size() == 0) { $('#rep').text(conf_prefix); } else if ($('#db_type option:selected').val() == 'all') { - $('#rep').text(conf_prefix + conf_ignore + database_list); + $('#db_select option:selected').each(function() { + database_list += conf_ignore + $(this).val() + "\n"; + }); + $('#rep').text(conf_prefix + database_list); } else { - $('#rep').text(conf_prefix + conf_do + database_list); + $('#db_select option:selected').each(function() { + database_list += conf_do + $(this).val() + "\n"; + }); + $('#rep').text(conf_prefix + database_list); } } |