diff --git a/feeds.module b/feeds.module index 543b24a01507f6815a350feef817e7eac4900996..827262a1408eb6fcdc2736951ce0286badb15c52 100644 --- a/feeds.module +++ b/feeds.module @@ -943,6 +943,8 @@ function feeds_library_exists($file, $library) { * - None of that 'multiple parameters by ref' crazyness. * - Don't use module_implements() to allow hot including on behalf * implementations (see mappers/). + * + * @todo This needs to be removed and drupal_alter() used. This is crazy dumb. */ function feeds_alter($type, &$data) { $args = array(&$data); @@ -951,10 +953,10 @@ function feeds_alter($type, &$data) { array_shift($additional_args); $args = array_merge($args, $additional_args); + $hook = $type . '_alter'; foreach (module_list() as $module) { - $function = "{$module}_{$type}_alter"; - if (function_exists($function)) { - call_user_func_array($function, $args); + if (module_hook($module, $hook)) { + call_user_func_array($module . '_' . $hook, $args); } } }