You are here

function lingotek_cleanup_get_dirty_field_collection_fields in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_cleanup_get_dirty_field_collection_fields()
  2. 7.6 lingotek.util.inc \lingotek_cleanup_get_dirty_field_collection_fields()
1 call to lingotek_cleanup_get_dirty_field_collection_fields()
lingotek_cleanup_field_collection_fields in ./lingotek.util.inc
Clean up field-collection fields

File

./lingotek.util.inc, line 1655
Utility functions.

Code

function lingotek_cleanup_get_dirty_field_collection_fields($field_collection_table) {
  $query = "SELECT COUNT(entity_id) FROM {" . $field_collection_table . "} WHERE language != '" . LANGUAGE_NONE . "' GROUP BY entity_type, bundle, entity_id, delta";
  $result = db_query($query)
    ->fetchCol();
  $empty_array = array();
  return $result && is_array($result) ? $result : $empty_array;
}