*/
if (isset($_REQUEST['set_col_prefs']) && $_REQUEST['set_col_prefs'] == true) {
PMA_setColumnOrderOrVisibility($table, $db);
// script has exited at this point
}
// Default to browse if no query set and we have table
// (needed for browsing from DefaultTabTable)
$tableLength = mb_strlen($table);
$dbLength = mb_strlen($db);
if (empty($sql_query) && $tableLength && $dbLength) {
$sql_query = PMA_getDefaultSqlQueryForBrowse($db, $table);
// set $goto to what will be displayed if query returns 0 rows
$goto = '';
} else {
// Now we can check the parameters
Util::checkParameters(array('sql_query'));
}
/**
* Parse and analyze the query
*/
require_once 'libraries/parse_analyze.lib.php';
list($analyzed_sql_results, $db, $table) = PMA_parseAnalyze($sql_query, $db);
// @todo: possibly refactor
extract($analyzed_sql_results);
/**
* Check rights in case of DROP DATABASE
*
* This test may be bypassed if $is_js_confirmed = 1 (already checked with js)
* but since a malicious user may pass this variable by url/form, we don't take
* into account this case.
*/