mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 16:44:17 +02:00
Remove IS NULL hiding
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@777 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -44,15 +44,6 @@ function form_uncheck(id) {
|
||||
|
||||
|
||||
|
||||
function where_change(op) {
|
||||
for (var i=0; i < op.form.elements.length; i++) {
|
||||
var el = op.form.elements[i];
|
||||
if (el.name == op.name.substr(0, op.name.length - 4) + '[val]') {
|
||||
el.className = (/NULL$/.test(op.options[op.selectedIndex].text) ? 'hidden' : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function select_add_row(field) {
|
||||
var row = field.parentNode.cloneNode(true);
|
||||
var selects = row.getElementsByTagName('select');
|
||||
|
@@ -43,7 +43,7 @@ foreach ((array) $_GET["where"] as $val) {
|
||||
$where[] = "MATCH (" . idf_escape($val["col"]) . ") AGAINST (" . $dbh->quote($val["val"]) . " IN BOOLEAN MODE)";
|
||||
} else {
|
||||
$in = process_length($val["val"]);
|
||||
$cond = " $val[op]" . (ereg('NULL$', $val["op"]) ? "" : (ereg('IN$', $val["op"]) ? " (" . (strlen($in) ? $in : "NULL") . ")" : " " . $dbh->quote($val["val"]))); //! this searches in numeric values too
|
||||
$cond = " $val[op]" . (ereg('NULL$', $val["op"]) ? "" : (ereg('IN$', $val["op"]) ? " (" . (strlen($in) ? $in : "NULL") . ")" : " " . $dbh->quote($val["val"])));
|
||||
if (strlen($val["col"])) {
|
||||
$where[] = idf_escape($val["col"]) . $cond;
|
||||
} else {
|
||||
@@ -189,13 +189,13 @@ if (!$columns) {
|
||||
foreach ((array) $_GET["where"] as $val) {
|
||||
if (strlen("$val[col]$val[val]") && in_array($val["op"], $operators)) {
|
||||
echo "<div><select name='where[$i][col]'><option value=''>" . lang('(anywhere)') . "</option>" . optionlist($columns, $val["col"]) . "</select>";
|
||||
echo "<select name='where[$i][op]' onchange='where_change(this);'>" . optionlist($operators, $val["op"]) . "</select>";
|
||||
echo "<input name='where[$i][val]' value=\"" . htmlspecialchars($val["val"]) . '"' . (ereg('NULL$', $val["op"]) ? " class='hidden'" : "") . " /></div>\n";
|
||||
echo "<select name='where[$i][op]'>" . optionlist($operators, $val["op"]) . "</select>";
|
||||
echo "<input name='where[$i][val]' value=\"" . htmlspecialchars($val["val"]) . "\" /></div>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
echo "<div><select name='where[$i][col]' onchange='select_add_row(this);'><option value=''>" . lang('(anywhere)') . "</option>" . optionlist($columns) . "</select>";
|
||||
echo "<select name='where[$i][op]' onchange='where_change(this);'>" . optionlist($operators) . "</select>";
|
||||
echo "<select name='where[$i][op]'>" . optionlist($operators) . "</select>";
|
||||
echo "<input name='where[$i][val]' /></div>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
|
||||
|
Reference in New Issue
Block a user