From 36278f01d83f857ecb39ebfad067d5d2ee346973 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 14 Dec 2010 19:50:05 +0000 Subject: - Patch #986992 by yched, sun: fixed insane etid / {field_config_entity_type()} abstraction. --- modules/node/node.module | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/node') diff --git a/modules/node/node.module b/modules/node/node.module index 8535a3d3f..68b33781d 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -3236,13 +3236,12 @@ function _node_query_node_access_alter($query, $base_table, $type) { if ($type == 'entity' && count($entity_conditions->conditions())) { // All the node access conditions are only for field values belonging to // nodes. - $etid = variable_get('field_sql_storage_node_etid'); - $entity_conditions->condition("$base_alias.etid", $etid); + $entity_conditions->condition("$base_alias.entity_type", 'node'); $or = db_or(); $or->condition($entity_conditions); // If the field value belongs to a non-node entity type then this function // does not do anything with it. - $or->condition("$base_alias.etid", $etid, '<>'); + $or->condition("$base_alias.entity_type", 'node', '<>'); // Add the compiled set of rules to the query. $query->condition($or); } -- cgit v1.2.3