From c28bba827e0c62ab92062c1e0cc0490ff50079fe Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 23 Jun 2010 02:45:35 +0000 Subject: - Patch #834924 by jhodgdon: entity_invoke() is worthless. --- includes/common.inc | 14 -------------- includes/file.inc | 4 ++-- 2 files changed, 2 insertions(+), 16 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index 0cac24553..1722d206d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6629,20 +6629,6 @@ function entity_uri($entity_type, $entity) { return $entity->uri ? $entity->uri : NULL; } -/** - * 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. */ 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; -- cgit v1.2.3