Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.148
diff -u -p -r1.148 module.inc
--- includes/module.inc	23 Jul 2009 21:14:09 -0000	1.148
+++ includes/module.inc	25 Jul 2009 22:54:19 -0000
@@ -234,7 +234,7 @@ function module_enable($module_list, $di
     // We check for the existence of node_access_needs_rebuild() since
     // at install time, module_enable() could be called while node.module
     // is not enabled yet.
-    if (drupal_function_exists('node_access_needs_rebuild') && !node_access_needs_rebuild() && module_hook($module, 'node_grants')) {
+    if (drupal_function_exists('node_access_needs_rebuild') && !node_access_needs_rebuild() && drupal_function_exists($module . '_node_grants')) {
       node_access_needs_rebuild(TRUE);
     }
   }
@@ -257,7 +257,7 @@ function module_disable($module_list) {
   foreach ($module_list as $module) {
     if (module_exists($module)) {
       // Check if node_access table needs rebuilding.
-      if (!node_access_needs_rebuild() && module_hook($module, 'node_grants')) {
+      if (!node_access_needs_rebuild() && drupal_function_exists($module . '_node_grants')) {
         node_access_needs_rebuild(TRUE);
       }
 
@@ -312,22 +312,6 @@ function module_disable($module_list) {
  */
 
 /**
- * Determine whether a module implements a hook.
- *
- * @param $module
- *   The name of the module (without the .module extension).
- * @param $hook
- *   The name of the hook (e.g. "help" or "menu").
- * @return
- *   TRUE if the module is both installed and enabled, and the hook is
- *   implemented in that module.
- */
-function module_hook($module, $hook) {
-  $function = $module . '_' . $hook;
-  return function_exists($function) || drupal_function_exists($function);
-}
-
-/**
  * Determine which modules are implementing a hook.
  *
  * @param $hook
@@ -449,10 +433,12 @@ function module_invoke() {
   $module = $args[0];
   $hook = $args[1];
   unset($args[0], $args[1]);
-  if (module_hook($module, $hook)) {
-    return call_user_func_array($module . '_' . $hook, $args);
+  $function = $module . '_' . $hook;
+  if (drupal_function_exists($function)) {
+    return call_user_func_array($function, $args);
   }
 }
+
 /**
  * Invoke a hook in all enabled modules that implement it.
  *
Index: modules/help/help.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/help/help.admin.inc,v
retrieving revision 1.9
diff -u -p -r1.9 help.admin.inc
--- modules/help/help.admin.inc	6 Jun 2009 16:05:26 -0000	1.9
+++ modules/help/help.admin.inc	25 Jul 2009 22:54:19 -0000
@@ -21,7 +21,7 @@ function help_main() {
  */
 function help_page($name) {
   $output = '';
-  if (module_hook($name, 'help')) {
+  if (drupal_function_exists($name . '_help')) {
     $module = drupal_parse_info_file(drupal_get_path('module', $name) . '/' . $name . '.info');
     drupal_set_title($module['name']);
 
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.303
diff -u -p -r1.303 search.module
--- modules/search/search.module	23 Jul 2009 20:58:26 -0000	1.303
+++ modules/search/search.module	25 Jul 2009 22:54:21 -0000
@@ -1188,7 +1188,7 @@ function template_preprocess_search_bloc
 function search_data($keys = NULL, $type = 'node') {
 
   if (isset($keys)) {
-    if (module_hook($type, 'search')) {
+    if (drupal_function_exists($type . '_search')) {
       $results = module_invoke($type, 'search', 'search', $keys);
       if (isset($results) && is_array($results) && count($results)) {
         if (module_hook($type, 'search_page')) {
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.163
diff -u -p -r1.163 system.admin.inc
--- modules/system/system.admin.inc	20 Jul 2009 18:51:34 -0000	1.163
+++ modules/system/system.admin.inc	25 Jul 2009 22:54:23 -0000
@@ -973,7 +973,7 @@ function system_modules_uninstall($form_
     // Load the .install file, and check for an uninstall hook.
     // If the hook exists, the module can be uninstalled.
     module_load_install($module->name);
-    if (module_hook($module->name, 'uninstall')) {
+    if (drupal_function_exists($module->name . '_uninstall')) {
       $form['modules'][$module->name]['name'] = array('#markup' => $info['name'] ? $info['name'] : $module->name);
       $form['modules'][$module->name]['description'] = array('#markup' => t($info['description']));
       $options[$module->name] = '';
