Projet

Général

Profil

Révision 74f6bef0

Ajouté par Assos Assos il y a plus de 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/entity/entity.module
948 948
  }
949 949
}
950 950

  
951
/**
952
 * Implements hook_modules_installed().
953
 */
954
function entity_modules_installed($modules) {
955
  module_load_install('entity');
956
  entity_entitycache_installed_modules($modules);
957
}
958

  
959
/**
960
 * Implements hook_modules_uninstalled().
961
 */
962
function entity_modules_uninstalled($modules) {
963
  module_load_install('entity');
964
  entity_entitycache_uninstalled_modules($modules);
965
}
966

  
951 967
/**
952 968
 * Implements hook_modules_enabled().
953 969
 */
......
1060 1076
  if (current_path() != 'admin/modules/list/confirm') {
1061 1077
    entity_defaults_rebuild();
1062 1078
  }
1079

  
1080
  // Care about entitycache tables.
1081
  if (module_exists('entitycache')) {
1082
    $tables = array();
1083
    foreach (entity_crud_get_info() as $entity_type => $entity_info) {
1084
      if (isset($entity_info['module']) && !empty($entity_info['entity cache'])) {
1085
        $tables[] = 'cache_entity_' . $entity_type;
1086
      }
1087
    }
1088
    return $tables;
1089
  }
1063 1090
}
1064 1091

  
1065 1092
/**
......
1409 1436
    if (!isset($info['configuration'])) {
1410 1437
      $entity_info[$type]['configuration'] = !empty($info['exportable']);
1411 1438
    }
1439

  
1440
    if (isset($info['controller class']) && in_array('EntityAPIControllerInterface', class_implements($info['controller class']))) {
1441
      // Automatically disable field cache when entity cache is used.
1442
      if (!empty($info['entity cache']) && module_exists('entitycache')) {
1443
        $entity_info[$type]['field cache'] = FALSE;
1444
      }
1445
    }
1412 1446
  }
1413 1447
}
1414 1448

  

Formats disponibles : Unified diff