Projet

Général

Profil

Révision b4adf10d

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

Udpate to 7.33

Voir les différences:

drupal7/modules/field/field.module
342 342
  field_purge_batch($limit);
343 343
}
344 344

  
345
/**
346
 * Implements hook_modules_uninstalled().
347
 */
348
function field_modules_uninstalled($modules) {
349
  module_load_include('inc', 'field', 'field.crud');
350
  foreach ($modules as $module) {
351
    // TODO D7: field_module_delete is not yet implemented
352
    // field_module_delete($module);
353
  }
354
}
355

  
356 345
/**
357 346
 * Implements hook_system_info_alter().
358 347
 *
......
947 936
 */
948 937
function field_has_data($field) {
949 938
  $query = new EntityFieldQuery();
950
  return (bool) $query
951
    ->fieldCondition($field)
939
  $query = $query->fieldCondition($field)
952 940
    ->range(0, 1)
953 941
    ->count()
954 942
    // Neutralize the 'entity_field_access' query tag added by
955 943
    // field_sql_storage_field_storage_query(). The result cannot depend on the
956 944
    // access grants of the current user.
957
    ->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT')
945
    ->addTag('DANGEROUS_ACCESS_CHECK_OPT_OUT');
946

  
947
  return (bool) $query
948
    ->execute() || (bool) $query
949
    ->age(FIELD_LOAD_REVISION)
958 950
    ->execute();
959 951
}
960 952

  

Formats disponibles : Unified diff