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

@@ -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);