Commit 97b18ecb authored by catch's avatar catch

Issue #2143589 by yched: _comment_get_comment_fields() is weird, costly and unused.

parent ed06280e
......@@ -33,34 +33,6 @@ function comment_install() {
\Drupal::state()->set('comment.maintain_entity_statistics', TRUE);
}
/**
* Returns comment fields.
*
* comment_get_comment_fields() cannot be used in maintenance mode because
* comment is disabled and its fields are inactive.
*
* @return array
* An array of comment fields keyed by field ID.
*/
function _comment_get_comment_fields() {
$fields = entity_load_multiple_by_properties('field_entity', array(
'type' => 'comment',
'include_inactive' => TRUE,
'include_deleted' => FALSE,
));
foreach ($fields as &$field) {
$instances = entity_load_multiple_by_properties('field_instance', array(
'field_uuid' => $field->uuid,
'include_inactive' => TRUE,
'include_deleted' => FALSE,
));
foreach ($instances as $instance) {
$field->bundles[$instance->entity_type] = $instance->bundle;
}
}
return $fields;
}
/**
* Implements hook_schema().
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment