Allow browse page to be default (RFE #1228013).

This commit is contained in:
Michal Čihař
2005-11-23 21:30:53 +00:00
parent 280a47fecd
commit adf0c75d55
4 changed files with 14 additions and 6 deletions

View File

@@ -74,6 +74,8 @@ $Source$
* footer.inc.php, server_links.inc.php, css/phpmyadmin.css.php, lang/*, * footer.inc.php, server_links.inc.php, css/phpmyadmin.css.php, lang/*,
libraries/common.lib.php: Add link for duplicating current frameset (RFE libraries/common.lib.php: Add link for duplicating current frameset (RFE
#1165206). #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> 2005-11-22 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* added test/theme.php: for testing themes * added test/theme.php: for testing themes

View File

@@ -1286,8 +1286,8 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON &lt;pma_db&gt;.* TO 'pma'@'localhost';
<dd> <dd>
Defines the tab displayed by default on table view. Possible Defines the tab displayed by default on table view. Possible
values: &quot;tbl_properties_structure.php&quot;, values: &quot;tbl_properties_structure.php&quot;,
&quot;tbl_properties.php&quot;, &quot;tbl_select.php&quot; or &quot;tbl_properties.php&quot;, &quot;tbl_select.php&quot;,
&quot;tbl_change.php&quot;. &quot;tbl_change.php&quot; or &quot;sql.php&quot;.
</dd> </dd>
<dt><b>$cfg['MySQLManualBase']</b> string</dt> <dt><b>$cfg['MySQLManualBase']</b> string</dt>

View File

@@ -233,8 +233,9 @@ $cfg['DefaultTabTable'] = 'tbl_properties_structure.php';
// Possible values: // Possible values:
// 'tbl_properties_structure.php' = fields list // 'tbl_properties_structure.php' = fields list
// 'tbl_properties.php' = sql form // 'tbl_properties.php' = sql form
// 'tbl_select.php = select page // 'tbl_select.php' = select page
// 'tbl_change.php = insert row page // 'tbl_change.php' = insert row page
// 'sql.php' = browse page
/** /**
* Export defaults * Export defaults

View File

@@ -43,8 +43,13 @@ if (isset($fields['dbase'])) {
$db = $fields['dbase']; $db = $fields['dbase'];
} }
// 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 // Now we can check the parameters
PMA_checkParameters(array('sql_query')); PMA_checkParameters(array('sql_query'));
}
// instead of doing the test twice // instead of doing the test twice
$is_drop_database = preg_match('@DROP[[:space:]]+DATABASE[[:space:]]+@i', $sql_query); $is_drop_database = preg_match('@DROP[[:space:]]+DATABASE[[:space:]]+@i', $sql_query);