From a41da4e30f37f6e142ca9349660f3b50b01c5b66 Mon Sep 17 00:00:00 2001 From: catch Date: Sun, 4 Nov 2012 23:31:01 +0000 Subject: [PATCH] Issue #1822384 by Hanspolo: Don't replace ->extra on the JoinPlugin with adjusted. --- .../lib/Drupal/views/Plugin/views/join/JoinPluginBase.php | 2 +- core/modules/views/lib/Drupal/views/Tests/Plugin/JoinTest.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/join/JoinPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/join/JoinPluginBase.php index f4efc69efa5..34e185c54bb 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/join/JoinPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/join/JoinPluginBase.php @@ -165,7 +165,7 @@ class JoinPluginBase extends PluginBase { } if (isset($configuration['adjusted'])) { - $this->extra = $configuration['adjusted']; + $this->adjusted = $configuration['adjusted']; } $this->extraOperator = strtoupper($configuration['extra_operator']); diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/JoinTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/JoinTest.php index 3a3c89b977c..8430a453bc2 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/JoinTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/JoinTest.php @@ -88,9 +88,12 @@ class JoinTest extends PluginTestBase { 'left_field' => 'uid', 'table' => 'users', 'field' => 'uid', + 'adjusted' => TRUE, ); $join = $this->manager->createInstance('standard', $configuration); $this->assertTrue($join instanceof JoinPluginBase, 'The correct join class got loaded.'); + $this->assertNull($join->extra, 'The field extra was not overriden.'); + $this->assertTrue($join->adjusted, 'The field adjusted was set correctly.'); // Build the actual join values and read them back from the dbtng query // object.