Commit 5c2bfc96 authored by dawehner's avatar dawehner

Revert "Issue #2204257 by ezra-g, andyg5000: Update Views Content access...

Revert "Issue #2204257 by ezra-g, andyg5000: Update Views Content access filter per core performance improvements"

This reverts commit d649d329.
parent 0ae5fd66
......@@ -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, '>=');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment