X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fnode%2Fsrc%2FPlugin%2Fviews%2Ffilter%2FAccess.php;fp=web%2Fcore%2Fmodules%2Fnode%2Fsrc%2FPlugin%2Fviews%2Ffilter%2FAccess.php;h=71e8e95e5aace600236c082b03ed7ee940ea2271;hp=73844e11d19b540113be95e4ee9e7857566b3733;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/node/src/Plugin/views/filter/Access.php b/web/core/modules/node/src/Plugin/views/filter/Access.php index 73844e11d..71e8e95e5 100644 --- a/web/core/modules/node/src/Plugin/views/filter/Access.php +++ b/web/core/modules/node/src/Plugin/views/filter/Access.php @@ -2,6 +2,7 @@ namespace Drupal\node\Plugin\views\filter; +use Drupal\Core\Database\Query\Condition; use Drupal\Core\Form\FormStateInterface; use Drupal\views\Plugin\views\filter\FilterPluginBase; @@ -14,8 +15,8 @@ use Drupal\views\Plugin\views\filter\FilterPluginBase; */ class Access extends FilterPluginBase { - public function adminSummary() { } - protected function operatorForm(&$form, FormStateInterface $form_state) { } + public function adminSummary() {} + protected function operatorForm(&$form, FormStateInterface $form_state) {} public function canExpose() { return FALSE; } @@ -27,10 +28,10 @@ class Access extends FilterPluginBase { $account = $this->view->getUser(); if (!$account->hasPermission('bypass node access')) { $table = $this->ensureMyTable(); - $grants = db_or(); + $grants = new Condition('OR'); foreach (node_access_grants('view', $account) as $realm => $gids) { foreach ($gids as $gid) { - $grants->condition(db_and() + $grants->condition((new Condition('AND')) ->condition($table . '.gid', $gid) ->condition($table . '.realm', $realm) );