summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Wehner2015-11-06 10:12:01 (GMT)
committerDaniel Wehner2015-11-06 10:12:01 (GMT)
commit5c2bfc9638e3e78023d1efb754b79d4ac994d0c6 (patch)
tree9056296dd0f4e8b0b71c5430311c20786f21bd07
parent0ae5fd6650e52fa1f32d385ab8adfaa15abb6966 (diff)
Revert "Issue #2204257 by ezra-g, andyg5000: Update Views Content access filter per core performance improvements"7.x-3.13
This reverts commit d649d329eb2fc56d9feb1320c173fd69f3c9a986.
-rw-r--r--modules/node/views_handler_filter_node_access.inc10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/node/views_handler_filter_node_access.inc b/modules/node/views_handler_filter_node_access.inc
index f27582c..a29b13f 100644
--- a/modules/node/views_handler_filter_node_access.inc
+++ b/modules/node/views_handler_filter_node_access.inc
@@ -23,7 +23,15 @@ class views_handler_filter_node_access extends views_handler_filter {
function query() {
if (!user_access('administer nodes') && module_implements('node_grants')) {
$table = $this->ensure_my_table();
- $grants = node_add_node_grants_to_query(node_access_grants('view'));
+ $grants = db_or();
+ foreach (node_access_grants('view') as $realm => $gids) {
+ foreach ($gids as $gid) {
+ $grants->condition(db_and()
+ ->condition($table . '.gid', $gid)
+ ->condition($table . '.realm', $realm)
+ );
+ }
+ }
$this->query->add_where('AND', $grants);
$this->query->add_where('AND', $table . '.grant_view', 1, '>=');