]> git.joonet.de Git - adminer.git/commitdiff
Remove IS NULL hiding
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 2 Jul 2009 21:30:25 +0000 (21:30 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 2 Jul 2009 21:30:25 +0000 (21:30 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@777 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/functions.js
adminer/select.inc.php

index 164797c7b0b981f008401cd37c536b12ea445f32..f7e6980e277c71185870a034c5180cf0c6a8301e 100644 (file)
@@ -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');
index d1c90cf8e2744fdf4aa7c1d4c876033391774cb9..e54b4f28cb20fea2dc79371c6f4ec2c0fe9abc3c 100644 (file)
@@ -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";