security update for entity api

This commit is contained in:
2018-04-20 23:55:10 +02:00
parent 8a05ca54b2
commit 57376251fa
9 changed files with 54 additions and 23 deletions

View File

@@ -1088,9 +1088,10 @@ function entity_flush_caches() {
// Care about entitycache tables.
if (module_exists('entitycache')) {
$tables = array();
foreach (entity_crud_get_info() as $entity_type => $entity_info) {
if (isset($entity_info['module']) && !empty($entity_info['entity cache'])) {
$tables[] = 'cache_entity_' . $entity_type;
$tables_created = variable_get('entity_cache_tables_created');
if (is_array($tables_created)) {
foreach ($tables_created as $module => $entity_cache_tables) {
$tables = array_merge($tables, $entity_cache_tables);
}
}
return $tables;