X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Ftaxonomy%2Fsrc%2FPlugin%2Fviews%2Ffilter%2FTaxonomyIndexTidDepth.php;fp=web%2Fcore%2Fmodules%2Ftaxonomy%2Fsrc%2FPlugin%2Fviews%2Ffilter%2FTaxonomyIndexTidDepth.php;h=802786e4674cb82c21147c1c58dbe2a9d7c58ba9;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=732f5b15011bcfd772e594b9a950000ce0aa8bd5;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php b/web/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php index 732f5b150..802786e46 100644 --- a/web/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php +++ b/web/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php @@ -2,6 +2,7 @@ namespace Drupal\taxonomy\Plugin\views\filter; +use Drupal\Core\Database\Query\Condition; use Drupal\Core\Form\FormStateInterface; /** @@ -54,7 +55,7 @@ class TaxonomyIndexTidDepth extends TaxonomyIndexTid { $operator = '='; } else { - $operator = 'IN';# " IN (" . implode(', ', array_fill(0, sizeof($this->value), '%d')) . ")"; + $operator = 'IN'; } // The normal use of ensureMyTable() here breaks Views. @@ -72,7 +73,7 @@ class TaxonomyIndexTidDepth extends TaxonomyIndexTid { // Now build the subqueries. $subquery = db_select('taxonomy_index', 'tn'); $subquery->addField('tn', 'nid'); - $where = db_or()->condition('tn.tid', $this->value, $operator); + $where = (new Condition('OR'))->condition('tn.tid', $this->value, $operator); $last = "tn"; if ($this->options['depth'] > 0) {