Issue #1964046 by chx: Fixed Misleading variable name in Combine filter.
parent
58cc7dcaa9
commit
58bfec39f7
|
@ -92,48 +92,48 @@ class Combine extends String {
|
|||
// 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 @@ class Combine extends String {
|
|||
$operator = "IS NOT NULL";
|
||||
}
|
||||
|
||||
$this->query->add_where_expression($this->options['group'], "$field $operator");
|
||||
$this->query->add_where_expression($this->options['group'], "$expression $operator");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue