diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-06-23 02:45:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-06-23 02:45:35 +0000 |
commit | c28bba827e0c62ab92062c1e0cc0490ff50079fe (patch) | |
tree | 929d1b7860c738b0eb5eab1e632843cb9e7955d4 /includes | |
parent | 522b923a8be253498e6083fd579f458f17ad30d9 (diff) | |
download | brdo-c28bba827e0c62ab92062c1e0cc0490ff50079fe.tar.gz brdo-c28bba827e0c62ab92062c1e0cc0490ff50079fe.tar.bz2 |
- Patch #834924 by jhodgdon: entity_invoke() is worthless.
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; |