function _diff_module_invoke_all in Diff 6.2
Same name and namespace in other branches
- 7.2 diff.pages.inc \_diff_module_invoke_all()
Helper function to invoke hook_diff in all enabled modules that implement it.
Don't use module_invoke_all() since if date.module is enabled will clash with PHP 5.3's date_diff() function.
@todo figure out any else possible solution but not workaround. @link http://drupal.org/node/639320
See also
1 call to _diff_module_invoke_all()
- _diff_body_rows in ./
diff.pages.inc - Creates an array of rows which represent a diff between $old_node and $new_node. The rows can be used via theme('diff_table') to be displayed.
File
- ./
diff.pages.inc, line 349 - Menu callbacks for hook_menu().
Code
function _diff_module_invoke_all($old_node, $new_node, $remove_markup) {
$return = array();
foreach (module_implements('diff') as $module) {
if ($module == 'date') {
continue;
// Avoid function name collision with date_diff().
}
$result = module_invoke($module, 'diff', $old_node, $new_node, $remove_markup);
if (isset($result) && is_array($result)) {
$return = array_merge_recursive($return, $result);
}
elseif (isset($result)) {
$return[] = $result;
}
}
return $return;
}