Commit 58bfec39 authored by alexpott's avatar alexpott
Browse files

Issue #1964046 by chx: Fixed Misleading variable name in Combine filter.

parent 58cc7dca
......@@ -92,48 +92,48 @@ public function query() {
// By default things like op_equal uses add_where, that doesn't support
// complex expressions, so override all operators.
function op_equal($field) {
function op_equal($expression) {
$placeholder = $this->placeholder();
$operator = $this->operator();
$this->query->add_where_expression($this->options['group'], "$field $operator $placeholder", array($placeholder => $this->value));
$this->query->add_where_expression($this->options['group'], "$expression $operator $placeholder", array($placeholder => $this->value));
}
function op_contains($field) {
function op_contains($expression) {
$placeholder = $this->placeholder();
$this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => '%' . db_like($this->value) . '%'));
$this->query->add_where_expression($this->options['group'], "$expression LIKE $placeholder", array($placeholder => '%' . db_like($this->value) . '%'));
}
function op_starts($field) {
function op_starts($expression) {
$placeholder = $this->placeholder();
$this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => db_like($this->value) . '%'));
$this->query->add_where_expression($this->options['group'], "$expression LIKE $placeholder", array($placeholder => db_like($this->value) . '%'));
}
function op_not_starts($field) {
function op_not_starts($expression) {
$placeholder = $this->placeholder();
$this->query->add_where_expression($this->options['group'], "$field NOT LIKE $placeholder", array($placeholder => db_like($this->value) . '%'));
$this->query->add_where_expression($this->options['group'], "$expression NOT LIKE $placeholder", array($placeholder => db_like($this->value) . '%'));
}
function op_ends($field) {
function op_ends($expression) {
$placeholder = $this->placeholder();
$this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => '%' . db_like($this->value)));
$this->query->add_where_expression($this->options['group'], "$expression LIKE $placeholder", array($placeholder => '%' . db_like($this->value)));
}
function op_not_ends($field) {
function op_not_ends($expression) {
$placeholder = $this->placeholder();
$this->query->add_where_expression($this->options['group'], "$field NOT LIKE $placeholder", array($placeholder => '%' . db_like($this->value)));
$this->query->add_where_expression($this->options['group'], "$expression NOT LIKE $placeholder", array($placeholder => '%' . db_like($this->value)));
}
function op_not($field) {
function op_not($expression) {
$placeholder = $this->placeholder();
$this->query->add_where_expression($this->options['group'], "$field NOT LIKE $placeholder", array($placeholder => '%' . db_like($this->value) . '%'));
$this->query->add_where_expression($this->options['group'], "$expression NOT LIKE $placeholder", array($placeholder => '%' . db_like($this->value) . '%'));
}
function op_regex($field) {
function op_regex($expression) {
$placeholder = $this->placeholder();
$this->query->add_where_expression($this->options['group'], "$field RLIKE $placeholder", array($placeholder => $this->value));
$this->query->add_where_expression($this->options['group'], "$expression RLIKE $placeholder", array($placeholder => $this->value));
}
function op_empty($field) {
function op_empty($expression) {
if ($this->operator == 'empty') {
$operator = "IS NULL";
}
......@@ -141,7 +141,7 @@ function op_empty($field) {
$operator = "IS NOT NULL";
}
$this->query->add_where_expression($this->options['group'], "$field $operator");
$this->query->add_where_expression($this->options['group'], "$expression $operator");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment