X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FManyToOneHelper.php;h=cb2e5754a818f3d48de9f411cf1b8ee3f1141473;hb=refs%2Fheads%2Fd864;hp=d772db1a6315776d85437b32c222d4a9345eb66e;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/views/src/ManyToOneHelper.php b/web/core/modules/views/src/ManyToOneHelper.php index d772db1a6..cb2e5754a 100644 --- a/web/core/modules/views/src/ManyToOneHelper.php +++ b/web/core/modules/views/src/ManyToOneHelper.php @@ -2,6 +2,7 @@ namespace Drupal\views; +use Drupal\Core\Database\Query\Condition; use Drupal\Core\Form\FormStateInterface; use Drupal\views\Plugin\views\HandlerBase; @@ -268,8 +269,8 @@ class ManyToOneHelper { $options['group'] = 0; } - // add_condition determines whether a single expression is enough(FALSE) or the - // conditions should be added via an db_or()/db_and() (TRUE). + // If $add_condition is set to FALSE, a single expression is enough. If it + // is set to TRUE, conditions will be added. $add_condition = TRUE; if ($operator == 'not') { $value = NULL; @@ -326,7 +327,7 @@ class ManyToOneHelper { if ($add_condition) { $field = $this->handler->realField; - $clause = $operator == 'or' ? db_or() : db_and(); + $clause = $operator == 'or' ? new Condition('OR') : new Condition('AND'); foreach ($this->handler->tableAliases as $value => $alias) { $clause->condition("$alias.$field", $value); }