Allow browse page to be default (RFE #1228013).
This commit is contained in:
@@ -74,6 +74,8 @@ $Source$
|
||||
* footer.inc.php, server_links.inc.php, css/phpmyadmin.css.php, lang/*,
|
||||
libraries/common.lib.php: Add link for duplicating current frameset (RFE
|
||||
#1165206).
|
||||
* config.default.php, sql.php, Documentation.html: Allow browse page to be
|
||||
default (RFE #1228013).
|
||||
|
||||
2005-11-22 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||
* added test/theme.php: for testing themes
|
||||
|
@@ -1286,8 +1286,8 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
|
||||
<dd>
|
||||
Defines the tab displayed by default on table view. Possible
|
||||
values: "tbl_properties_structure.php",
|
||||
"tbl_properties.php", "tbl_select.php" or
|
||||
"tbl_change.php".
|
||||
"tbl_properties.php", "tbl_select.php",
|
||||
"tbl_change.php" or "sql.php".
|
||||
</dd>
|
||||
|
||||
<dt><b>$cfg['MySQLManualBase']</b> string</dt>
|
||||
|
@@ -233,8 +233,9 @@ $cfg['DefaultTabTable'] = 'tbl_properties_structure.php';
|
||||
// Possible values:
|
||||
// 'tbl_properties_structure.php' = fields list
|
||||
// 'tbl_properties.php' = sql form
|
||||
// 'tbl_select.php = select page
|
||||
// 'tbl_change.php = insert row page
|
||||
// 'tbl_select.php' = select page
|
||||
// 'tbl_change.php' = insert row page
|
||||
// 'sql.php' = browse page
|
||||
|
||||
/**
|
||||
* Export defaults
|
||||
|
9
sql.php
9
sql.php
@@ -43,8 +43,13 @@ if (isset($fields['dbase'])) {
|
||||
$db = $fields['dbase'];
|
||||
}
|
||||
|
||||
// Now we can check the parameters
|
||||
PMA_checkParameters(array('sql_query'));
|
||||
// Default to browse if no query set an we have table (needed for browsing from DefaultTabTable)
|
||||
if (!isset($sql_query) && isset($table) && isset($db)) {
|
||||
$sql_query = 'SELECT * FROM ' . PMA_backquote($table);
|
||||
} else {
|
||||
// Now we can check the parameters
|
||||
PMA_checkParameters(array('sql_query'));
|
||||
}
|
||||
|
||||
// instead of doing the test twice
|
||||
$is_drop_database = preg_match('@DROP[[:space:]]+DATABASE[[:space:]]+@i', $sql_query);
|
||||
|
Reference in New Issue
Block a user