diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Compare.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Compare.php index 61b9cec..41df46d 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Compare.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Compare.php @@ -124,17 +124,17 @@ public function query() { // Get the left table and field. $left_handler = $field_handlers[$left]; $left_handler->setRelationship(); - $left_table_alias = $this->query->ensure_table($left_handler->table, $left_handler->relationship); + $left_table_alias = $this->query->ensureTable($left_handler->table, $left_handler->relationship); - // Get the left table and field. + // Get the right table and field. $right_handler = $field_handlers[$right]; $right_handler->setRelationship(); - $right_table_alias = $this->query->ensure_table($right_handler->table, $right_handler->relationship); + $right_table_alias = $this->query->ensureTable($right_handler->table, $right_handler->relationship); // Build piece of SQL. $snippet = $left_table_alias . '.' . $left_handler->realField . ' ' . $this->options['operator'] . ' ' . $right_table_alias . '.' . $right_handler->realField; - $this->query->add_where_expression($this->options['group'], $snippet); + $this->query->addWhereExpression($this->options['group'], $snippet); } } diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterCompareTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterCompareTest.php index 6e81809..bf98e92 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterCompareTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterCompareTest.php @@ -57,7 +57,6 @@ protected function dataSet() { return $data; } - /** * Tests the compare handler. */ @@ -70,7 +69,6 @@ public function testCompare() { $view->destroy(); // Test the inequality operator. - $view->initDisplay(); $item = $view->getItem('default', 'filter', 'fields_compare'); $item['operator'] = '!=';