diff --git a/libraries/replication.inc.php b/libraries/replication.inc.php index cfaf0a6207..834d38ab2f 100644 --- a/libraries/replication.inc.php +++ b/libraries/replication.inc.php @@ -78,7 +78,7 @@ $slave_variables = array( * define important variables, which need to be watched for * correct running of replication in slave mode * - * @usedby PMA_replication_print_status_table() + * @usedby PMA_getHtmlForReplicationStatusTable() */ // TODO change to regexp or something, to allow for negative match. // To e.g. highlight 'Last_Error' diff --git a/libraries/replication_gui.lib.php b/libraries/replication_gui.lib.php index 720751ebdc..392e1b8f16 100644 --- a/libraries/replication_gui.lib.php +++ b/libraries/replication_gui.lib.php @@ -9,14 +9,299 @@ if (! defined('PHPMYADMIN')) { } /** - * returns code for selecting databases + * returns HTML for error message * * @return String HTML code */ -function PMA_replication_db_multibox() +function PMA_getHtmlForErrorMessage() +{ + $html = ''; + if (isset($_SESSION['replication']['sr_action_status']) + && isset($_SESSION['replication']['sr_action_info']) + ) { + if ($_SESSION['replication']['sr_action_status'] == 'error') { + $error_message = $_SESSION['replication']['sr_action_info']; + $html .= PMA_Message::error($error_message)->getDisplay(); + $_SESSION['replication']['sr_action_status'] = 'unknown'; + } elseif ($_SESSION['replication']['sr_action_status'] == 'success') { + $success_message = $_SESSION['replication']['sr_action_info']; + $html .= PMA_Message::success($success_message)->getDisplay(); + $_SESSION['replication']['sr_action_status'] = 'unknown'; + } + } + return $html; +} + +/** + * returns HTML for master replication + * + * @return String HTML code + */ +function PMA_getHtmlForMasterReplication() +{ + $html = ''; + if (! isset($_REQUEST['repl_clear_scr'])) { + $html .= '
"; + } + + return $html; +} + +/** + * returns HTML for master replication configuration + * + * @return String HTML code + */ +function PMA_getHtmlForMasterConfiguration() +{ + $html = ''; + $html .= ''; + + return $html; +} + +/** + * returns HTML for slave replication configuration + * + * @param bool $server_slave_status Whether it is Master or Slave + * @param Array $server_slave_replication Slave replication + * + * @return String HTML code + */ +function PMA_getHtmlForSlaveConfiguration($server_slave_status, $server_slave_replication) +{ + $html = ''; + + return $html; +} + +/** + * returns HTML for Slave Error Management + * + * @param String $slave_skip_error_link error link + * + * @return String HTML code + */ +function PMA_getHtmlForSlaveErrorManagement($slave_skip_error_link) +{ + $html = ''; + $html .= __('Error management:') . ''; + $html .= ' '; + return $html; +} + +/** + * returns HTML for not configure for a server replication + * + * @return String HTML code + */ +function PMA_getHtmlForNotServerReplication() +{ + $_url_params = $GLOBALS['url_params']; + $_url_params['mr_configure'] = true; + + $html = ''; + return $html; +} + +/** + * returns HTML code for selecting databases + * + * @return String HTML code + */ +function PMA_getHtmlForReplicationDbMultibox() { $multi_values = ''; - $multi_values .= '