Move variables close to their usage
This commit is contained in:
parent
4961588f7d
commit
8868b48e4c
|
@ -29,10 +29,6 @@ $is_group = count($group) < count($select);
|
||||||
$where = $adminer->selectSearchProcess($fields, $indexes);
|
$where = $adminer->selectSearchProcess($fields, $indexes);
|
||||||
$order = $adminer->selectOrderProcess($fields, $indexes);
|
$order = $adminer->selectOrderProcess($fields, $indexes);
|
||||||
$limit = $adminer->selectLimitProcess();
|
$limit = $adminer->selectLimitProcess();
|
||||||
$from = ($select ? implode(", ", $select) : "*" . ($oid ? ", $oid" : ""))
|
|
||||||
. convert_fields($columns, $fields, $select)
|
|
||||||
. "\nFROM " . table($TABLE);
|
|
||||||
$group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
|
|
||||||
|
|
||||||
if ($_GET["val"] && is_ajax()) {
|
if ($_GET["val"] && is_ajax()) {
|
||||||
header("Content-Type: text/plain; charset=utf-8");
|
header("Content-Type: text/plain; charset=utf-8");
|
||||||
|
@ -76,6 +72,10 @@ if ($_POST && !$error) {
|
||||||
cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"]));
|
cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"]));
|
||||||
dump_headers($TABLE);
|
dump_headers($TABLE);
|
||||||
$adminer->dumpTable($TABLE, "");
|
$adminer->dumpTable($TABLE, "");
|
||||||
|
$from = ($select ? implode(", ", $select) : "*")
|
||||||
|
. convert_fields($columns, $fields, $select)
|
||||||
|
. "\nFROM " . table($TABLE);
|
||||||
|
$group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
|
||||||
if (!is_array($_POST["check"]) || $unselected === array()) {
|
if (!is_array($_POST["check"]) || $unselected === array()) {
|
||||||
$query = "SELECT $from$where_check$group_by";
|
$query = "SELECT $from$where_check$group_by";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue