do not display Partition maintenance if there are no partitions
This commit is contained in:
@@ -479,6 +479,9 @@ $this_url_params = array_merge($url_params,
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<?php if (PMA_Partition::havePartitioning()) {
|
<?php if (PMA_Partition::havePartitioning()) {
|
||||||
|
$partition_names = PMA_Partition::getPartitionNames($db, $table);
|
||||||
|
// show the Partition maintenance section only if we detect a partition
|
||||||
|
if (! is_null($partition_names[0])) {
|
||||||
?>
|
?>
|
||||||
<div id="div_partition_maintenance">
|
<div id="div_partition_maintenance">
|
||||||
<form method="post" action="tbl_operations.php">
|
<form method="post" action="tbl_operations.php">
|
||||||
@@ -486,24 +489,23 @@ $this_url_params = array_merge($url_params,
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php echo $strPartitionMaintenance; ?></legend>
|
<legend><?php echo $strPartitionMaintenance; ?></legend>
|
||||||
<?php
|
<?php
|
||||||
$partition_names = PMA_Partition::getPartitionNames($db, $table);
|
$html_select = '<select name="partition_name">' . "\n";
|
||||||
$html_select = '<select name="partition_name">' . "\n";
|
foreach($partition_names as $one_partition) {
|
||||||
foreach($partition_names as $one_partition) {
|
$one_partition = htmlspecialchars($one_partition);
|
||||||
$one_partition = htmlspecialchars($one_partition);
|
$html_select .= '<option value="' . $one_partition . '">' . $one_partition . '</option>' . "\n";
|
||||||
$html_select .= '<option value="' . $one_partition . '">' . $one_partition . '</option>' . "\n";
|
}
|
||||||
}
|
$html_select .= '</select>' . "\n";
|
||||||
$html_select .= '</select>' . "\n";
|
printf($GLOBALS['strPartition'], $html_select);
|
||||||
printf($GLOBALS['strPartition'], $html_select);
|
unset($partition_names, $one_partition, $html_select);
|
||||||
unset($partition_names, $one_partition, $html_select);
|
$choices = array(
|
||||||
$choices = array(
|
'ANALYZE' => $strAnalyze,
|
||||||
'ANALYZE' => $strAnalyze,
|
'CHECK' => $strCheck,
|
||||||
'CHECK' => $strCheck,
|
'OPTIMIZE' => $strOptimize,
|
||||||
'OPTIMIZE' => $strOptimize,
|
'REBUILD' => $strRebuild,
|
||||||
'REBUILD' => $strRebuild,
|
'REPAIR' => $strRepair);
|
||||||
'REPAIR' => $strRepair);
|
PMA_generate_html_radio('partition_operation', $choices, '', false);
|
||||||
PMA_generate_html_radio('partition_operation', $choices, '', false);
|
unset($choices);
|
||||||
unset($choices);
|
echo PMA_showMySQLDocu('partitioning_maintenance', 'partitioning_maintenance');
|
||||||
echo PMA_showMySQLDocu('partitioning_maintenance', 'partitioning_maintenance');
|
|
||||||
?>
|
?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="tblFooters">
|
<fieldset class="tblFooters">
|
||||||
@@ -512,6 +514,7 @@ $this_url_params = array_merge($url_params,
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
} // end if
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
// Referential integrity check
|
// Referential integrity check
|
||||||
|
Reference in New Issue
Block a user