diff --git a/core/includes/actions.inc b/core/includes/actions.inc index 760de83..c236a1e 100644 --- a/core/includes/actions.inc +++ b/core/includes/actions.inc @@ -160,7 +160,7 @@ function actions_do($action_ids, $object = NULL, $context = NULL, $a1 = NULL, $a function actions_list($reset = FALSE) { $actions = &drupal_static(__FUNCTION__); if (!isset($actions) || $reset) { - $actions = module_invoke_all('action_info'); + $actions = module_signal_all('action_info'); drupal_alter('action_info', $actions); } @@ -378,6 +378,6 @@ function actions_delete($aid) { db_delete('actions') ->condition('aid', $aid) ->execute(); - module_invoke_all('actions_delete', $aid); + module_invoke1_all('actions_delete', $aid); } diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc index cda55b4..edc875b 100644 --- a/core/includes/ajax.inc +++ b/core/includes/ajax.inc @@ -559,7 +559,7 @@ function ajax_footer() { // modules that need very fast Ajax responses, and therefore, run Ajax // requests with an early bootstrap. if (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update')) { - module_invoke_all('exit'); + module_signal_all('exit'); } // Commit the user session. See above comment about the possibility of this diff --git a/core/includes/common.inc b/core/includes/common.inc index 1bd8b19..8363bd0 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -2530,7 +2530,7 @@ function drupal_deliver_html_page($page_callback_result) { function drupal_page_footer() { global $user; - module_invoke_all('exit'); + module_signal_all('exit'); // Commit the user session, if needed. drupal_session_commit(); @@ -2563,7 +2563,7 @@ function drupal_page_footer() { function drupal_exit($destination = NULL) { if (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) { if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') { - module_invoke_all('exit', $destination); + module_invoke1_all('exit', $destination); } drupal_session_commit(); } @@ -5049,7 +5049,7 @@ function _drupal_bootstrap_full() { // ahead of when rendering starts. menu_set_custom_theme(); drupal_theme_initialize(); - module_invoke_all('init'); + module_signal_all('init'); } } @@ -5128,7 +5128,7 @@ function drupal_cron_run() { $return = FALSE; // Grab the defined cron queues. - $queues = module_invoke_all('cron_queue_info'); + $queues = module_signal_all('cron_queue_info'); drupal_alter('cron_queue_info', $queues); // Try to acquire cron lock. @@ -6165,7 +6165,7 @@ function element_info($type) { $cache = &$drupal_static_fast['cache']; if (!isset($cache)) { - $cache = module_invoke_all('element_info'); + $cache = module_signal_all('element_info'); foreach ($cache as $element_type => $info) { $cache[$element_type]['#type'] = $element_type; } @@ -7270,7 +7270,7 @@ function drupal_flush_all_caches() { // Don't clear cache_form - in-progress form submissions may break. // Ordered so clearing the page cache will always be the last action. $core = array('cache', 'path', 'filter', 'bootstrap', 'page'); - $cache_bins = array_merge(module_invoke_all('flush_caches'), $core); + $cache_bins = array_merge(module_signal_all('flush_caches'), $core); foreach ($cache_bins as $bin) { cache($bin)->flush(); } @@ -7443,7 +7443,7 @@ function archiver_get_info() { $cache = cache()->get('archiver_info'); if ($cache === FALSE) { // Rebuild the cache and save it. - $archiver_info = module_invoke_all('archiver_info'); + $archiver_info = module_signal_all('archiver_info'); drupal_alter('archiver_info', $archiver_info); uasort($archiver_info, 'drupal_sort_weight'); cache()->set('archiver_info', $archiver_info); @@ -7526,7 +7526,7 @@ function archiver_get_archiver($file) { function drupal_get_updaters() { $updaters = &drupal_static(__FUNCTION__); if (!isset($updaters)) { - $updaters = module_invoke_all('updater_info'); + $updaters = module_signal_all('updater_info'); drupal_alter('updater_info', $updaters); uasort($updaters, 'drupal_sort_weight'); } diff --git a/core/includes/file.inc b/core/includes/file.inc index 6e6611f..a107c23 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -128,7 +128,7 @@ function file_get_stream_wrappers($filter = STREAM_WRAPPERS_ALL) { $wrappers_storage = &drupal_static(__FUNCTION__); if (!isset($wrappers_storage)) { - $wrappers = module_invoke_all('stream_wrappers'); + $wrappers = module_signal_all('stream_wrappers'); foreach ($wrappers as $scheme => $info) { // Add defaults. $wrappers[$scheme] += array('type' => STREAM_WRAPPERS_NORMAL); @@ -577,19 +577,19 @@ function file_save(stdClass $file) { $file->original = entity_load_unchanged('file', $file->fid); } - module_invoke_all('file_presave', $file); + module_invoke1_all('file_presave', $file); module_invoke_all('entity_presave', $file, 'file'); if (empty($file->fid)) { drupal_write_record('file_managed', $file); // Inform modules about the newly added file. - module_invoke_all('file_insert', $file); + module_invoke1_all('file_insert', $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); + module_invoke1_all('file_update', $file); module_invoke_all('entity_update', $file, 'file'); } @@ -1247,7 +1247,7 @@ function file_delete(stdClass $file, $force = FALSE) { } // Let other modules clean up any references to the deleted file. - module_invoke_all('file_delete', $file); + module_invoke1_all('file_delete', $file); module_invoke_all('entity_delete', $file, 'file'); // Make sure the file is deleted before removing its row from the @@ -1635,7 +1635,7 @@ function file_validate(stdClass &$file, $validators = array()) { } // Let other modules perform validation on the new file. - return array_merge($errors, module_invoke_all('file_validate', $file)); + return array_merge($errors, module_invoke1_all('file_validate', $file)); } /** diff --git a/core/includes/image.inc b/core/includes/image.inc index 8dc36b9..b1cb717 100644 --- a/core/includes/image.inc +++ b/core/includes/image.inc @@ -41,7 +41,7 @@ */ function image_get_available_toolkits() { // hook_image_toolkits returns an array of toolkit names. - $toolkits = module_invoke_all('image_toolkits'); + $toolkits = module_signal_all('image_toolkits'); $output = array(); foreach ($toolkits as $name => $info) { diff --git a/core/includes/install.inc b/core/includes/install.inc index 514d89c..2d2ac8b 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -793,7 +793,7 @@ function drupal_uninstall_modules($module_list = array(), $uninstall_dependents if (!empty($module_list)) { // Call hook_module_uninstall to let other modules act - module_invoke_all('modules_uninstalled', $module_list); + module_invoke1_all('modules_uninstalled', $module_list); } return TRUE; diff --git a/core/includes/language.inc b/core/includes/language.inc index 685a4d4..52684c1 100644 --- a/core/includes/language.inc +++ b/core/includes/language.inc @@ -21,7 +21,7 @@ function language_types_info() { $language_types = &drupal_static(__FUNCTION__); if (!isset($language_types)) { - $language_types = module_invoke_all('language_types_info'); + $language_types = module_signal_all('language_types_info'); // Let other modules alter the list of language types. drupal_alter('language_types_info', $language_types); } @@ -293,7 +293,7 @@ function language_negotiation_info() { if (!isset($language_providers)) { // Collect all the module-defined language negotiation providers. - $language_providers = module_invoke_all('language_negotiation_info'); + $language_providers = module_signal_all('language_negotiation_info'); // Add the default language provider. $language_providers[LANGUAGE_NEGOTIATION_DEFAULT] = array( diff --git a/core/includes/locale.inc b/core/includes/locale.inc index e9cd427..23cf5d7 100644 --- a/core/includes/locale.inc +++ b/core/includes/locale.inc @@ -527,17 +527,17 @@ function locale_language_save($language) { $language->enabled = TRUE; } // Let other modules modify $language before saved. - module_invoke_all('locale_language_presave', $language); + module_invoke1_all('locale_language_presave', $language); // Save the record and inform others about the change. if ($language->is_new) { drupal_write_record('languages', $language); - module_invoke_all('locale_language_insert', $language); + module_invoke1_all('locale_language_insert', $language); watchdog('locale', 'The %language (%langcode) language has been created.', array('%language' => $language->name, '%langcode' => $language->language)); } else { drupal_write_record('languages', $language, array('language')); - module_invoke_all('locale_language_update', $language); + module_invoke1_all('locale_language_update', $language); watchdog('locale', 'The %language (%langcode) language has been updated.', array('%language' => $language->name, '%langcode' => $language->language)); } diff --git a/core/includes/menu.inc b/core/includes/menu.inc index f23eb0d..d091d2f 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1720,7 +1720,7 @@ function menu_get_custom_theme($initialize = FALSE) { // First allow modules to dynamically set a custom theme for the current // page. Since we can only have one, the last module to return a valid // theme takes precedence. - $custom_themes = array_filter(module_invoke_all('custom_theme'), 'drupal_theme_access'); + $custom_themes = array_filter(module_signal_all('custom_theme'), 'drupal_theme_access'); if (!empty($custom_themes)) { $custom_theme = array_pop($custom_themes); } @@ -2937,7 +2937,7 @@ function _menu_delete_item($item, $force = FALSE) { } // Notify modules we are deleting the item. - module_invoke_all('menu_link_delete', $item); + module_invoke1_all('menu_link_delete', $item); db_delete('menu_links')->condition('mlid', $item['mlid'])->execute(); diff --git a/core/includes/module.inc b/core/includes/module.inc index cca2ef9..b4d3ccf 100644 --- a/core/includes/module.inc +++ b/core/includes/module.inc @@ -426,7 +426,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) { drupal_get_schema(NULL, TRUE); // Allow modules to react prior to the installation of a module. - module_invoke_all('modules_preinstall', array($module)); + module_invoke1_all('modules_preinstall', array($module)); // Now install the module if necessary. if (drupal_get_installed_schema_version($module, TRUE) == SCHEMA_UNINSTALLED) { @@ -452,7 +452,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) { } // Allow modules to react prior to the enabling of a module. - module_invoke_all('modules_preenable', array($module)); + module_invoke1_all('modules_preenable', array($module)); // Enable the module. module_invoke($module, 'enable'); @@ -465,12 +465,12 @@ function module_enable($module_list, $enable_dependencies = TRUE) { // If any modules were newly installed, invoke hook_modules_installed(). if (!empty($modules_installed)) { - module_invoke_all('modules_installed', $modules_installed); + module_invoke1_all('modules_installed', $modules_installed); } // If any modules were newly enabled, invoke hook_modules_enabled(). if (!empty($modules_enabled)) { - module_invoke_all('modules_enabled', $modules_enabled); + module_invoke1_all('modules_enabled', $modules_enabled); } return TRUE; @@ -544,7 +544,7 @@ function module_disable($module_list, $disable_dependents = TRUE) { module_implements_reset(); // Invoke hook_modules_disabled before disabling modules, // so we can still call module hooks to get information. - module_invoke_all('modules_disabled', $invoke_modules); + module_invoke1_all('modules_disabled', $invoke_modules); // Update the registry to remove the newly-disabled module. registry_update(); _system_update_bootstrap_status(); @@ -830,6 +830,47 @@ function module_invoke_all($hook) { } /** + * Invoke a hook (without paremeters) in all enabled modules + * + * @param string $signal + * @return array return values + */ +function module_signal_all($signal) { + $return = array(); + foreach (module_implements($signal) as $module) { + $function = $module . '_' . $signal; + $result = $function(); + if (isset($result) && is_array($result)) { + $return = array_merge_recursive($return, $result); + } + elseif (isset($result)) { + $return[] = $result; + } + } + return $return; +} + +function module_invoke1_all($hook, $argument) { + $return = array(); + foreach (module_implements($hook) as $module) { + $function = $module . '_' . $hook; + $result = $function($argument); + if (isset($result) && is_array($result)) { + $return = array_merge_recursive($return, $result); + } + elseif (isset($result)) { + $return[] = $result; + } + } + return $return; +} + +/** + * Invoke a hook (without paremeters) in all enabled modules + * +} + +/** * @} End of "defgroup hooks". */ diff --git a/core/includes/path.inc b/core/includes/path.inc index 630b34c..4f79090 100644 --- a/core/includes/path.inc +++ b/core/includes/path.inc @@ -439,10 +439,10 @@ function path_save(&$path) { // Verify that a record was written. if ($status) { if ($status === SAVED_NEW) { - module_invoke_all('path_insert', $path); + module_invoke1_all('path_insert', $path); } else { - module_invoke_all('path_update', $path); + module_invoke1_all('path_update', $path); } drupal_clear_path_cache($path['source']); } @@ -464,7 +464,7 @@ function path_delete($criteria) { $query->condition($field, $value); } $query->execute(); - module_invoke_all('path_delete', $path); + module_invoke1_all('path_delete', $path); drupal_clear_path_cache($path['source']); } @@ -511,7 +511,7 @@ function path_is_admin($path) { function path_get_admin_paths() { $patterns = &drupal_static(__FUNCTION__); if (!isset($patterns)) { - $paths = module_invoke_all('admin_paths'); + $paths = module_signal_all('admin_paths'); drupal_alter('admin_paths', $paths); // Combine all admin paths into one array, and likewise for non-admin paths, // for easier handling. diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 68dd70b..970542e 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1418,7 +1418,7 @@ function theme_enable($theme_list) { drupal_theme_rebuild(); // Invoke hook_themes_enabled() after the themes have been enabled. - module_invoke_all('themes_enabled', $theme_list); + module_invoke1_all('themes_enabled', $theme_list); } /** @@ -1451,7 +1451,7 @@ function theme_disable($theme_list) { drupal_theme_rebuild(); // Invoke hook_themes_disabled after the themes have been disabled. - module_invoke_all('themes_disabled', $theme_list); + module_invoke1_all('themes_disabled', $theme_list); } /** diff --git a/core/includes/token.inc b/core/includes/token.inc index 7a5fea1..c83c0f1 100644 --- a/core/includes/token.inc +++ b/core/includes/token.inc @@ -250,7 +250,7 @@ function token_find_with_prefix(array $tokens, $prefix, $delimiter = ':') { function token_info() { $data = &drupal_static(__FUNCTION__); if (!isset($data)) { - $data = module_invoke_all('token_info'); + $data = module_signal_all('token_info'); drupal_alter('token_info', $data); } return $data; diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module index 72e31c3..a21a9ae 100644 --- a/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -567,7 +567,7 @@ function aggregator_save_feed($edit) { function aggregator_remove($feed) { _aggregator_get_variables(); // Call hook_aggregator_remove() on all modules. - module_invoke_all('aggregator_remove', $feed); + module_invoke1_all('aggregator_remove', $feed); // Reset feed. db_merge('aggregator_feed') ->key(array('fid' => $feed->fid)) diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index ae9278c..2bdb485 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1469,7 +1469,7 @@ function comment_save($comment) { field_attach_presave('comment', $comment); // Allow modules to alter the comment before saving. - module_invoke_all('comment_presave', $comment); + module_invoke1_all('comment_presave', $comment); module_invoke_all('entity_presave', $comment, 'comment'); if ($comment->cid) { @@ -1485,7 +1485,7 @@ function comment_save($comment) { field_attach_update('comment', $comment); // Allow modules to respond to the updating of a comment. - module_invoke_all('comment_update', $comment); + module_invoke1_all('comment_update', $comment); module_invoke_all('entity_update', $comment, 'comment'); } else { @@ -1567,11 +1567,11 @@ function comment_save($comment) { field_attach_insert('comment', $comment); // Tell the other modules a new comment has been submitted. - module_invoke_all('comment_insert', $comment); + module_invoke1_all('comment_insert', $comment); module_invoke_all('entity_insert', $comment, 'comment'); } if ($comment->status == COMMENT_PUBLISHED) { - module_invoke_all('comment_publish', $comment); + module_invoke1_all('comment_publish', $comment); } unset($comment->original); } @@ -1610,7 +1610,7 @@ function comment_delete_multiple($cids) { ->execute(); foreach ($comments as $comment) { field_attach_delete('comment', $comment); - module_invoke_all('comment_delete', $comment); + module_invoke1_all('comment_delete', $comment); module_invoke_all('entity_delete', $comment, 'comment'); // Delete the comment's replies. diff --git a/core/modules/dashboard/dashboard.module b/core/modules/dashboard/dashboard.module index 1216cc0..336525c 100644 --- a/core/modules/dashboard/dashboard.module +++ b/core/modules/dashboard/dashboard.module @@ -457,7 +457,7 @@ function dashboard_is_visible() { * Return an array of dashboard region descriptions, keyed by region name. */ function dashboard_region_descriptions() { - $regions = module_invoke_all('dashboard_regions'); + $regions = module_signal_all('dashboard_regions'); drupal_alter('dashboard_regions', $regions); return $regions; } diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module index 02611e3..3de86c8 100644 --- a/core/modules/entity/entity.module +++ b/core/modules/entity/entity.module @@ -61,7 +61,7 @@ function entity_get_info($entity_type = NULL) { $entity_info = $cache->data; } else { - $entity_info = module_invoke_all('entity_info'); + $entity_info = module_signal_all('entity_info'); // Merge in default values. foreach ($entity_info as $name => $data) { $entity_info[$name] += array( diff --git a/core/modules/field/field.crud.inc b/core/modules/field/field.crud.inc index e34c0c5..9de39ef 100644 --- a/core/modules/field/field.crud.inc +++ b/core/modules/field/field.crud.inc @@ -188,7 +188,7 @@ function field_create_field($field) { field_cache_clear(TRUE); // Invoke external hooks after the cache is cleared for API consistency. - module_invoke_all('field_create_field', $field); + module_invoke1_all('field_create_field', $field); return $field; } @@ -362,7 +362,7 @@ function field_read_fields($params = array(), $include_additional = array()) { $field['translatable'] = $record['translatable']; $field['deleted'] = $record['deleted']; - module_invoke_all('field_read_field', $field); + module_invoke1_all('field_read_field', $field); // Populate storage information. module_load_install($field['module']); @@ -409,7 +409,7 @@ function field_delete_field($field_name) { // Clear the cache. field_cache_clear(TRUE); - module_invoke_all('field_delete_field', $field); + module_invoke1_all('field_delete_field', $field); } /** @@ -492,7 +492,7 @@ function field_create_instance($instance) { field_cache_clear(); // Invoke external hooks after the cache is cleared for API consistency. - module_invoke_all('field_create_instance', $instance); + module_invoke1_all('field_create_instance', $instance); return $instance; } @@ -713,7 +713,7 @@ function field_read_instances($params = array(), $include_additional = array()) $instance['bundle'] = $record['bundle']; $instance['deleted'] = $record['deleted']; - module_invoke_all('field_read_instance', $instance); + module_invoke1_all('field_read_instance', $instance); $instances[] = $instance; } } @@ -747,7 +747,7 @@ function field_delete_instance($instance, $field_cleanup = TRUE) { module_invoke($field['storage']['module'], 'field_storage_delete_instance', $instance); // Let modules react to the deletion of the instance. - module_invoke_all('field_delete_instance', $instance); + module_invoke1_all('field_delete_instance', $instance); // Delete the field itself if we just deleted its last instance. if ($field_cleanup && count($field['bundles']) == 0) { @@ -934,7 +934,7 @@ function field_purge_instance($instance) { field_info_cache_clear(); // Invoke external hooks after the cache is cleared for API consistency. - module_invoke_all('field_purge_instance', $instance); + module_invoke1_all('field_purge_instance', $instance); } /** @@ -963,7 +963,7 @@ function field_purge_field($field) { field_info_cache_clear(); // Invoke external hooks after the cache is cleared for API consistency. - module_invoke_all('field_purge_field', $field); + module_invoke1_all('field_purge_field', $field); } /** diff --git a/core/modules/field/field.info.inc b/core/modules/field/field.info.inc index 69fefca..f76e065 100644 --- a/core/modules/field/field.info.inc +++ b/core/modules/field/field.info.inc @@ -231,7 +231,7 @@ function _field_info_collate_fields() { } // Populate 'extra_fields'. - $extra = module_invoke_all('field_extra_fields'); + $extra = module_signal_all('field_extra_fields'); drupal_alter('field_extra_fields', $extra); // Merge in saved settings. foreach ($extra as $entity_type => $bundles) { diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 2ad725a..7871e90 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -249,10 +249,10 @@ function filter_format_save($format) { } if ($return == SAVED_NEW) { - module_invoke_all('filter_format_insert', $format); + module_invoke1_all('filter_format_insert', $format); } else { - module_invoke_all('filter_format_update', $format); + module_invoke1_all('filter_format_update', $format); // Explicitly indicate that the format was updated. We need to do this // since if the filters were updated but the format object itself was not, // the merge query above would not return an indication that anything had @@ -286,7 +286,7 @@ function filter_format_disable($format) { ->execute(); // Allow modules to react on text format deletion. - module_invoke_all('filter_format_disable', $format); + module_invoke1_all('filter_format_disable', $format); // Clear the filter cache whenever a text format is disabled. filter_formats_reset(); diff --git a/core/modules/image/image.module b/core/modules/image/image.module index 54d98eb..b7baee9 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -284,7 +284,7 @@ function image_file_download($uri) { // Check that the file exists and is an image. if ($info = image_get_info($uri)) { // Check the permissions of the original to grant access to this image. - $headers = module_invoke_all('file_download', $original_uri); + $headers = module_invoke1_all('file_download', $original_uri); if (!in_array(-1, $headers)) { return array( // Send headers describing the image's size, and MIME-type... @@ -606,7 +606,7 @@ function image_style_save($style) { } // Let other modules update as necessary on save. - module_invoke_all('image_style_save', $style); + module_invoke1_all('image_style_save', $style); // Clear all caches and flush. image_style_flush($style); @@ -634,7 +634,7 @@ function image_style_delete($style, $replacement_style_name = '') { // Let other modules update as necessary on save. $style['old_name'] = $style['name']; $style['name'] = $replacement_style_name; - module_invoke_all('image_style_delete', $style); + module_invoke1_all('image_style_delete', $style); return TRUE; } @@ -711,7 +711,7 @@ function image_style_deliver($style, $scheme) { file_download($scheme, file_uri_target($derivative_uri)); } else { - $headers = module_invoke_all('file_download', $image_uri); + $headers = module_invoke1_all('file_download', $image_uri); if (in_array(-1, $headers) || empty($headers)) { return drupal_access_denied(); } @@ -852,7 +852,7 @@ function image_style_flush($style) { } // Let other modules update as necessary on flush. - module_invoke_all('image_style_flush', $style); + module_invoke1_all('image_style_flush', $style); // Clear image style and effect caches. cache()->delete('image_styles'); diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 103c284..cce83be 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -795,7 +795,7 @@ function locale_language_delete($langcode) { if (isset($languages[$langcode])) { $language = $languages[$langcode]; - module_invoke_all('locale_language_delete', $language); + module_invoke1_all('locale_language_delete', $language); // Remove translations first. db_delete('locales_target') diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index cd42256..8b58463 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -268,11 +268,11 @@ function menu_save($menu) { switch ($status) { case SAVED_NEW: - module_invoke_all('menu_insert', $menu); + module_invoke1_all('menu_insert', $menu); break; case SAVED_UPDATED: - module_invoke_all('menu_update', $menu); + module_invoke1_all('menu_update', $menu); break; } } @@ -311,7 +311,7 @@ function menu_delete($menu) { ->execute(); menu_cache_clear_all(); - module_invoke_all('menu_delete', $menu); + module_invoke1_all('menu_delete', $menu); } /** diff --git a/core/modules/node/content_types.inc b/core/modules/node/content_types.inc index d58bc31..b4c1364 100644 --- a/core/modules/node/content_types.inc +++ b/core/modules/node/content_types.inc @@ -397,7 +397,7 @@ function node_node_type_update($info) { * then nothing happens. */ function node_type_reset($type) { - $info_array = module_invoke_all('node_info'); + $info_array = module_signal_all('node_info'); if (isset($info_array[$type->orig_type])) { $info_array[$type->orig_type]['type'] = $type->orig_type; $info = node_type_set_defaults($info_array[$type->orig_type]); diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc index 8f46df4..19f7dd9 100644 --- a/core/modules/node/node.admin.inc +++ b/core/modules/node/node.admin.inc @@ -366,7 +366,7 @@ function node_admin_nodes() { '#access' => $admin_access, ); $options = array(); - foreach (module_invoke_all('node_operations') as $operation => $array) { + foreach (module_signal_all('node_operations') as $operation => $array) { $options[$operation] = $array['label']; } $form['options']['operation'] = array( @@ -539,7 +539,7 @@ function node_admin_nodes_validate($form, &$form_state) { * Execute the chosen 'Update option' on the selected nodes. */ function node_admin_nodes_submit($form, &$form_state) { - $operations = module_invoke_all('node_operations'); + $operations = module_signal_all('node_operations'); $operation = $operations[$form_state['values']['operation']]; // Filter out unchecked nodes $nodes = array_filter($form_state['values']['nodes']); diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 81ee841..4d676f9 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -517,7 +517,7 @@ function node_type_save($info) { if (!empty($type->old_type) && $type->old_type != $type->type) { field_attach_rename_bundle('node', $type->old_type, $type->type); } - module_invoke_all('node_type_update', $type); + module_invoke1_all('node_type_update', $type); $status = SAVED_UPDATED; } else { @@ -528,7 +528,7 @@ function node_type_save($info) { field_attach_create_bundle('node', $type->type); - module_invoke_all('node_type_insert', $type); + module_invoke1_all('node_type_insert', $type); $status = SAVED_NEW; } @@ -620,7 +620,7 @@ function node_type_delete($type) { ->condition('type', $type) ->execute(); field_attach_delete_bundle('node', $type); - module_invoke_all('node_type_delete', $info); + module_invoke1_all('node_type_delete', $info); // Clear the node type cache. node_type_cache_reset(); @@ -958,7 +958,7 @@ function node_object_prepare($node) { $node->revision = in_array('revision', $node_options); node_invoke($node, 'prepare'); - module_invoke_all('node_prepare', $node); + module_invoke1_all('node_prepare', $node); } /** @@ -1057,7 +1057,7 @@ function node_save($node) { $update_node = TRUE; // Let modules modify the node before it is saved to the database. - module_invoke_all('node_presave', $node); + module_invoke1_all('node_presave', $node); module_invoke_all('entity_presave', $node, 'node'); if ($node->is_new || !empty($node->revision)) { @@ -1199,7 +1199,7 @@ function node_delete_multiple($nids) { foreach ($nodes as $nid => $node) { // Call the node-specific callback (if any): node_invoke($node, 'delete'); - module_invoke_all('node_delete', $node); + module_invoke1_all('node_delete', $node); module_invoke_all('entity_delete', $node, 'node'); field_attach_delete('node', $node); @@ -1255,7 +1255,7 @@ function node_revision_delete($revision_id) { ->condition('nid', $revision->nid) ->condition('vid', $revision->vid) ->execute(); - module_invoke_all('node_revision_delete', $revision); + module_invoke1_all('node_revision_delete', $revision); field_attach_delete_revision('node', $revision); return TRUE; } @@ -1552,7 +1552,7 @@ function node_permission() { * A query object that has been extended with the Search DB Extender. */ function _node_rankings(SelectQueryExtender $query) { - if ($ranking = module_invoke_all('ranking')) { + if ($ranking = module_signal_all('ranking')) { $tables = &$query->getTables(); foreach ($ranking as $rank => $values) { if ($node_rank = variable_get('node_rank_' . $rank, 0)) { @@ -1619,7 +1619,7 @@ function node_search_admin() { // Note: reversed to reflect that higher number = higher ranking. $options = drupal_map_assoc(range(0, 10)); - foreach (module_invoke_all('ranking') as $var => $values) { + foreach (module_signal_all('ranking') as $var => $values) { $form['content_ranking']['factors']['node_rank_' . $var] = array( '#title' => $values['title'], '#type' => 'select', @@ -1671,7 +1671,7 @@ function node_search_execute($keys = NULL, $conditions = NULL) { // Fetch comments for snippet. $node->rendered .= ' ' . module_invoke('comment', 'node_update_index', $node); - $extra = module_invoke_all('node_search_result', $node); + $extra = module_invoke1_all('node_search_result', $node); $uri = entity_uri('node', $node); $results[] = array( @@ -2644,7 +2644,7 @@ function _node_index_node($node) { $text = '

' . check_plain($node->title) . '

' . $node->rendered; // Fetch extra data normally not visible - $extra = module_invoke_all('node_update_index', $node); + $extra = module_invoke1_all('node_update_index', $node); foreach ($extra as $t) { $text .= $t; } @@ -3326,7 +3326,7 @@ function _node_query_node_access_alter($query, $type) { * Defaults to TRUE. */ function node_access_acquire_grants($node, $delete = TRUE) { - $grants = module_invoke_all('node_access_records', $node); + $grants = module_invoke1_all('node_access_records', $node); // Let modules alter the grants. drupal_alter('node_access_records', $grants, $node); // If no grants are set and the node is published, then use the default grant. diff --git a/core/modules/openid/openid.inc b/core/modules/openid/openid.inc index 6945f34..17bfae1 100644 --- a/core/modules/openid/openid.inc +++ b/core/modules/openid/openid.inc @@ -252,7 +252,7 @@ function _openid_is_xri($identifier) { * The procedure is described in OpenID Authentication 2.0, section 7.2. */ function openid_normalize($identifier) { - $methods = module_invoke_all('openid_normalization_method_info'); + $methods = module_signal_all('openid_normalization_method_info'); drupal_alter('openid_normalization_method_info', $methods); // Execute each method in turn, stopping after the first method accepted diff --git a/core/modules/openid/openid.module b/core/modules/openid/openid.module index ed02891..5f1a184 100644 --- a/core/modules/openid/openid.module +++ b/core/modules/openid/openid.module @@ -408,7 +408,7 @@ function openid_complete($response = array()) { function openid_discovery($claimed_id) { module_load_include('inc', 'openid'); - $methods = module_invoke_all('openid_discovery_method_info'); + $methods = module_signal_all('openid_discovery_method_info'); drupal_alter('openid_discovery_method_info', $methods); // Execute each method in turn and return first successful discovery. diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module index 5433d3e..a825f2c 100644 --- a/core/modules/overlay/overlay.module +++ b/core/modules/overlay/overlay.module @@ -615,14 +615,14 @@ function overlay_set_mode($mode = NULL) { drupal_add_library('overlay', 'parent'); // Allow modules to act upon overlay events. - module_invoke_all('overlay_parent_initialize'); + module_signal_all('overlay_parent_initialize'); break; case 'child': drupal_add_library('overlay', 'child'); // Allow modules to act upon overlay events. - module_invoke_all('overlay_child_initialize'); + module_signal_all('overlay_child_initialize'); break; } return $overlay_mode; diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index 4eea417..0ba3fe0 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -95,7 +95,7 @@ function rdf_rdf_namespaces() { * hook_rdf_namespaces(). */ function rdf_get_namespaces() { - $rdf_namespaces = module_invoke_all('rdf_namespaces'); + $rdf_namespaces = module_signal_all('rdf_namespaces'); // module_invoke_all() uses array_merge_recursive() which might return nested // arrays if several modules redefine the same prefix multiple times. We need // to ensure the array of namespaces is flat and only contains strings as diff --git a/core/modules/search/search.api.php b/core/modules/search/search.api.php index 3f745bf..955ba86 100644 --- a/core/modules/search/search.api.php +++ b/core/modules/search/search.api.php @@ -145,7 +145,7 @@ function hook_search_admin() { // Note: reversed to reflect that higher number = higher ranking. $options = drupal_map_assoc(range(0, 10)); - foreach (module_invoke_all('ranking') as $var => $values) { + foreach (module_signal_all('ranking') as $var => $values) { $form['content_ranking']['factors']['node_rank_' . $var] = array( '#title' => $values['title'], '#type' => 'select', @@ -234,7 +234,7 @@ function hook_search_execute($keys = NULL, $conditions = NULL) { // Fetch terms for snippet. $node->rendered .= ' ' . module_invoke('taxonomy', 'node_update_index', $node); - $extra = module_invoke_all('node_search_result', $node); + $extra = module_invoke1_all('node_search_result', $node); $results[] = array( 'link' => url('node/' . $item->sid, array('absolute' => TRUE)), @@ -354,7 +354,7 @@ function hook_update_index() { $text = '

' . check_plain($node->title) . '

' . $node->rendered; // Fetch extra data normally not visible - $extra = module_invoke_all('node_update_index', $node); + $extra = module_invoke1_all('node_update_index', $node); foreach ($extra as $t) { $text .= $t; } diff --git a/core/modules/search/search.module b/core/modules/search/search.module index e731e4f..790e21d 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -315,7 +315,7 @@ function _search_menu_access($name) { */ function search_reindex($sid = NULL, $module = NULL, $reindex = FALSE) { if ($module == NULL && $sid == NULL) { - module_invoke_all('search_reset'); + module_signal_all('search_reset'); } else { db_delete('search_dataset') diff --git a/core/modules/search/search.test b/core/modules/search/search.test index f121abd..be02813 100644 --- a/core/modules/search/search.test +++ b/core/modules/search/search.test @@ -409,7 +409,7 @@ class SearchRankingTestCase extends DrupalWebTestCase { } // Update the search index. - module_invoke_all('update_index'); + module_signal_all('update_index'); search_update_totals(); // Refresh variables after the treatment. @@ -477,7 +477,7 @@ class SearchRankingTestCase extends DrupalWebTestCase { } // Update the search index. - module_invoke_all('update_index'); + module_signal_all('update_index'); search_update_totals(); // Refresh variables after the treatment. @@ -507,7 +507,7 @@ class SearchRankingTestCase extends DrupalWebTestCase { $node = $this->drupalCreateNode($settings); // Update the search index. - module_invoke_all('update_index'); + module_signal_all('update_index'); search_update_totals(); // Refresh variables after the treatment. @@ -546,7 +546,7 @@ class SearchRankingTestCase extends DrupalWebTestCase { $node = $this->drupalCreateNode($settings); // Update the search index. - module_invoke_all('update_index'); + module_signal_all('update_index'); search_update_totals(); // Refresh variables after the treatment. @@ -682,7 +682,7 @@ class SearchExactTestCase extends DrupalWebTestCase { } // Update the search index. - module_invoke_all('update_index'); + module_signal_all('update_index'); search_update_totals(); // Refresh variables after the treatment. @@ -1978,7 +1978,7 @@ class SearchNodeAccessTest extends DrupalWebTestCase { $node = $this->drupalCreateNode(array('body' => array(LANGUAGE_NONE => array(array('value' => "The bunny's ears were fuzzy."))))); // Update the search index. - module_invoke_all('update_index'); + module_signal_all('update_index'); search_update_totals(); // Refresh variables after the treatment. diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index f8ddcc2..fd3df8b 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -528,7 +528,7 @@ function shortcut_default_set($account = NULL) { // have one, we allow the last module which returns a valid result to take // precedence. If no module returns a valid set, fall back on the site-wide // default, which is the lowest-numbered shortcut set. - $suggestions = array_reverse(module_invoke_all('shortcut_default_set', $account)); + $suggestions = array_reverse(module_invoke1_all('shortcut_default_set', $account)); $suggestions[] = SHORTCUT_DEFAULT_SET_NAME; foreach ($suggestions as $name) { if ($shortcut_set = shortcut_set_load($name)) { diff --git a/core/modules/simpletest/drupal_web_test_case.php b/core/modules/simpletest/drupal_web_test_case.php index 9d993d4..6ec624c 100644 --- a/core/modules/simpletest/drupal_web_test_case.php +++ b/core/modules/simpletest/drupal_web_test_case.php @@ -1132,7 +1132,7 @@ class DrupalWebTestCase extends DrupalTestCase { $available = &drupal_static(__FUNCTION__); if (!isset($available) || $reset) { - $available = array_keys(module_invoke_all('permission')); + $available = array_keys(module_signal_all('permission')); } $valid = TRUE; diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index eb33d1b..afe51a8 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -148,7 +148,7 @@ function simpletest_run_tests($test_list, $reporter = 'drupal') { ); batch_set($batch); - module_invoke_all('test_group_started'); + module_signal_all('test_group_started'); return $test_id; } @@ -178,7 +178,7 @@ function _simpletest_batch_operation($test_list_init, $test_id, &$context) { $size = count($test_list); $info = $test->getInfo(); - module_invoke_all('test_finished', $test->results); + module_invoke1_all('test_finished', $test->results); // Gather results and compose the report. $test_results[$test_class] = $test->results; @@ -221,7 +221,7 @@ function _simpletest_batch_finished($success, $results, $operations, $elapsed) { drupal_set_message(t('The test run did not successfully finish.'), 'error'); drupal_set_message(t('Use the Clean environment button to clean-up temporary files and tables.'), 'warning'); } - module_invoke_all('test_group_finished'); + module_signal_all('test_group_finished'); } /** diff --git a/core/modules/simpletest/tests/cache.test b/core/modules/simpletest/tests/cache.test index 664247b..49f9fb6 100644 --- a/core/modules/simpletest/tests/cache.test +++ b/core/modules/simpletest/tests/cache.test @@ -320,7 +320,7 @@ class CacheClearCase extends CacheTestCase { function testFlushAllCaches() { // Create cache entries for each flushed cache bin. $bins = array('cache', 'filter', 'page', 'bootstrap', 'path'); - $bins = array_merge(module_invoke_all('flush_caches'), $bins); + $bins = array_merge(module_signal_all('flush_caches'), $bins); foreach ($bins as $id => $bin) { $cid = 'test_cid_clear' . $id; cache($bin)->set($cid, $this->default_value); diff --git a/core/modules/simpletest/tests/menu.test b/core/modules/simpletest/tests/menu.test index d0612ac..d4e7bfd 100644 --- a/core/modules/simpletest/tests/menu.test +++ b/core/modules/simpletest/tests/menu.test @@ -1032,7 +1032,7 @@ class MenuBreadcrumbTestCase extends MenuWebTestCase { } $modules[] = 'menu_test'; parent::setUp($modules); - $perms = array_keys(module_invoke_all('permission')); + $perms = array_keys(module_signal_all('permission')); $this->admin_user = $this->drupalCreateUser($perms); $this->drupalLogin($this->admin_user); diff --git a/core/modules/simpletest/tests/module_test.module b/core/modules/simpletest/tests/module_test.module index bd85049..b444017 100644 --- a/core/modules/simpletest/tests/module_test.module +++ b/core/modules/simpletest/tests/module_test.module @@ -99,7 +99,7 @@ function module_test_hook_dynamic_loading_invoke() { * return 'success!'. */ function module_test_hook_dynamic_loading_invoke_all() { - $result = module_invoke_all('test_hook'); + $result = module_signal_all('test_hook'); return $result['module_test']; } diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index aa2f98f..e037ef5 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -2285,7 +2285,7 @@ function system_status($check = FALSE) { drupal_load_updates(); // Check run-time requirements and status information. - $requirements = module_invoke_all('requirements', 'runtime'); + $requirements = module_invoke1_all('requirements', 'runtime'); usort($requirements, '_system_sort_requirements'); if ($check) { diff --git a/core/modules/system/system.module b/core/modules/system/system.module index f4261e1..7153b2a 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -3006,7 +3006,7 @@ function system_cron() { } $core = array('cache', 'path', 'filter', 'page', 'form', 'menu'); - $cache_bins = array_merge(module_invoke_all('flush_caches'), $core); + $cache_bins = array_merge(module_signal_all('flush_caches'), $core); foreach ($cache_bins as $bin) { cache($bin)->expire(); } @@ -3727,7 +3727,7 @@ function _system_date_formats_build() { } // Get formats supplied by various contrib modules. - $module_formats = module_invoke_all('date_formats'); + $module_formats = module_signal_all('date_formats'); foreach ($module_formats as $module_format) { // System types are locked. diff --git a/core/modules/system/system.test b/core/modules/system/system.test index 4e3761d..2f7b8e2 100644 --- a/core/modules/system/system.test +++ b/core/modules/system/system.test @@ -2355,7 +2355,7 @@ class SystemAdminTestCase extends DrupalWebTestCase { // Create an administrator with all permissions, as well as a regular user // who can only access administration pages and perform some Locale module // administrative tasks, but not all of them. - $this->admin_user = $this->drupalCreateUser(array_keys(module_invoke_all('permission'))); + $this->admin_user = $this->drupalCreateUser(array_keys(module_signal_all('permission'))); $this->web_user = $this->drupalCreateUser(array( 'access administration pages', 'translate interface', diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index eb20c26..9c9063d 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -417,7 +417,7 @@ function taxonomy_vocabulary_save($vocabulary) { $vocabulary->old_machine_name = $vocabulary->original->machine_name; } - module_invoke_all('taxonomy_vocabulary_presave', $vocabulary); + module_invoke1_all('taxonomy_vocabulary_presave', $vocabulary); module_invoke_all('entity_presave', $vocabulary, 'taxonomy_vocabulary'); if (!empty($vocabulary->vid) && !empty($vocabulary->name)) { @@ -425,13 +425,13 @@ function taxonomy_vocabulary_save($vocabulary) { if ($vocabulary->old_machine_name != $vocabulary->machine_name) { field_attach_rename_bundle('taxonomy_term', $vocabulary->old_machine_name, $vocabulary->machine_name); } - module_invoke_all('taxonomy_vocabulary_update', $vocabulary); + module_invoke1_all('taxonomy_vocabulary_update', $vocabulary); module_invoke_all('entity_update', $vocabulary, 'taxonomy_vocabulary'); } elseif (empty($vocabulary->vid)) { $status = drupal_write_record('taxonomy_vocabulary', $vocabulary); field_attach_create_bundle('taxonomy_term', $vocabulary->machine_name); - module_invoke_all('taxonomy_vocabulary_insert', $vocabulary); + module_invoke1_all('taxonomy_vocabulary_insert', $vocabulary); module_invoke_all('entity_insert', $vocabulary, 'taxonomy_vocabulary'); } @@ -465,7 +465,7 @@ function taxonomy_vocabulary_delete($vid) { ->execute(); field_attach_delete_bundle('taxonomy_term', $vocabulary->machine_name); - module_invoke_all('taxonomy_vocabulary_delete', $vocabulary); + module_invoke1_all('taxonomy_vocabulary_delete', $vocabulary); module_invoke_all('entity_delete', $vocabulary, 'taxonomy_vocabulary'); cache_clear_all(); @@ -594,7 +594,7 @@ function taxonomy_term_save($term) { } field_attach_presave('taxonomy_term', $term); - module_invoke_all('taxonomy_term_presave', $term); + module_invoke1_all('taxonomy_term_presave', $term); module_invoke_all('entity_presave', $term, 'taxonomy_term'); if (empty($term->tid)) { @@ -687,7 +687,7 @@ function taxonomy_term_delete($tid) { ->execute(); field_attach_delete('taxonomy_term', $term); - module_invoke_all('taxonomy_term_delete', $term); + module_invoke1_all('taxonomy_term_delete', $term); module_invoke_all('entity_delete', $term, 'taxonomy_term'); taxonomy_terms_static_reset(); } diff --git a/core/modules/trigger/trigger.admin.inc b/core/modules/trigger/trigger.admin.inc index 7509eb3..3a865fd 100644 --- a/core/modules/trigger/trigger.admin.inc +++ b/core/modules/trigger/trigger.admin.inc @@ -22,7 +22,7 @@ function trigger_assign($module_to_display = NULL) { } $build = array(); - $trigger_info = module_invoke_all('trigger_info'); + $trigger_info = module_signal_all('trigger_info'); drupal_alter('trigger_info', $trigger_info); foreach ($trigger_info as $module => $hooks) { if ($module == $module_to_display) { diff --git a/core/modules/trigger/trigger.module b/core/modules/trigger/trigger.module index c0e516f..3907874 100644 --- a/core/modules/trigger/trigger.module +++ b/core/modules/trigger/trigger.module @@ -601,7 +601,7 @@ function _trigger_get_all_info() { $triggers = &drupal_static(__FUNCTION__); if (!isset($triggers)) { - $triggers = module_invoke_all('trigger_info'); + $triggers = module_signal_all('trigger_info'); drupal_alter('trigger_info', $triggers); } diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc index 4789e7e..daf9839 100644 --- a/core/modules/user/user.admin.inc +++ b/core/modules/user/user.admin.inc @@ -177,7 +177,7 @@ function user_admin_account() { '#attributes' => array('class' => array('container-inline')), ); $options = array(); - foreach (module_invoke_all('user_operations') as $operation => $array) { + foreach (module_signal_all('user_operations') as $operation => $array) { $options[$operation] = $array['label']; } $form['options']['operation'] = array( diff --git a/core/modules/user/user.module b/core/modules/user/user.module index abf7477..8a1bb68 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -2444,7 +2444,7 @@ function user_delete_multiple(array $uids) { $transaction = db_transaction(); try { foreach ($accounts as $uid => $account) { - module_invoke_all('user_delete', $account); + module_invoke1_all('user_delete', $account); module_invoke_all('entity_delete', $account, 'user'); field_attach_delete('user', $account); drupal_session_destroy_uid($account->uid); @@ -2887,15 +2887,15 @@ function user_role_save($role) { } // Let modules modify the user role before it is saved to the database. - module_invoke_all('user_role_presave', $role); + module_invoke1_all('user_role_presave', $role); if (!empty($role->rid) && $role->name) { $status = drupal_write_record('role', $role, 'rid'); - module_invoke_all('user_role_update', $role); + module_invoke1_all('user_role_update', $role); } else { $status = drupal_write_record('role', $role); - module_invoke_all('user_role_insert', $role); + module_invoke1_all('user_role_insert', $role); } // Clear the user access cache. @@ -2930,7 +2930,7 @@ function user_role_delete($role) { ->condition('rid', $role->rid) ->execute(); - module_invoke_all('user_role_delete', $role); + module_invoke1_all('user_role_delete', $role); // Clear the user access cache. drupal_static_reset('user_access'); diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc index 8239c53..458f094 100644 --- a/core/modules/user/user.pages.inc +++ b/core/modules/user/user.pages.inc @@ -169,7 +169,7 @@ function user_logout() { watchdog('user', 'Session closed for %name.', array('%name' => $user->name)); - module_invoke_all('user_logout', $user); + module_invoke1_all('user_logout', $user); // Destroy the current session, and reset $user to the anonymous user. session_destroy(); diff --git a/core/update.php b/core/update.php index d1a0940..80228f4 100644 --- a/core/update.php +++ b/core/update.php @@ -332,7 +332,7 @@ function update_extra_requirements($requirements = NULL) { */ function update_check_requirements($skip_warnings = FALSE) { // Check requirements of all loaded modules. - $requirements = module_invoke_all('requirements', 'update'); + $requirements = module_invoke1_all('requirements', 'update'); $requirements += update_extra_requirements(); $severity = drupal_requirements_severity($requirements); diff --git a/core/xmlrpc.php b/core/xmlrpc.php index 562aa81..dc02349 100644 --- a/core/xmlrpc.php +++ b/core/xmlrpc.php @@ -18,4 +18,4 @@ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); include_once DRUPAL_ROOT . '/core/includes/xmlrpc.inc'; include_once DRUPAL_ROOT . '/core/includes/xmlrpcs.inc'; -xmlrpc_server(module_invoke_all('xmlrpc')); +xmlrpc_server(module_signal_all('xmlrpc')); diff --git a/profiles/standard/standard.install b/profiles/standard/standard.install index 5d44717..911da6e 100644 --- a/profiles/standard/standard.install +++ b/profiles/standard/standard.install @@ -397,7 +397,7 @@ function standard_install() { $admin_role->name = 'administrator'; $admin_role->weight = 2; user_role_save($admin_role); - user_role_grant_permissions($admin_role->rid, array_keys(module_invoke_all('permission'))); + user_role_grant_permissions($admin_role->rid, array_keys(module_signal_all('permission'))); // Set this as the administrator role. variable_set('user_admin_role', $admin_role->rid);