diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 14 | ||||
-rw-r--r-- | includes/file.inc | 4 |
2 files changed, 2 insertions, 16 deletions
diff --git a/includes/common.inc b/includes/common.inc index 0cac24553..1722d206d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6630,20 +6630,6 @@ function entity_uri($entity_type, $entity) { } /** - * Invokes entity insert/update hooks. - * - * @param $op - * One of 'insert' or 'update'. - * @param $entity_type - * The entity type; e.g. 'node' or 'user'. - * @param $entity - * The entity object being operated on. - */ -function entity_invoke($op, $entity_type, $entity) { - module_invoke_all('entity_' . $op, $entity, $entity_type); -} - -/** * Helper function for attaching field API validation to entity forms. */ function entity_form_field_validate($entity_type, $form, &$form_state) { diff --git a/includes/file.inc b/includes/file.inc index b8cb28280..de05c799f 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -517,13 +517,13 @@ function file_save(stdClass $file) { drupal_write_record('file_managed', $file); // Inform modules about the newly added file. module_invoke_all('file_insert', $file); - entity_invoke('insert', 'file', $file); + module_invoke_all('entity_insert', $file, 'file'); } else { drupal_write_record('file_managed', $file, 'fid'); // Inform modules that the file has been updated. module_invoke_all('file_update', $file); - entity_invoke('update', 'file', $file); + module_invoke_all('entity_update', $file, 'file'); } return $file; |