Skip to content

Commit

Permalink
Use $adminer->operators
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Mar 1, 2018
1 parent 4a24ee7 commit 36b75b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adminer/drivers/mongo.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ function sql_query_where_parser($queryWhere) {
}

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)) {
Expand All @@ -528,7 +528,7 @@ function where_to_query($whereAnd = array(), $whereOr = array()) {
$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)) {
Expand Down

0 comments on commit 36b75b4

Please sign in to comment.