Compare commits
2 Commits
fa1b8d5c94
...
6c062ad532
Author | SHA1 | Date | |
---|---|---|---|
6c062ad532 | |||
cc1dc7a822 |
@@ -85,13 +85,12 @@ if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_
|
|||||||
$tabs['operation']['link'] = 'tbl_operations.php';
|
$tabs['operation']['link'] = 'tbl_operations.php';
|
||||||
$tabs['operation']['text'] = __('Operations');
|
$tabs['operation']['text'] = __('Operations');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(PMA_Tracker::isActive()) {
|
if(PMA_Tracker::isActive()) {
|
||||||
$tabs['tracking']['icon'] = 'eye.png';
|
$tabs['tracking']['icon'] = 'eye.png';
|
||||||
$tabs['tracking']['text'] = __('Tracking');
|
$tabs['tracking']['text'] = __('Tracking');
|
||||||
$tabs['tracking']['link'] = 'tbl_tracking.php';
|
$tabs['tracking']['link'] = 'tbl_tracking.php';
|
||||||
}
|
}
|
||||||
if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_schema)) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Views support a limited number of operations
|
* Views support a limited number of operations
|
||||||
@@ -102,6 +101,35 @@ if ($tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_sc
|
|||||||
$tabs['operation']['text'] = __('Operations');
|
$tabs['operation']['text'] = __('Operations');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_schema)) {
|
||||||
|
$tabs['empty']['link'] = 'sql.php';
|
||||||
|
$tabs['empty']['args']['reload'] = 1;
|
||||||
|
$tabs['empty']['args']['sql_query'] = 'TRUNCATE TABLE ' . PMA_backquote($table);
|
||||||
|
$tabs['empty']['args']['zero_rows'] = sprintf(__('Table %s has been emptied'), htmlspecialchars($table));
|
||||||
|
$tabs['empty']['attr'] = 'onclick="return confirmLink(this, \'TRUNCATE TABLE ' . PMA_jsFormat($table) . '\')"';
|
||||||
|
$tabs['empty']['args']['goto'] = 'tbl_structure.php';
|
||||||
|
$tabs['empty']['class'] = 'caution';
|
||||||
|
$tabs['empty']['icon'] = 'b_empty.png';
|
||||||
|
$tabs['empty']['text'] = __('Empty');
|
||||||
|
if ($table_info_num_rows == 0) {
|
||||||
|
$tabs['empty']['warning'] = __('Table seems to be empty!');
|
||||||
|
}
|
||||||
|
|
||||||
|
$tabs['drop']['icon'] = 'b_deltbl.png';
|
||||||
|
$tabs['drop']['link'] = 'sql.php';
|
||||||
|
$tabs['drop']['url_params'] = array('table' => NULL);
|
||||||
|
$tabs['drop']['text'] = __('Drop');
|
||||||
|
$tabs['drop']['args']['reload'] = 1;
|
||||||
|
$tabs['drop']['args']['purge'] = 1;
|
||||||
|
$drop_command = 'DROP ' . ($tbl_is_view ? 'VIEW' : 'TABLE');
|
||||||
|
$tabs['drop']['args']['sql_query'] = $drop_command . ' ' . PMA_backquote($table);
|
||||||
|
$tabs['drop']['args']['goto'] = 'db_structure.php';
|
||||||
|
$tabs['drop']['args']['zero_rows'] = sprintf(($tbl_is_view ? __('View %s has been dropped') : __('Table %s has been dropped')), htmlspecialchars($table));
|
||||||
|
$tabs['drop']['attr'] = 'onclick="return confirmLink(this, \'' . $drop_command . ' ' . PMA_jsFormat($table) . '\')"';
|
||||||
|
unset($drop_command);
|
||||||
|
$tabs['drop']['class'] = 'caution';
|
||||||
|
}
|
||||||
|
|
||||||
if ($table_info_num_rows == 0 && !$tbl_is_view) {
|
if ($table_info_num_rows == 0 && !$tbl_is_view) {
|
||||||
$tabs['browse']['warning'] = __('Table seems to be empty!');
|
$tabs['browse']['warning'] = __('Table seems to be empty!');
|
||||||
$tabs['search']['warning'] = __('Table seems to be empty!');
|
$tabs['search']['warning'] = __('Table seems to be empty!');
|
||||||
|
@@ -429,10 +429,10 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
|
|||||||
'geometry', 'point', 'linestring', 'polygon', 'multipoint',
|
'geometry', 'point', 'linestring', 'polygon', 'multipoint',
|
||||||
'multilinestring', 'multipolygon', 'geomtrycollection'
|
'multilinestring', 'multipolygon', 'geomtrycollection'
|
||||||
);
|
);
|
||||||
if (! in_array($type, $spatial_types) || 'MYISAM' != $tbl_type) {
|
if (in_array($type, $spatial_types) && ($tbl_type == 'MYISAM' || $tbl_type == 'ARIA' || $tbl_type == 'MARIA')) {
|
||||||
$spatial_enabled = false;
|
|
||||||
} else {
|
|
||||||
$spatial_enabled = true;
|
$spatial_enabled = true;
|
||||||
|
} else {
|
||||||
|
$spatial_enabled = false;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a <?php echo $spatial_enabled ? '' : ' class="disabled"'; ?>href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD SPATIAL(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
|
<a <?php echo $spatial_enabled ? '' : ' class="disabled"'; ?>href="sql.php?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD SPATIAL(' . PMA_backquote($row['Field']) . ')'); ?>&message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">
|
||||||
|
Reference in New Issue
Block a user