- no drop, empty, operation, insert, import for information_schema tables
- enabled export for views
This commit is contained in:
@@ -18,6 +18,10 @@ $Source$
|
||||
- always display db stats for MySQL 5
|
||||
- fixed html output
|
||||
- replaced " with ' in some queries
|
||||
* tbl_properties_structure.php, tbl_properties_common.php
|
||||
tbl_properties_links.php:
|
||||
- no drop, empty, operation, insert, import for information_schema tables
|
||||
- enabled export for views
|
||||
|
||||
2005-11-04 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/spanish: Updated, thanks to Daniel Hinostroza (hinostroza)
|
||||
|
@@ -6,13 +6,18 @@
|
||||
/**
|
||||
* Gets some core libraries
|
||||
*/
|
||||
require_once('./libraries/grab_globals.lib.php');
|
||||
require_once('./libraries/common.lib.php');
|
||||
require_once('./libraries/bookmark.lib.php');
|
||||
|
||||
// Check parameters
|
||||
PMA_checkParameters(array('db','table'));
|
||||
|
||||
if ( PMA_MYSQL_INT_VERSION >= 50002 && $db === 'information_schema' ) {
|
||||
$db_is_information_schema = true;
|
||||
} else {
|
||||
$db_is_information_schema = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the urls to return to in case of error in a sql statement
|
||||
*/
|
||||
|
@@ -34,19 +34,22 @@ $tabs['sql']['text'] = $strSQL;
|
||||
$tabs['search']['icon'] = 'b_search.png';
|
||||
$tabs['search']['text'] = $strSearch;
|
||||
|
||||
$tabs['insert']['icon'] = 'b_insrow.png';
|
||||
$tabs['insert']['link'] = 'tbl_change.php';
|
||||
$tabs['insert']['text'] = $strInsert;
|
||||
if ( ! $db_is_information_schema ) {
|
||||
$tabs['insert']['icon'] = 'b_insrow.png';
|
||||
$tabs['insert']['link'] = 'tbl_change.php';
|
||||
$tabs['insert']['text'] = $strInsert;
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't display "Export", "Import", "Operations" and "Empty" for views.
|
||||
*/
|
||||
if (!$tbl_is_view) {
|
||||
$tabs['export']['icon'] = 'b_tblexport.png';
|
||||
$tabs['export']['link'] = 'tbl_properties_export.php';
|
||||
$tabs['export']['args']['single_table'] = 'true';
|
||||
$tabs['export']['text'] = $strExport;
|
||||
$tabs['export']['icon'] = 'b_tblexport.png';
|
||||
$tabs['export']['link'] = 'tbl_properties_export.php';
|
||||
$tabs['export']['args']['single_table'] = 'true';
|
||||
$tabs['export']['text'] = $strExport;
|
||||
|
||||
/**
|
||||
* Don't display , "Import", "Operations" and "Empty"
|
||||
* for views and information_schema
|
||||
*/
|
||||
if ( ! $tbl_is_view && ! $db_is_information_schema ) {
|
||||
$tabs['import']['icon'] = 'b_tblimport.png';
|
||||
$tabs['import']['link'] = 'tbl_import.php';
|
||||
$tabs['import']['text'] = $strImport;
|
||||
@@ -69,18 +72,24 @@ if (!$tbl_is_view) {
|
||||
$tabs['empty']['icon'] = 'b_empty.png';
|
||||
$tabs['empty']['text'] = $strEmpty;
|
||||
}
|
||||
$tabs['drop']['icon'] = 'b_deltbl.png';
|
||||
$tabs['drop']['link'] = 'sql.php';
|
||||
$tabs['drop']['text'] = $strDrop;
|
||||
$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_details_structure.php';
|
||||
$tabs['drop']['args']['zero_rows'] = sprintf(($tbl_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped), htmlspecialchars($table));
|
||||
$tabs['drop']['attr'] = 'onclick="return confirmLink(this, \'' . $drop_command . ' ' . PMA_jsFormat($table) . '\')"';
|
||||
unset($drop_command);
|
||||
$tabs['drop']['class'] = 'caution';
|
||||
|
||||
/**
|
||||
* no drop in information_schema
|
||||
*/
|
||||
if ( ! $db_is_information_schema ) {
|
||||
$tabs['drop']['icon'] = 'b_deltbl.png';
|
||||
$tabs['drop']['link'] = 'sql.php';
|
||||
$tabs['drop']['text'] = $strDrop;
|
||||
$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_details_structure.php';
|
||||
$tabs['drop']['args']['zero_rows'] = sprintf(($tbl_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped), 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) {
|
||||
$tabs['browse']['link'] = 'sql.php';
|
||||
|
@@ -2,7 +2,6 @@
|
||||
/* $Id$ */
|
||||
// vim: expandtab sw=4 ts=4 sts=4:
|
||||
|
||||
require_once('./libraries/grab_globals.lib.php');
|
||||
require_once('./libraries/common.lib.php');
|
||||
require_once('./libraries/mysql_charsets.lib.php');
|
||||
|
||||
@@ -149,12 +148,6 @@ if ( $cfg['PropertiesIconic'] == true ) {
|
||||
$titles['Browse'] = $strBrowse;
|
||||
}
|
||||
|
||||
if ( PMA_MYSQL_INT_VERSION >= 50002 && $db === 'information_schema' ) {
|
||||
$db_is_information_schema = true;
|
||||
} else {
|
||||
$db_is_information_schema = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the table structure ('show table' works correct since 3.23.03)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user