Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-09-03 19:32:15 +02:00
commit 873f2f93cf
2 changed files with 5 additions and 5 deletions

View File

@ -21,9 +21,9 @@ $server_master_replication = $GLOBALS['dbi']->fetchResult('SHOW MASTER STATUS');
$server_slave_multi_replication = $GLOBALS['dbi']->fetchResult('SHOW ALL SLAVES STATUS');
/**
* set slave selected server
* set selected master server
*/
if ($server_slave_multi_replication && $_REQUEST['master_connection']) {
if ($server_slave_multi_replication && !empty($_REQUEST['master_connection'])) {
$GLOBALS['dbi']->query("SET @@default_master_connection = '" . PMA_Util::sqlAddSlashes($_REQUEST['master_connection']) . "'");
$GLOBALS['url_params']['master_connection'] = $_REQUEST['master_connection'];
}

View File

@ -142,12 +142,12 @@ function PMA_getHtmlForSlaveConfiguration(
if ($GLOBALS['server_slave_multi_replication']) {
$html .= __('Master connection:');
$html .= '<form method="get" action="server_replication.php">';
$html .= PMA_URL_getHiddenInputs($url_params);
$html .= PMA_URL_getHiddenInputs($GLOBALS['url_params']);
$html .= ' <select name="master_connection">';
$html .= '<option value="">' . __('Default') . '</option>';
foreach ($GLOBALS['server_slave_multi_replication'] as $server) {
$html .= '<option' . ($server['Connection_name'] == $_REQUEST['master_connection'] ? ' selected="selected"' : '') . '>' .
$server['Connection_name'] . '</option>';
$html .= '<option' . (isset($_REQUEST['master_connection']) && $_REQUEST['master_connection'] == $server['Connection_name'] ?
' selected="selected"' : '') . '>' . $server['Connection_name'] . '</option>';
}
$html .= '</select>';
$html .= ' <input type="submit" value="' . __('Go') . '" id="goButton" />';