diff --git a/core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php b/core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php index 0f4f4b5..79aa674 100644 --- a/core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php +++ b/core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php @@ -106,7 +106,7 @@ public function query($group_by = FALSE) { $this->query->add_groupby("$search_index.sid"); $matches = $this->search_query->matches(); $placeholder = $this->placeholder(); - $this->query->add_having_expression(0, "COUNT(*) >= $placeholder", array($placeholder => $matches)); + $this->query->addHavingExpression(0, "COUNT(*) >= $placeholder", array($placeholder => $matches)); } } diff --git a/core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php b/core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php index afb7724..a5bf6a3 100644 --- a/core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php +++ b/core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php @@ -186,7 +186,7 @@ public function query() { $this->query->add_groupby("$search_index.sid"); $matches = $this->search_query->matches(); $placeholder = $this->placeholder(); - $this->query->add_having_expression($this->options['group'], "COUNT(*) >= $placeholder", array($placeholder => $matches)); + $this->query->addHavingExpression($this->options['group'], "COUNT(*) >= $placeholder", array($placeholder => $matches)); } // Set to NULL to prevent PDO exception when views object is cached. $this->search_query = NULL; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php index 7e8ef76..def4696 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php @@ -23,7 +23,7 @@ public function query($group_by = FALSE) { $field = $this->getField(); $placeholder = $this->placeholder(); - $this->query->add_having_expression(0, "$field = $placeholder", array($placeholder => $this->argument)); + $this->query->addHavingExpression(0, "$field = $placeholder", array($placeholder => $this->argument)); } public function adminLabel($short = FALSE) { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php index 02aad33..1f6a914 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php @@ -31,17 +31,17 @@ function op_between($field) { $placeholder_min = $this->placeholder(); $placeholder_max = $this->placeholder(); if ($this->operator == 'between') { - $this->query->add_having_expression($this->options['group'], "$field >= $placeholder_min", array($placeholder_min => $this->value['min'])); - $this->query->add_having_expression($this->options['group'], "$field <= $placeholder_max", array($placeholder_max => $this->value['max'])); + $this->query->addHavingExpression($this->options['group'], "$field >= $placeholder_min", array($placeholder_min => $this->value['min'])); + $this->query->addHavingExpression($this->options['group'], "$field <= $placeholder_max", array($placeholder_max => $this->value['max'])); } else { - $this->query->add_having_expression($this->options['group'], "$field <= $placeholder_min OR $field >= $placeholder_max", array($placeholder_min => $this->value['min'], $placeholder_max => $this->value['max'])); + $this->query->addHavingExpression($this->options['group'], "$field <= $placeholder_min OR $field >= $placeholder_max", array($placeholder_min => $this->value['min'], $placeholder_max => $this->value['max'])); } } function op_simple($field) { $placeholder = $this->placeholder(); - $this->query->add_having_expression($this->options['group'], "$field $this->operator $placeholder", array($placeholder => $this->value['value'])); + $this->query->addHavingExpression($this->options['group'], "$field $this->operator $placeholder", array($placeholder => $this->value['value'])); } function op_empty($field) { @@ -52,7 +52,7 @@ function op_empty($field) { $operator = "IS NOT NULL"; } - $this->query->add_having_expression($this->options['group'], "$field $operator"); + $this->query->addHavingExpression($this->options['group'], "$field $operator"); } public function adminLabel($short = FALSE) { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php index 3f7c8bd..87456be 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php @@ -953,7 +953,7 @@ function add_having($group, $field, $value = NULL, $operator = NULL) { * * @see QueryConditionInterface::having() */ - function add_having_expression($group, $snippet, $args = array()) { + public function addHavingExpression($group, $snippet, $args = array()) { // Ensure all variants of 0 are actually 0. Thus '', 0 and NULL are all // the default group. if (empty($group)) {