diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-08-22 16:11:12 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-08-22 16:11:12 +0000 |
commit | 479b71232be6634e59868d72471d798c4fbabfce (patch) | |
tree | 5c5e336e374acf9792b7da6c390d75cc43c71439 /modules/field | |
parent | 1651cf34bfbdf02f6c03f8d00b025a610d24df23 (diff) | |
download | brdo-479b71232be6634e59868d72471d798c4fbabfce.tar.gz brdo-479b71232be6634e59868d72471d798c4fbabfce.tar.bz2 |
- Patch #860180 by chx, dixon_, jhodgdon: entity listing and loading does not allow for node access.
Diffstat (limited to 'modules/field')
-rw-r--r-- | modules/field/modules/field_sql_storage/field_sql_storage.module | 3 |
1 files changed, 3 insertions, 0 deletions
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.'); |