diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php index ec057b30eb..7bdae177ae 100644 --- a/libraries/operations.lib.php +++ b/libraries/operations.lib.php @@ -1233,6 +1233,60 @@ function PMA_getHtmlForDeleteDataOrTable( return $html_output; } - +function PMA_getHtmlForPartitionMaintenance($partition_names, $url_params) +{ + $common_functions = PMA_CommonFunctions::getInstance(); + + $choices = array( + 'ANALYZE' => __('Analyze'), + 'CHECK' => __('Check'), + 'OPTIMIZE' => __('Optimize'), + 'REBUILD' => __('Rebuild'), + 'REPAIR' => __('Repair') + ); + + $html_output = '
' + . '
' + . PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']) + . '
' + . '' . __('Partition maintenance') . ''; + + $html_select = '' . "\n"; + $html_output .= sprintf(__('Partition %s'), $html_select); + + $html_output .= $common_functions->getRadioFields( + 'partition_operation', $choices, '', false + ); + $html_output .= $common_functions->showMySQLDocu( + 'partitioning_maintenance', + 'partitioning_maintenance' + ); + $this_url_params = array_merge( + $url_params, + array( + 'sql_query' => 'ALTER TABLE ' + . $common_functions->backquote($GLOBALS['table']) + . ' REMOVE PARTITIONING;' + ) + ); + $html_output .= '
' + . __('Remove partitioning') . ''; + + $html_output .= '
' + . '
' + . '' + . '
' + . '
' + . '
'; + + return $html_output; +} ?> diff --git a/tbl_operations.php b/tbl_operations.php index 44c387bcfb..9783f8c155 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -364,56 +364,14 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) { } echo '
'; - -?> - -
-
- -
- -' . "\n"; - foreach ($partition_names as $one_partition) { - $one_partition = htmlspecialchars($one_partition); - $html_select .= '' . "\n"; - } - $html_select .= '' . "\n"; - printf(__('Partition %s'), $html_select); - unset($partition_names, $one_partition, $html_select); - $choices = array( - 'ANALYZE' => __('Analyze'), - 'CHECK' => __('Check'), - 'OPTIMIZE' => __('Optimize'), - 'REBUILD' => __('Rebuild'), - 'REPAIR' => __('Repair')); - echo $common_functions->getRadioFields('partition_operation', $choices, '', false); - unset($choices); - echo $common_functions->showMySQLDocu('partitioning_maintenance', 'partitioning_maintenance'); - // I'm not sure of the best way to display that; this link does - // not depend on the Go button - $this_url_params = array_merge( - $url_params, - array( - 'sql_query' => 'ALTER TABLE ' . $common_functions->backquote($GLOBALS['table']) . ' REMOVE PARTITIONING;' - ) - ); -?> -
- -
-
- -
-
-
-