From 479b71232be6634e59868d72471d798c4fbabfce Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 22 Aug 2010 16:11:12 +0000 Subject: - Patch #860180 by chx, dixon_, jhodgdon: entity listing and loading does not allow for node access. --- modules/field/modules/field_sql_storage/field_sql_storage.module | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/field') diff --git a/modules/field/modules/field_sql_storage/field_sql_storage.module b/modules/field/modules/field_sql_storage/field_sql_storage.module index 65e6bdf38..407e9186f 100644 --- a/modules/field/modules/field_sql_storage/field_sql_storage.module +++ b/modules/field/modules/field_sql_storage/field_sql_storage.module @@ -502,6 +502,8 @@ function field_sql_storage_field_storage_query(EntityFieldQuery $query) { } else { $select_query = db_select($tablename, $table_alias); + $select_query->addTag('entity_field_access'); + $select_query->addMetaData('base_table', $tablename); $select_query->fields($table_alias, array('entity_id', 'revision_id', 'bundle')); // As only a numeric ID is stored instead of the entity type add the // field_config_entity_type table to resolve the etid to a more readable @@ -547,6 +549,7 @@ function field_sql_storage_field_storage_query(EntityFieldQuery $query) { if (isset($query->deleted)) { $select_query->condition("$field_base_table.deleted", (int) $query->deleted); } + if ($query->propertyConditions || $query->propertyOrder) { if (empty($query->entityConditions['entity_type']['value'])) { throw new EntityFieldQueryException('Property conditions and orders must have an entity type defined.'); -- cgit v1.2.3