Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hideableColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function head()

?>

<script <?php echo nonce()?> type='text/javascript'>
<script <?php echo Adminer\nonce()?> type='text/javascript'>

//make columns hideable
function makeColumnsHideable()
Expand Down
10 changes: 5 additions & 5 deletions searchAutocomplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function headers()
$prefix = "";
$cond = " $val[op]";
if (preg_match('~IN$~', $val["op"])) {
$in = process_length($val["val"]);
$in = Adminer\process_length($val["val"]);
$cond .= " " . ($in != "" ? $in : "(NULL)");
} elseif ($val["op"] == "SQL") {
$cond = " $val[val]"; // SQL injection
Expand All @@ -62,14 +62,14 @@ public function headers()
} elseif ($val["op"] == "ILIKE %%") {
$cond = " ILIKE " . $adminer->processInput($fields[$val["col"]], "%$val[val]%");
} elseif ($val["op"] == "FIND_IN_SET") {
$prefix = "$val[op](" . q($val["val"]) . ", ";
$prefix = "$val[op](" . Adminer\q($val["val"]) . ", ";
$cond = ")";
} elseif (!preg_match('~NULL$~', $val["op"])) {
$cond .= " " . $adminer->processInput($fields[$val["col"]], $val["val"]);
}

$Min_SQL=new Min_SQL(null );
$where[] = $prefix . $Min_SQL->convertSearch(idf_escape($val["col"]), $val, $fields[$val["col"]]) . $cond;
$where[] = $prefix . $Min_SQL->convertSearch(Adminer\idf_escape($val["col"]), $val, $fields[$val["col"]]) . $cond;
}

//this will likely not use any indexes.
Expand All @@ -81,7 +81,7 @@ public function headers()
//to order even text-columns naturally, use this ugly hack, this is tested in MySQL only. Sorry.
$orderSQLforNaturalSort="`$column`+0<>0 DESC, `$column`+0, `$column`";
//deliver json
echo json_encode(get_vals("SELECT DISTINCT `$column` FROM `$table` $whereSQL ORDER BY $orderSQLforNaturalSort"));
echo json_encode(Adminer\get_vals("SELECT DISTINCT `$column` FROM `$table` $whereSQL ORDER BY $orderSQLforNaturalSort"));
//stop delivering anything...
die();
}
Expand All @@ -94,7 +94,7 @@ public function head()
if(!isset($_GET["select"]))
return;
?>
<script <?php echo nonce()?> type='text/javascript'>
<script <?php echo Adminer\nonce()?> type='text/javascript'>
//prepare autocomplete searchFields on page load
document.addEventListener('DOMContentLoaded', function()
{
Expand Down
2 changes: 1 addition & 1 deletion stickyColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function head()

?>

<script <?php echo nonce()?> type='text/javascript'>
<script <?php echo Adminer\nonce()?> type='text/javascript'>
//make column headers of table sticky on the left and right.
//Due to lack of any ID in thead, this has to be done in JS
function makeColumnHeadersSticky()
Expand Down