]> git.joonet.de Git - adminer.git/commitdiff
Use $adminer->operators
authorJakub Vrana <jakub@vrana.cz>
Thu, 1 Mar 2018 10:28:53 +0000 (11:28 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 1 Mar 2018 10:29:04 +0000 (11:29 +0100)
adminer/drivers/mongo.inc.php

index c96ef47d5f444bced335033bfce72010a766b85c..605deec8f0e36cbd64b0ccb09f2d457cc140dac1 100644 (file)
@@ -516,7 +516,7 @@ if (isset($_GET["mongo"])) {
                }
 
                function where_to_query($whereAnd = array(), $whereOr = array()) {
-                       global $operators;
+                       global $adminer;
                        $data = array();
                        foreach (array('and' => $whereAnd, 'or' => $whereOr) as $type => $where) {
                                if (is_array($where)) {
@@ -528,7 +528,7 @@ if (isset($_GET["mongo"])) {
                                                        $class = 'MongoDB\BSON\ObjectID';
                                                        $val = new $class($val);
                                                }
-                                               if (!in_array($op, $operators)) {
+                                               if (!in_array($op, $adminer->operators)) {
                                                        continue;
                                                }
                                                if (preg_match('~^\(f\)(.+)~', $op, $match)) {