=== modified file 'includes/ajax.inc'
--- includes/ajax.inc	2009-08-21 00:35:30 +0000
+++ includes/ajax.inc	2009-08-22 15:04:51 +0000
@@ -211,7 +211,7 @@ function ajax_form_callback() {
   // Get the callback function from the clicked button.
   $ajax = $form_state['clicked_button']['#ajax'];
   $callback = $ajax['callback'];
-  if (drupal_function_exists($callback)) {
+  if (function_exists($callback)) {
     $html = $callback($form, $form_state);
 
     // If the returned value is a string, assume it is HTML and create

=== modified file 'includes/bootstrap.inc'
--- includes/bootstrap.inc	2009-08-21 00:00:43 +0000
+++ includes/bootstrap.inc	2009-08-22 17:35:57 +0000
@@ -654,7 +654,7 @@ function drupal_get_filename($type, $nam
         $mask = "/$name\.$type$/";
       }
 
-      if (drupal_function_exists('drupal_system_listing')) {
+      if (function_exists('drupal_system_listing')) {
         $matches = drupal_system_listing($mask, $dir, 'name', 0);
         if (!empty($matches[$name]->uri)) {
           $files[$type][$name] = $matches[$name]->uri;
@@ -788,6 +788,18 @@ function drupal_page_is_cacheable($allow
 }
 
 /**
+ * Call all init or exit hooks without including all modules.
+ *
+ * @param $hook
+ *   The name of the bootstrap hook we wish to invoke.
+ */
+function bootstrap_invoke_all($hook) {
+  foreach (module_implements($hook) as $module) {
+    module_invoke($module, $hook);
+  }
+}
+
+/**
  * Includes a file with the provided type and name. This prevents
  * including a theme, engine, module, etc., more than once.
  *
@@ -1079,6 +1091,13 @@ function drupal_serve_page_from_cache(st
 }
 
 /**
+ * Define the critical hooks that force modules to always be loaded.
+ */
+function bootstrap_hooks() {
+  return array('boot', 'exit', 'watchdog');
+}
+
+/**
  * Unserializes and appends elements from a serialized string.
  *
  * @param $obj
@@ -1469,15 +1488,14 @@ function _drupal_bootstrap($phase) {
           // If the skipping of the bootstrap hooks is not enforced, call
           // hook_boot.
           if (variable_get('page_cache_invoke_hooks', TRUE)) {
-            require_once DRUPAL_ROOT . '/includes/module.inc';
-            module_invoke_all('boot');
+            bootstrap_invoke_all('boot');
           }
           header('X-Drupal-Cache: HIT');
           drupal_serve_page_from_cache($cache);
           // If the skipping of the bootstrap hooks is not enforced, call
           // hook_exit.
           if (variable_get('page_cache_invoke_hooks', TRUE)) {
-            module_invoke_all('exit');
+            bootstrap_invoke_all('exit');
           }
           // We are done.
           exit;
@@ -1504,6 +1522,11 @@ function _drupal_bootstrap($phase) {
     case DRUPAL_BOOTSTRAP_VARIABLES:
       // Load variables from the database, but do not overwrite variables set in settings.php.
       $conf = variable_initialize(isset($conf) ? $conf : array());
+      //break;
+
+    //case DRUPAL_BOOTSTRAP_MODULE:
+      require_once DRUPAL_ROOT . '/includes/module.inc';
+      module_load_all(TRUE);
       break;
 
     case DRUPAL_BOOTSTRAP_SESSION:
@@ -1512,8 +1535,7 @@ function _drupal_bootstrap($phase) {
       break;
 
     case DRUPAL_BOOTSTRAP_PAGE_HEADER:
-      require_once DRUPAL_ROOT . '/includes/module.inc';
-      module_invoke_all('boot');
+      bootstrap_invoke_all('boot');
       if (!$cache && drupal_page_is_cacheable()) {
         header('X-Drupal-Cache: MISS');
       }
@@ -1751,7 +1773,7 @@ function drupal_get_schema($table = NULL
       // Load the .install files to get hook_schema.
       // On some databases this function may be called before bootstrap has
       // been completed, so we force the functions we need to load just in case.
-      if (drupal_function_exists('module_load_all_includes')) {
+      if (function_exists('module_load_all_includes')) {
 
         // There is currently a bug in module_list() where it caches what it
         // was last called with, which is not always what you want.
@@ -1761,7 +1783,7 @@ function drupal_get_schema($table = NULL
         // "prime" module_list() here to to values we want, specifically
         // "yes rebuild the list and don't limit to bootstrap".
         // TODO: Remove this call after http://drupal.org/node/222109 is fixed.
-        module_list(TRUE);
+        module_list(TRUE, FALSE);
         module_load_all_includes('install');
       }
 
@@ -1769,17 +1791,11 @@ function drupal_get_schema($table = NULL
       // Invoke hook_schema for all modules.
       foreach (module_implements('schema') as $module) {
         $current = module_invoke($module, 'schema');
-        if (drupal_function_exists('_drupal_schema_initialize')) {
-          _drupal_schema_initialize($module, $current);
-        }
-
+        _drupal_schema_initialize($module, $current);
         $schema = array_merge($schema, $current);
       }
 
-      if (drupal_function_exists('drupal_alter')) {
-        drupal_alter('schema', $schema);
-      }
-
+      drupal_alter('schema', $schema);
       // If the schema is empty, avoid saving it: some database engines require
       // the schema to perform queries, and this could lead to infinite loops.
       if (!empty($schema) && (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL)) {
@@ -1810,49 +1826,9 @@ function drupal_get_schema($table = NULL
  */
 
 /**
- * Confirm that a function is available.
- *
- * If the function is already available, this function does nothing.
- * If the function is not available, it tries to load the file where the
- * function lives. If the file is not available, it returns false, so that it
- * can be used as a drop-in replacement for function_exists().
- *
- * @param $function
- *   The name of the function to check or load.
- * @return
- *   TRUE if the function is now available, FALSE otherwise.
- */
-function drupal_function_exists($function) {
-  static $checked = array();
-  static $maintenance;
-
-  if (!isset($maintenance)) {
-    $maintenance = defined('MAINTENANCE_MODE');
-  }
-
-  if ($maintenance) {
-    return function_exists($function);
-  }
-
-  if (isset($checked[$function])) {
-    return $checked[$function];
-  }
-  $checked[$function] = FALSE;
-
-  if (function_exists($function)) {
-    $checked[$function] = TRUE;
-    return TRUE;
-  }
-
-  $checked[$function] = _registry_check_code('function', $function);
-
-  return $checked[$function];
-}
-
-/**
  * Confirm that an interface is available.
  *
- * This function parallels drupal_function_exists(), but is rarely
+ * This function is rarely
  * called directly. Instead, it is registered as an spl_autoload()
  * handler, and PHP calls it for us when necessary.
  *
@@ -1868,7 +1844,7 @@ function drupal_autoload_interface($inte
 /**
  * Confirm that a class is available.
  *
- * This function parallels drupal_function_exists(), but is rarely
+ * This function is rarely
  * called directly. Instead, it is registered as an spl_autoload()
  * handler, and PHP calls it for us when necessary.
  *

=== modified file 'includes/common.inc'
--- includes/common.inc	2009-08-22 14:34:17 +0000
+++ includes/common.inc	2009-08-22 17:45:47 +0000
@@ -1219,7 +1219,7 @@ function t($string, array $args = array(
     $string = $custom_strings[$options['langcode']][$options['context']][$string];
   }
   // Translate with locale module if enabled.
-  // We don't use drupal_function_exists() here, because it breaks the testing
+  // We don't use function_exists() here, because it breaks the testing
   // framework if the locale module is enabled in the parent site (we cannot
   // unload functions in PHP).
   elseif (function_exists('locale') && $options['langcode'] != 'en') {
@@ -2319,7 +2319,6 @@ function drupal_page_footer() {
     ob_flush();
   }
 
-  module_implements(MODULE_IMPLEMENTS_WRITE_CACHE);
   _registry_check_code(REGISTRY_WRITE_LOOKUP_CACHE);
   drupal_cache_system_paths();
 }
@@ -2868,7 +2867,7 @@ function drupal_clear_css_cache() {
  *   - 'file': Path to the file relative to base_path().
  *   - 'inline': The JavaScript code that should be placed in the given scope.
  *   - 'external': The absolute path to an external JavaScript file that is not
- *     hosted on the local server. These files will not be aggregated if 
+ *     hosted on the local server. These files will not be aggregated if
  *     JavaScript aggregation is enabled.
  *   - 'setting': An array with configuration options as associative array. The
  *       array is directly placed in Drupal.settings. All modules should wrap
@@ -3575,14 +3574,6 @@ function _drupal_bootstrap_full() {
   set_error_handler('_drupal_error_handler');
   set_exception_handler('_drupal_exception_handler');
 
-  if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'simpletest') !== FALSE) {
-    // Valid SimpleTest user-agent, log fatal errors to test specific file
-    // directory. The user-agent is validated in DRUPAL_BOOTSTRAP_DATABASE
-    // phase so as long as it is a SimpleTest user-agent it is valid.
-    ini_set('log_errors', 1);
-    ini_set('error_log', file_directory_path() . '/error.log');
-  }
-
   // Emit the correct charset HTTP header.
   drupal_set_header('Content-Type', 'text/html; charset=utf-8');
   // Detect string handling method
@@ -3593,6 +3584,14 @@ function _drupal_bootstrap_full() {
   module_load_all();
   // Make sure all stream wrappers are registered.
   file_get_stream_wrappers();
+  if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'simpletest') !== FALSE) {
+    // Valid SimpleTest user-agent, log fatal errors to test specific file
+    // directory. The user-agent is validated in DRUPAL_BOOTSTRAP_DATABASE
+    // phase so as long as it is a SimpleTest user-agent it is valid.
+    ini_set('log_errors', 1);
+    ini_set('error_log', file_directory_path() . '/error.log');
+  }
+
   // Let all modules take action before menu system handles the request
   // We do not want this while running update.php.
   if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') {
@@ -3767,7 +3766,7 @@ function drupal_system_listing($mask, $d
     $searchdir[] = "$config/$directory";
   }
 
-  // If the database is not available, we can't use drupal_function_exists(), so
+  // If the database is not available, we can't use function_exists(), so
   // we load the file_scan_directory function definition manually.
   if (!function_exists('file_scan_directory')) {
     require_once DRUPAL_ROOT . '/includes/file.inc';
@@ -3957,7 +3956,7 @@ function drupal_render(&$elements) {
   // element is rendered into the final text.
   if (isset($elements['#pre_render'])) {
     foreach ($elements['#pre_render'] as $function) {
-      if (drupal_function_exists($function)) {
+      if (function_exists($function)) {
         $elements = $function($elements);
       }
     }
@@ -3991,7 +3990,7 @@ function drupal_render(&$elements) {
   // which allows the output'ed text to be filtered.
   if (isset($elements['#post_render'])) {
     foreach ($elements['#post_render'] as $function) {
-      if (drupal_function_exists($function)) {
+      if (function_exists($function)) {
         $elements['#children'] = $function($elements['#children'], $elements);
       }
     }

=== modified file 'includes/file.inc'
--- includes/file.inc	2009-08-19 08:38:09 +0000
+++ includes/file.inc	2009-08-22 18:33:29 +0000
@@ -320,7 +320,7 @@ function file_create_url($uri) {
       return FALSE;
     }
   }
-  
+
   // @todo Implement CDN integration hook stuff in this function.
   // @see http://drupal.org/node/499156
 }
@@ -1250,7 +1250,7 @@ function file_validate(&$file, $validato
   // Call the validation functions specified by this function's caller.
   $errors = array();
   foreach ($validators as $function => $args) {
-    if (drupal_function_exists($function)) {
+    if (function_exists($function)) {
       array_unshift($args, $file);
       $errors = array_merge($errors, call_user_func_array($function, $args));
     }

=== modified file 'includes/form.inc'
--- includes/form.inc	2009-08-22 14:34:17 +0000
+++ includes/form.inc	2009-08-22 17:45:47 +0000
@@ -418,7 +418,7 @@ function drupal_retrieve_form($form_id, 
 
   // We first check to see if there's a function named after the $form_id.
   // If there is, we simply pass the arguments on to it to get the form.
-  if (!drupal_function_exists($form_id)) {
+  if (!function_exists($form_id)) {
     // In cases where many form_ids need to share a central constructor function,
     // such as the node editing form, modules can implement hook_forms(). It
     // maps one or more form_ids to the correct constructor functions.
@@ -439,7 +439,7 @@ function drupal_retrieve_form($form_id, 
     }
     if (isset($form_definition['callback'])) {
       $callback = $form_definition['callback'];
-      drupal_function_exists($callback);
+      function_exists($callback);
     }
   }
 
@@ -613,13 +613,13 @@ function drupal_prepare_form($form_id, &
   $form += array('#tree' => FALSE, '#parents' => array());
 
   if (!isset($form['#validate'])) {
-    if (drupal_function_exists($form_id . '_validate')) {
+    if (function_exists($form_id . '_validate')) {
       $form['#validate'] = array($form_id . '_validate');
     }
   }
 
   if (!isset($form['#submit'])) {
-    if (drupal_function_exists($form_id . '_submit')) {
+    if (function_exists($form_id . '_submit')) {
       // We set submit here so that it can be altered.
       $form['#submit'] = array($form_id . '_submit');
     }
@@ -794,7 +794,7 @@ function _form_validate($elements, &$for
     // #value data.
     elseif (isset($elements['#element_validate'])) {
       foreach ($elements['#element_validate'] as $function) {
-        if (drupal_function_exists($function))  {
+        if (function_exists($function))  {
           $function($elements, $form_state, $form_state['complete form']);
         }
       }
@@ -831,7 +831,7 @@ function form_execute_handlers($type, &$
   }
 
   foreach ($handlers as $function) {
-    if (drupal_function_exists($function))  {
+    if (function_exists($function))  {
       // Check to see if a previous _submit handler has set a batch, but
       // make sure we do not react to a batch that is already being processed
       // (for instance if a batch operation performs a drupal_form_submit()).
@@ -970,7 +970,7 @@ function form_builder($form_id, $element
   // checkboxes and files.
   if (isset($element['#process']) && !$element['#processed']) {
     foreach ($element['#process'] as $process) {
-      if (drupal_function_exists($process)) {
+      if (function_exists($process)) {
         $element = $process($element, $form_state, $form_state['complete form']);
       }
     }
@@ -1097,7 +1097,7 @@ function _form_builder_handle_input_elem
       // If we have input for the current element, assign it to the #value property.
       if (!$form_state['programmed'] || isset($input)) {
         // Call #type_value to set the form value;
-        if (drupal_function_exists($value_callback)) {
+        if (function_exists($value_callback)) {
           $element['#value'] = $value_callback($element, $input, $form_state);
         }
         if (!isset($element['#value']) && isset($input)) {
@@ -1112,7 +1112,7 @@ function _form_builder_handle_input_elem
     // Load defaults.
     if (!isset($element['#value'])) {
       // Call #type_value without a second argument to request default_value handling.
-      if (drupal_function_exists($value_callback)) {
+      if (function_exists($value_callback)) {
         $element['#value'] = $value_callback($element, FALSE, $form_state);
       }
       // Final catch. If we haven't set a value yet, use the explicit default value.

=== modified file 'includes/image.inc'
--- includes/image.inc	2009-08-20 10:48:02 +0000
+++ includes/image.inc	2009-08-22 18:46:59 +0000
@@ -65,7 +65,7 @@ function image_get_toolkit() {
   if (!isset($toolkit)) {
     $toolkits = image_get_available_toolkits();
     $toolkit = variable_get('image_toolkit', 'gd');
-    if (!isset($toolkits[$toolkit]) || !drupal_function_exists('image_' . $toolkit . '_load')) {
+    if (!isset($toolkits[$toolkit]) || !function_exists('image_' . $toolkit . '_load')) {
       // The selected toolkit isn't available so return the first one found. If
       // none are available this will return FALSE.
       reset($toolkits);
@@ -90,7 +90,7 @@ function image_get_toolkit() {
  */
 function image_toolkit_invoke($method, stdClass $image, array $params = array()) {
   $function = 'image_' . $image->toolkit . '_' . $method;
-  if (drupal_function_exists($function)) {
+  if (function_exists($function)) {
     array_unshift($params, $image);
     return call_user_func_array($function, $params);
   }

=== modified file 'includes/install.inc'
--- includes/install.inc	2009-08-21 07:50:07 +0000
+++ includes/install.inc	2009-08-22 15:08:26 +0000
@@ -632,15 +632,16 @@ function drupal_install_system() {
   $system_versions = drupal_get_schema_versions('system');
   $system_version = $system_versions ? max($system_versions) : SCHEMA_INSTALLED;
   db_insert('system')
-    ->fields(array('filename', 'name', 'type', 'owner', 'status', 'schema_version'))
+    ->fields(array('filename', 'name', 'type', 'owner', 'status', 'schema_version', 'bootstrap'))
     ->values(array(
         'filename' => $system_path . '/system.module',
         'name' => 'system',
         'type' => 'module',
         'owner' => '',
         'status' => 1,
-        'schema_version' => $system_version
-        ))
+        'schema_version' => $system_version,
+        'bootstrap' => 0,
+      ))
     ->execute();
   // Now that we've installed things properly, bootstrap the full Drupal environment
   drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

=== modified file 'includes/mail.inc'
--- includes/mail.inc	2009-05-07 10:41:12 +0000
+++ includes/mail.inc	2009-08-22 15:04:51 +0000
@@ -115,7 +115,7 @@ function drupal_mail($module, $key, $to,
   // Build the e-mail (get subject and body, allow additional headers) by
   // invoking hook_mail() on this module. We cannot use module_invoke() as
   // we need to have $message by reference in hook_mail().
-  if (drupal_function_exists($function = $module . '_mail')) {
+  if (function_exists($function = $module . '_mail')) {
     $function($key, $message, $params);
   }
 

=== modified file 'includes/menu.inc'
--- includes/menu.inc	2009-08-19 23:29:13 +0000
+++ includes/menu.inc	2009-08-22 15:04:51 +0000
@@ -398,9 +398,10 @@ function menu_execute_active_handler($pa
   }
   if ($router_item = menu_get_item($path)) {
     if ($router_item['access']) {
-      if (drupal_function_exists($router_item['page_callback'])) {
-        return call_user_func_array($router_item['page_callback'], $router_item['page_arguments']);
+      if ($router_item['file']) {
+        require_once($router_item['file']);
       }
+      return call_user_func_array($router_item['page_callback'], $router_item['page_arguments']);
     }
     else {
       return MENU_ACCESS_DENIED;
@@ -503,7 +504,7 @@ function _menu_check_access(&$item, $map
     if ($callback == 'user_access') {
       $item['access'] = (count($arguments) == 1) ? user_access($arguments[0]) : user_access($arguments[0], $arguments[1]);
     }
-    elseif (drupal_function_exists($callback)) {
+    elseif (function_exists($callback)) {
       $item['access'] = call_user_func_array($callback, $arguments);
     }
   }
@@ -554,7 +555,7 @@ function _menu_item_localize(&$item, $ma
         $item['title'] = t($item['title'], menu_unserialize($item['title_arguments'], $map));
       }
     }
-    elseif ($callback && drupal_function_exists($callback)) {
+    elseif ($callback && function_exists($callback)) {
       if (empty($item['title_arguments'])) {
         $item['title'] = $callback($item['title']);
       }
@@ -1843,7 +1844,7 @@ function menu_cache_clear_all() {
 function menu_rebuild() {
   if (!lock_acquire('menu_rebuild')) {
     // Wait for another request that is already doing this work.
-    // We choose to block here since otherwise the router item may not 
+    // We choose to block here since otherwise the router item may not
     // be available in menu_execute_active_handler() resulting in a 404.
     lock_wait('menu_rebuild');
     return FALSE;
@@ -2544,12 +2545,12 @@ function _menu_router_build($callbacks) 
           $load_functions[$k] = NULL;
         }
         else {
-          if (drupal_function_exists($matches[1] . '_to_arg')) {
+          if (function_exists($matches[1] . '_to_arg')) {
             $to_arg_functions[$k] = $matches[1] . '_to_arg';
             $load_functions[$k] = NULL;
             $match = TRUE;
           }
-          if (drupal_function_exists($matches[1] . '_load')) {
+          if (function_exists($matches[1] . '_load')) {
             $function = $matches[1] . '_load';
             // Create an array of arguments that will be passed to the _load
             // function when this menu path is checked, if 'load arguments'
@@ -2635,6 +2636,12 @@ function _menu_router_build($callbacks) 
           if (!isset($item['page arguments']) && isset($parent['page arguments'])) {
             $item['page arguments'] = $parent['page arguments'];
           }
+          if (!isset($item['file']) && isset($parent['file'])) {
+            $item['file'] = $parent['file'];
+          }
+          if (!isset($item['file path']) && isset($parent['file path'])) {
+            $item['file path'] = $parent['file path'];
+          }
         }
       }
     }
@@ -2662,7 +2669,17 @@ function _menu_router_build($callbacks) 
       'tab_parent' => '',
       'tab_root' => $path,
       'path' => $path,
+      'file' => '',
+      'file path' => '',
+      'include file' => '',
+      'module' => '',
     );
+
+    // Calculate out the file to be included for each callback, if any.
+    if ($item['file']) {
+      $file_path = $item['file path'] ? $item['file path'] : drupal_get_path('module', $item['module']);
+      $item['include file'] = $file_path . '/' . $item['file'];
+    }
   }
 
   // Sort the masks so they are in order of descending fit.
@@ -2701,6 +2718,7 @@ function _menu_router_save($menu, $masks
       'description',
       'position',
       'weight',
+      'file',
     ));
 
   foreach ($menu as $path => $item) {
@@ -2725,6 +2743,7 @@ function _menu_router_save($menu, $masks
       'description' => $item['description'],
       'position' => $item['position'],
       'weight' => $item['weight'],
+      'file' => $item['include file'],
     ));
   }
   // Execute insert object.

=== modified file 'includes/module.inc'
--- includes/module.inc	2009-08-21 07:50:07 +0000
+++ includes/module.inc	2009-08-22 15:40:02 +0000
@@ -6,24 +6,15 @@
  * API for loading and interacting with Drupal modules.
  */
 
-/**
- * Pass this to module_implements when its cache needs to be written.
- */
-define('MODULE_IMPLEMENTS_WRITE_CACHE', -1);
-
-/**
- * Pass this to module_implements when its cache needs to be cleared.
- */
-define('MODULE_IMPLEMENTS_CLEAR_CACHE', -2);
-
 
 /**
  * Load all the modules that have been enabled in the system table.
  */
-function module_load_all() {
-  foreach (module_list(TRUE) as $module) {
+function module_load_all($bootstrap = FALSE) {
+  foreach (module_list(TRUE, $bootstrap) as $module) {
     drupal_load('module', $module);
   }
+  module_implements('', FALSE, TRUE);
 }
 
 /**
@@ -33,6 +24,9 @@ function module_load_all() {
  * @param $refresh
  *   Whether to force the module list to be regenerated (such as after the
  *   administrator has changed the system settings).
+ * @param $bootstrap
+ *   Whether to return the reduced set of modules loaded in "bootstrap mode"
+ *   for cached pages. See bootstrap.inc.
  * @param $sort
  *   By default, modules are ordered by weight and module name. Set this option
  *   to TRUE to return a module list ordered only by module name.
@@ -43,7 +37,7 @@ function module_load_all() {
  *   An associative array whose keys and values are the names of all loaded
  *   modules.
  */
-function module_list($refresh = FALSE, $sort = FALSE, $fixed_list = NULL) {
+function module_list($refresh = FALSE, $bootstrap = TRUE, $sort = FALSE, $fixed_list = NULL) {
   static $list = array(), $sorted_list;
 
   if (empty($list) || $refresh || $fixed_list) {
@@ -61,7 +55,12 @@ function module_list($refresh = FALSE, $
       // Drupal installations, which might have modules installed in different
       // locations in the file system. The ordering here must also be
       // consistent with the one used in module_implements().
-      $result = db_query("SELECT name, filename FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, name ASC");
+      if ($bootstrap) {
+        $result = db_query("SELECT name, filename FROM {system} WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, name ASC");
+      }
+      else {
+        $result = db_query("SELECT name, filename FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, name ASC");
+      }
       foreach ($result as $module) {
         if (file_exists($module->filename)) {
           drupal_get_filename('module', $module->name, $module->filename);
@@ -164,7 +163,7 @@ function module_load_include($type, $mod
     $name = $module;
   }
 
-  if (drupal_function_exists('drupal_get_path')) {
+  if (function_exists('drupal_get_path')) {
     $file = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$name.$type";
     if (is_file($file)) {
       require_once $file;
@@ -219,7 +218,7 @@ function module_enable($module_list, $di
 
   if (!empty($invoke_modules)) {
     // Refresh the module list to include the new enabled module.
-    module_list(TRUE);
+    module_list(TRUE, FALSE);
     // Force to regenerate the stored list of hook implementations.
     registry_rebuild();
 
@@ -235,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 (function_exists('node_access_needs_rebuild') && !node_access_needs_rebuild() && module_hook($module, 'node_grants')) {
       node_access_needs_rebuild(TRUE);
     }
   }
@@ -279,7 +278,7 @@ function module_disable($module_list) {
     // so we can still call module hooks to get information.
     module_invoke_all('modules_disabled', $invoke_modules);
     // Refresh the module list to exclude the disabled modules.
-    module_list(TRUE);
+    module_list(TRUE, FALSE);
     // Force to regenerate the stored list of hook implementations.
     registry_rebuild();
   }
@@ -324,119 +323,49 @@ function module_disable($module_list) {
  *   implemented in that module.
  */
 function module_hook($module, $hook) {
-  $function = $module . '_' . $hook;
-  return function_exists($function) || drupal_function_exists($function);
+  return function_exists($module . '_' . $hook);
 }
 
 /**
  * Determine which modules are implementing a hook.
  *
  * @param $hook
- *   The name of the hook (e.g. "help" or "menu"). Special cases:
- *     MODULE_IMPLEMENTS_CLEAR_CACHE: Force the stored list of hook
- *   implementations to be regenerated (such as after enabling a new module,
- *     before processing hook_enable).
- *     MODULE_IMPLEMENTS_WRITE_CACHE: Write the stored list of hook
- *     implementations into the cache_registry table.
+ *   The name of the hook (e.g. "help" or "menu").
  * @param $sort
- *   By default, modules are ordered by weight and module name. By setting this
- *   option to TRUE, modules will be ordered by module name.
+ *   By default, modules are ordered by weight and filename, settings this option
+ *   to TRUE, module list will be ordered by module name.
+ * @param $refresh
+ *   For internal use only: Whether to force the stored list of hook
+ *   implementations to be regenerated (such as after enabling a new module,
+ *   before processing hook_enable).
  * @return
  *   An array with the names of the modules which are implementing this hook.
- *   All enabled modules are taken into consideration and the files containing
- *   the implementations are loaded as necessary.
  */
-function module_implements($hook, $sort = FALSE) {
-  static $implementations = array(), $sorted_implementations = array(), $loaded = array(), $cached_hooks = 0, $maintenance;
+function module_implements($hook, $sort = FALSE, $refresh = FALSE) {
+  static $implementations;
 
-  // Use a static variable for maintenance mode to avoid the overhead of
-  // calling defined() each time the function is called.
-  if (!isset($maintenance)) {
-    $maintenance = defined('MAINTENANCE_MODE');
-  }
-
-  if ($maintenance) {
-    return _module_implements_maintenance($hook, $sort);
-  }
-  if ($hook === MODULE_IMPLEMENTS_CLEAR_CACHE) {
+  if ($refresh) {
     $implementations = array();
-    $sorted_implementations = array();
-    $loaded = array();
-    $cached_hooks = 0;
-    cache_clear_all('hooks', 'cache_registry');
-    return;
-  }
-  if ($hook === MODULE_IMPLEMENTS_WRITE_CACHE) {
-    // Only write this to cache if we loaded new implementations.
-    if (count($implementations) > $cached_hooks) {
-      cache_set('hooks', $implementations, 'cache_registry');
-    }
     return;
   }
 
-  if (!isset($loaded[$hook])) {
-    if (empty($implementations) && ($cache = cache_get('hooks', 'cache_registry'))) {
-      $implementations = $cache->data;
-      $cached_hooks = count($implementations);
-    }
-    if (!isset($implementations[$hook])) {
-      // The module name (rather than the filename) is used as the fallback
-      // weighting in order to guarantee consistent behavior across different
-      // Drupal installations, which might have modules installed in different
-      // locations in the file system. The ordering here must also be
-      // consistent with the one used in module_list().
-      $implementations[$hook] = db_query("SELECT module FROM {registry} WHERE type = 'function' AND suffix = :hook ORDER BY weight, module", array(':hook' => $hook))->fetchCol();
-    }
-    foreach ($implementations[$hook] as $module) {
-      $function = $module . '_' . $hook;
-      if (!function_exists($function)) {
-        drupal_function_exists($function);
+  if (!isset($implementations[$hook])) {
+    $implementations[$hook] = array();
+    $list = module_list(FALSE, FALSE, $sort);
+    foreach ($list as $module) {
+      if (module_hook($module, $hook)) {
+        $implementations[$hook][] = $module;
       }
     }
-    $loaded[$hook] = TRUE;
   }
 
-  if ($sort) {
-    if (!isset($sorted_implementations[$hook])) {
-      $sorted_implementations[$hook] = $implementations[$hook];
-      sort($sorted_implementations[$hook]);
-    }
-    return $sorted_implementations[$hook];
-  }
-  else {
-    return $implementations[$hook];
-  }
-}
-
-/**
- * This is the maintenance version of module_implements for internal use only.
- *
- * This function is called whenever MAINTENANCE_MODE is defined and is a
- * safe code path for Drupal installation or upgrade because it does not use
- * the database, instead it uses module_list. @see module_list $fixed_list on
- * how to make module_list also DB independent.
- *
- * @param $hook
- *   The name of the hook (e.g. "help" or "menu").
- * @param $sort
- *   By default, modules are ordered by weight and filename, settings this
- *   option to TRUE, module list will be ordered by module name.
- * @return
- *   An array with the names of the modules which are implementing this hook.
- *   Only enabled and already loaded modules are taken into consideration.
- */
-function _module_implements_maintenance($hook, $sort = FALSE) {
-  $implementations = array();
-  foreach (module_list() as $module) {
-    $function = $module . '_' . $hook;
-    if (function_exists($function)) {
-      $implementations[] = $module;
-    }
-    if ($sort) {
-      sort($implementations);
-    }
-  }
-  return $implementations;
+  // The explicit cast forces a copy to be made. This is needed because
+  // $implementations[$hook] is only a reference to an element of
+  // $implementations and if there are nested foreaches (due to nested node
+  // API calls, for example), they would both manipulate the same array's
+  // references, which causes some modules' hooks not to be called.
+  // See also http://www.zend.com/zend/art/ref-count.php.
+  return (array)$implementations[$hook];
 }
 
 /**
@@ -478,7 +407,7 @@ function module_invoke_all() {
   $return = array();
   foreach (module_implements($hook) as $module) {
     $function = $module . '_' . $hook;
-    if (drupal_function_exists($function)) {
+    if (function_exists($function)) {
       $result = call_user_func_array($function, $args);
       if (isset($result) && is_array($result)) {
         $return = array_merge_recursive($return, $result);

=== modified file 'includes/registry.inc'
--- includes/registry.inc	2009-08-17 19:14:39 +0000
+++ includes/registry.inc	2009-08-22 15:04:51 +0000
@@ -13,7 +13,7 @@
  *
  * Drupal maintains an internal registry of all functions or classes in the
  * system, allowing it to lazy-load code files as needed (reducing the amount
- * of code that must be parsed on each request). 
+ * of code that must be parsed on each request).
  */
 
 /**
@@ -34,9 +34,6 @@ function _registry_rebuild() {
   require_once DRUPAL_ROOT . '/includes/database/select.inc';
   require_once DRUPAL_ROOT . '/includes/database/' . $driver . '/query.inc';
 
-  // Reset the resources cache.
-  _registry_get_resource_name();
-
   // Get current list of modules and their files.
   $modules = system_get_module_data();
   // Get the list of files we are going to parse.
@@ -96,9 +93,9 @@ function _registry_rebuild() {
       $unchanged_resources[$key] = $file;
     }
   }
+  module_implements('', FALSE, TRUE);
   _registry_check_code(REGISTRY_RESET_LOOKUP_CACHE);
 
-  module_implements(MODULE_IMPLEMENTS_CLEAR_CACHE);
   cache_clear_all('*', 'cache_registry', TRUE);
 
   // We have some unchanged resources, warm up the cache - no need to pay
@@ -163,123 +160,23 @@ function _registry_parse_files($files) {
  *   (optional) Weight of the module.
  */
 function _registry_parse_file($filename, $contents, $module = '', $weight = 0) {
-  $map = &drupal_static(__FUNCTION__, array(T_FUNCTION => 'function', T_CLASS => 'class', T_INTERFACE => 'interface'));
+  static $map = array(T_CLASS => 'class', T_INTERFACE => 'interface');
   // Delete registry entries for this file, so we can insert the new resources.
   db_delete('registry')
     ->condition('filename', $filename)
     ->execute();
-  $tokens = token_get_all($contents);
-  while ($token = next($tokens)) {
-    // Ignore all tokens except for those we are specifically saving.
-    if (is_array($token) && isset($map[$token[0]])) {
-      $type = $map[$token[0]];
-      if ($resource_name = _registry_get_resource_name($tokens, $type)) {
-        $suffix = '';
-        // Collect the part of the function name after the module name,
-        // so that we can query the registry for possible hook implementations.
-        if ($type == 'function' && !empty($module)) {
-          $n = strlen($module);
-          if (substr($resource_name, 0, $n) == $module) {
-            $suffix = substr($resource_name, $n + 1);
-          }
-        }
-        $fields = array(
-          'filename' => $filename,
-          'module' => $module,
-          'suffix' => $suffix,
-          'weight' => $weight,
-        );
-        // Because some systems, such as cache, currently use duplicate function
-        // names in separate files an insert query cannot be used here as it
-        // would cause a key constraint violation. Instead we use a merge query.
-        // In practice this should not be an issue as those systems all initialize
-        // pre-registry and therefore are never loaded by the registry so it
-        // doesn't matter if those records in the registry table point to one
-        // filename instead of another.
-        // TODO: Convert this back to an insert query after all duplicate
-        // function names have been purged from Drupal.
-        db_merge('registry')
-          ->key(array('name' => $resource_name, 'type' => $type))
-          ->fields($fields)
-          ->execute();
-
-        // We skip the body because classes may contain functions.
-        _registry_skip_body($tokens);
-      }
-    }
-  }
-}
-
-/**
- * Derive the name of the next resource in the token stream.
- *
- * When called without arguments, it resets its static cache.
- *
- * @param $tokens
- *  The collection of tokens for the current file being parsed.
- * @param $type
- *  The human-readable token name, either: "function", "class", or "interface".
- * @return
- *  The name of the resource, or FALSE if the resource has already been processed.
- */
-function _registry_get_resource_name(&$tokens = NULL, $type = NULL) {
-  // Keep a running list of all resources we've saved so far, so that we never
-  // save one more than once.
-  $resources = &drupal_static(__FUNCTION__);
-
-  if (!isset($tokens)) {
-    $resources = array();
-    return;
-  }
-  // Determine the name of the resource.
-  next($tokens); // Eat a space.
-  $token = next($tokens);
-  if ($token == '&') {
-    $token = next($tokens);
-  }
-  $resource_name = $token[1];
-
-  // Ensure that we never save it more than once.
-  if (isset($resources[$type][$resource_name])) {
-    return FALSE;
-  }
-  $resources[$type][$resource_name] = TRUE;
-
-  return $resource_name;
-}
-
-/**
- * Skip the body of a code block, as defined by { and }.
- *
- * This function assumes that the body starts at the next instance
- * of { from the current position.
- *
- * @param $tokens
- */
-function _registry_skip_body(&$tokens) {
-  $num_braces = 1;
-
-  $token = '';
-  // Get to the first open brace.
-  while ($token != '{' && ($token = next($tokens)));
-
-  // Scan through the rest of the tokens until we reach the matching
-  // end brace.
-  while ($num_braces && ($token = next($tokens))) {
-    // PHP is really logical to have three different tokens for { with
-    // inconsistent names and only one for a closing brace.
-    if ($token == '{' || (is_array($token) && ($token[0] == T_DOLLAR_OPEN_CURLY_BRACES || $token[0] == T_CURLY_OPEN))) {
-      ++$num_braces;
-    }
-    elseif ($token == '}') {
-      --$num_braces;
-    }
-    // Consume strings manually as workaround for a bug in PHP < 5.2.3 (see
-    // http://drupal.org/node/368116).
-    elseif ($token == '"' || $token == '`' || (is_array($token) && $token[0] == T_START_HEREDOC)) {
-      $stop = is_array($token) ? T_END_HEREDOC : $token;
-      while (($token = next($tokens)) && (is_array($token) ? $token[0] : $token) != $stop);
+  if (preg_match_all('/^\s*(?:abstract)?\s*(class|interface)\s+([a-zA-Z0-9_]+)/m', $contents, $matches)) {
+    $query = db_insert('registry')->fields(array('name', 'type', 'filename', 'module', 'weight'));
+    foreach ($matches[2] as $key => $name) {
+      $query->values(array(
+        'name' => $name,
+        'type' => $matches[1][$key],
+        'filename' => $filename,
+        'module' => $module,
+        'weight' => $weight,
+      ));
     }
+    $query->execute();
   }
 }
 

=== modified file 'includes/stream_wrappers.inc'
--- includes/stream_wrappers.inc	2009-08-17 19:14:39 +0000
+++ includes/stream_wrappers.inc	2009-08-22 18:40:25 +0000
@@ -194,7 +194,8 @@ abstract class DrupalLocalStreamWrapper 
   static function getMimeType($uri, $mapping = NULL) {
     if (!isset($mapping)) {
       $mapping = variable_get('mime_extension_mapping', NULL);
-      if (!isset($mapping) && drupal_function_exists('file_default_mimetype_mapping')) {
+      if (!isset($mapping)) {
+        include_once DRUPAL_ROOT . '/includes/file.mimetypes.inc';
         // The default file map, defined in file.mimetypes.inc is quite big.
         // We only load it when necessary.
         $mapping = file_default_mimetype_mapping();

=== modified file 'includes/theme.inc'
--- includes/theme.inc	2009-08-22 15:55:37 +0000
+++ includes/theme.inc	2009-08-22 17:45:47 +0000
@@ -189,7 +189,7 @@ function _drupal_theme_initialize($theme
     }
   }
 
-  if (drupal_function_exists($registry_callback)) {
+  if (function_exists($registry_callback)) {
     $registry_callback($theme, $base_theme, $theme_engine);
   }
 }
@@ -322,7 +322,6 @@ function _theme_process_registry(&$cache
 
   if (function_exists($function)) {
     $result = $function($cache, $type, $theme, $path);
-
     foreach ($result as $hook => $info) {
       $result[$hook]['type'] = $type;
       $result[$hook]['theme path'] = $path;
@@ -336,12 +335,14 @@ function _theme_process_registry(&$cache
       // functions on behalf of core .include files.
       // All files are included to be safe. Conditionally included
       // files can prevent them from getting registered.
-      if (isset($info['file']) && !isset($info['path'])) {
-        $result[$hook]['file'] = $path . '/' . $info['file'];
-        include_once DRUPAL_ROOT . '/' . $result[$hook]['file'];
+      if (isset($cache[$hook]['includes'])) {
+        $result[$hook]['includes'] = $cache[$hook]['includes'];
       }
-      elseif (isset($info['file']) && isset($info['path'])) {
-        include_once DRUPAL_ROOT . '/' . $info['path'] . '/' . $info['file'];
+      if (isset($info['file'])) {
+        $include_file = isset($info['path']) ? $info['path'] : $path;
+        $include_file .= '/' . $info['file'];
+        include_once DRUPAL_ROOT . '/' . $include_file;
+        $result[$hook]['includes'][] = $include_file;
       }
 
       // If 'arguments' have been defined previously, carry them forward.
@@ -760,12 +761,10 @@ function theme() {
   $theme_path = $info['theme path'];
 
   // Include a file if the theme function or variable processor is held elsewhere.
-  if (!empty($info['file'])) {
-    $include_file = $info['file'];
-    if (isset($info['path'])) {
-      $include_file = $info['path'] . '/' . $include_file;
+  if (!empty($info['includes'])) {
+    foreach ($info['includes'] as $include_file) {
+      include_once DRUPAL_ROOT . '/' . $include_file;
     }
-    include_once DRUPAL_ROOT . '/' . $include_file;
   }
   if (isset($info['function'])) {
     // The theme call is a function.
@@ -804,7 +803,7 @@ function theme() {
         foreach (array('preprocess functions', 'process functions') as $phase) {
           if (!empty($info[$phase])) {
             foreach ($info[$phase] as $processor_function) {
-              if (drupal_function_exists($processor_function)) {
+              if (function_exists($processor_function)) {
                 $processor_function($variables, $hook_clone);
               }
             }
@@ -830,7 +829,7 @@ function theme() {
           $suggestions[] = $variables['theme_function'];
         }
         foreach (array_reverse($suggestions) as $suggestion) {
-          if (drupal_function_exists($suggestion)) {
+          if (function_exists($suggestion)) {
             $info['function'] = $suggestion;
             break;
           }
@@ -842,7 +841,7 @@ function theme() {
     }
 
     // Call the function.
-    if (drupal_function_exists($info['function'])) {
+    if (function_exists($info['function'])) {
       $output = call_user_func_array($info['function'], $args);
     }
   }
@@ -885,7 +884,7 @@ function theme() {
     foreach (array('preprocess functions', 'process functions') as $phase) {
       if (!empty($info[$phase])) {
         foreach ($info[$phase] as $processor_function) {
-          if (drupal_function_exists($processor_function)) {
+          if (function_exists($processor_function)) {
             call_user_func_array($processor_function, $args);
           }
         }

=== modified file 'includes/theme.maintenance.inc'
--- includes/theme.maintenance.inc	2009-08-04 07:04:21 +0000
+++ includes/theme.maintenance.inc	2009-08-22 15:07:11 +0000
@@ -41,7 +41,7 @@ function _drupal_maintenance_theme() {
       // bootstrap just enough to allow hook invocations to work.
       $module_list['system']['filename'] = 'modules/system/system.module';
       $module_list['filter']['filename'] = 'modules/filter/filter.module';
-      module_list(TRUE, FALSE, $module_list);
+      module_list(TRUE, FALSE, FALSE, $module_list);
       drupal_load('module', 'system');
       drupal_load('module', 'filter');
     }

=== modified file 'includes/token.inc'
--- includes/token.inc	2009-08-19 20:19:36 +0000
+++ includes/token.inc	2009-08-22 15:04:51 +0000
@@ -81,7 +81,7 @@ function token_replace($text, array $dat
   }
 
   // Optionally alter the list of replacement values.
-  if (!empty($options['callback']) && drupal_function_exists($options['callback'])) {
+  if (!empty($options['callback']) && function_exists($options['callback'])) {
     $function = $options['callback'];
     $function($replacements, $data, $options);
   }
@@ -156,7 +156,7 @@ function token_generate($type, array $to
 
   foreach (module_implements('tokens') as $module) {
     $function = $module . '_tokens';
-    if (drupal_function_exists($function)) {
+    if (function_exists($function)) {
       $result = $function($type, $tokens, $data, $options);
       foreach ($result as $original => $replacement) {
         $results[$original] = $replacement;

=== modified file 'includes/xmlrpcs.inc'
--- includes/xmlrpcs.inc	2009-06-12 08:44:45 +0000
+++ includes/xmlrpcs.inc	2009-08-22 15:04:51 +0000
@@ -200,7 +200,7 @@ function xmlrpc_server_call($xmlrpc_serv
     }
   }
 
-  if (!drupal_function_exists($method)) {
+  if (!function_exists($method)) {
     return xmlrpc_error(-32601, t('Server error. Requested function @method does not exist.', array("@method" => $method)));
   }
   // Call the mapped function

=== modified file 'install.php'
--- install.php	2009-08-22 14:34:17 +0000
+++ install.php	2009-08-22 17:45:47 +0000
@@ -250,7 +250,7 @@ function install_begin_request(&$install
   include_once DRUPAL_ROOT . '/includes/session.inc';
   $module_list['system']['filename'] = 'modules/system/system.module';
   $module_list['filter']['filename'] = 'modules/filter/filter.module';
-  module_list(TRUE, FALSE, $module_list);
+  module_list(TRUE, FALSE, FALSE, $module_list);
   drupal_load('module', 'system');
   drupal_load('module', 'filter');
 

=== modified file 'modules/aggregator/aggregator.module'
--- modules/aggregator/aggregator.module	2009-07-30 19:24:20 +0000
+++ modules/aggregator/aggregator.module	2009-08-22 15:04:51 +0000
@@ -91,6 +91,7 @@ function aggregator_menu() {
     'description' => "Configure which content your site aggregates from other sites, how often it polls them, and how they're categorized.",
     'page callback' => 'aggregator_admin_overview',
     'access arguments' => array('administer news feeds'),
+    'file' => 'aggregator.admin.inc',
   );
   $items['admin/settings/aggregator/add/feed'] = array(
     'title' => 'Add feed',
@@ -99,6 +100,7 @@ function aggregator_menu() {
     'access arguments' => array('administer news feeds'),
     'type' => MENU_LOCAL_TASK,
     'parent' => 'admin/settings/aggregator',
+    'file' => 'aggregator.admin.inc',
   );
   $items['admin/settings/aggregator/add/category'] = array(
     'title' => 'Add category',
@@ -107,6 +109,7 @@ function aggregator_menu() {
     'access arguments' => array('administer news feeds'),
     'type' => MENU_LOCAL_TASK,
     'parent' => 'admin/settings/aggregator',
+    'file' => 'aggregator.admin.inc',
   );
   $items['admin/settings/aggregator/add/opml'] = array(
     'title' => 'Import OPML',
@@ -115,6 +118,7 @@ function aggregator_menu() {
     'access arguments' => array('administer news feeds'),
     'type' => MENU_LOCAL_TASK,
     'parent' => 'admin/settings/aggregator',
+    'file' => 'aggregator.admin.inc',
   );
   $items['admin/settings/aggregator/remove/%aggregator_feed'] = array(
     'title' => 'Remove items',
@@ -122,6 +126,7 @@ function aggregator_menu() {
     'page arguments' => array('aggregator_admin_remove_feed', 4),
     'access arguments' => array('administer news feeds'),
     'type' => MENU_CALLBACK,
+    'file' => 'aggregator.admin.inc',
   );
   $items['admin/settings/aggregator/update/%aggregator_feed'] = array(
     'title' => 'Update items',
@@ -129,6 +134,7 @@ function aggregator_menu() {
     'page arguments' => array(4),
     'access arguments' => array('administer news feeds'),
     'type' => MENU_CALLBACK,
+    'file' => 'aggregator.admin.inc',
   );
   $items['admin/settings/aggregator/list'] = array(
     'title' => 'List',
@@ -141,34 +147,40 @@ function aggregator_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('aggregator_admin_form'),
     'access arguments' => array('administer news feeds'),
+    'file' => 'aggregator.admin.inc',
   );
   $items['aggregator'] = array(
     'title' => 'Feed aggregator',
     'page callback' => 'aggregator_page_last',
     'access arguments' => array('access news feeds'),
     'weight' => 5,
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/sources'] = array(
     'title' => 'Sources',
     'page callback' => 'aggregator_page_sources',
     'access arguments' => array('access news feeds'),
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/categories'] = array(
     'title' => 'Categories',
     'page callback' => 'aggregator_page_categories',
     'access callback' => '_aggregator_has_categories',
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/rss'] = array(
     'title' => 'RSS feed',
     'page callback' => 'aggregator_page_rss',
     'access arguments' => array('access news feeds'),
     'type' => MENU_CALLBACK,
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/opml'] = array(
     'title' => 'OPML feed',
     'page callback' => 'aggregator_page_opml',
     'access arguments' => array('access news feeds'),
     'type' => MENU_CALLBACK,
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/categories/%aggregator_category'] = array(
     'title callback' => '_aggregator_category_title',
@@ -177,6 +189,7 @@ function aggregator_menu() {
     'page arguments' => array(2),
     'access callback' => 'user_access',
     'access arguments' => array('access news feeds'),
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/categories/%aggregator_category/view'] = array(
     'title' => 'View',
@@ -189,6 +202,7 @@ function aggregator_menu() {
     'page arguments' => array('aggregator_page_category', 2),
     'access arguments' => array('administer news feeds'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/categories/%aggregator_category/configure'] = array(
     'title' => 'Configure',
@@ -197,12 +211,14 @@ function aggregator_menu() {
     'access arguments' => array('administer news feeds'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 1,
+    'file' => 'aggregator.admin.inc',
   );
   $items['aggregator/sources/%aggregator_feed'] = array(
     'page callback' => 'aggregator_page_source',
     'page arguments' => array(2),
     'access arguments' => array('access news feeds'),
     'type' => MENU_CALLBACK,
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/sources/%aggregator_feed/view'] = array(
     'title' => 'View',
@@ -215,6 +231,7 @@ function aggregator_menu() {
     'page arguments' => array('aggregator_page_source', 2),
     'access arguments' => array('administer news feeds'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'aggregator.pages.inc',
   );
   $items['aggregator/sources/%aggregator_feed/configure'] = array(
     'title' => 'Configure',
@@ -223,6 +240,7 @@ function aggregator_menu() {
     'access arguments' => array('administer news feeds'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 1,
+    'file' => 'aggregator.admin.inc',
   );
   $items['admin/settings/aggregator/edit/feed/%aggregator_feed'] = array(
     'title' => 'Edit feed',
@@ -230,6 +248,7 @@ function aggregator_menu() {
     'page arguments' => array('aggregator_form_feed', 5),
     'access arguments' => array('administer news feeds'),
     'type' => MENU_CALLBACK,
+    'file' => 'aggregator.admin.inc',
   );
   $items['admin/settings/aggregator/edit/category/%aggregator_category'] = array(
     'title' => 'Edit category',
@@ -237,6 +256,7 @@ function aggregator_menu() {
     'page arguments' => array('aggregator_form_category', 5),
     'access arguments' => array('administer news feeds'),
     'type' => MENU_CALLBACK,
+    'file' => 'aggregator.admin.inc',
   );
 
   return $items;
@@ -555,7 +575,7 @@ function aggregator_refresh($feed) {
     }
   }
   // Expire old feed items.
-  if (drupal_function_exists('aggregator_expire')) {
+  if (function_exists('aggregator_expire')) {
     aggregator_expire($feed);
   }
 }

=== modified file 'modules/block/block.module'
--- modules/block/block.module	2009-08-22 13:25:37 +0000
+++ modules/block/block.module	2009-08-22 15:04:51 +0000
@@ -125,6 +125,7 @@ function block_menu() {
     'description' => 'Configure what block content appears in your site\'s sidebars and other regions.',
     'page callback' => 'block_admin_display',
     'access arguments' => array('administer blocks'),
+    'file' => 'block.admin.inc',
   );
   $items['admin/structure/block/list'] = array(
     'title' => 'List',
@@ -136,6 +137,7 @@ function block_menu() {
     'page callback' => 'block_admin_display_js',
     'access arguments' => array('administer blocks'),
     'type' => MENU_CALLBACK,
+    'file' => 'block.admin.inc',
   );
   $items['admin/structure/block/configure'] = array(
     'title' => 'Configure block',
@@ -143,6 +145,7 @@ function block_menu() {
     'page arguments' => array('block_admin_configure'),
     'access arguments' => array('administer blocks'),
     'type' => MENU_CALLBACK,
+    'file' => 'block.admin.inc',
   );
   $items['admin/structure/block/delete'] = array(
     'title' => 'Delete block',
@@ -150,6 +153,7 @@ function block_menu() {
     'page arguments' => array('block_box_delete'),
     'access arguments' => array('administer blocks'),
     'type' => MENU_CALLBACK,
+    'file' => 'block.admin.inc',
   );
   $items['admin/structure/block/add'] = array(
     'title' => 'Add block',
@@ -157,6 +161,7 @@ function block_menu() {
     'page arguments' => array('block_add_block_form'),
     'access arguments' => array('administer blocks'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'block.admin.inc',
   );
   $default = variable_get('theme_default', 'garland');
   foreach (list_themes() as $key => $theme) {

=== modified file 'modules/blog/blog.module'
--- modules/blog/blog.module	2009-08-22 14:34:17 +0000
+++ modules/blog/blog.module	2009-08-22 17:45:48 +0000
@@ -94,6 +94,7 @@ function blog_menu() {
     'page callback' => 'blog_page_last',
     'access arguments' => array('access content'),
     'type' => MENU_SUGGESTED_ITEM,
+    'file' => 'blog.pages.inc',
   );
   $items['blog/%user_uid_optional'] = array(
     'title' => 'My blog',
@@ -101,6 +102,7 @@ function blog_menu() {
     'page arguments' => array(1),
     'access callback' => 'blog_page_user_access',
     'access arguments' => array(1),
+    'file' => 'blog.pages.inc',
   );
   $items['blog/%user/feed'] = array(
     'title' => 'Blogs',
@@ -109,12 +111,14 @@ function blog_menu() {
     'access callback' => 'blog_page_user_access',
     'access arguments' => array(1),
     'type' => MENU_CALLBACK,
+    'file' => 'blog.pages.inc',
   );
   $items['blog/feed'] = array(
     'title' => 'Blogs',
     'page callback' => 'blog_feed_last',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    'file' => 'blog.pages.inc',
   );
 
   return $items;

=== modified file 'modules/blogapi/blogapi.test'
--- modules/blogapi/blogapi.test	2009-08-17 19:14:39 +0000
+++ modules/blogapi/blogapi.test	2009-08-22 15:04:51 +0000
@@ -14,7 +14,7 @@ class BlogAPITestCase extends DrupalWebT
     parent::setUp('blog', 'blogapi', 'taxonomy');
 
     // Force loading the xmlrpc.inc to have the xmlrpc() function.
-    drupal_function_exists('xmlrpc');
+    function_exists('xmlrpc');
   }
 
   /**

=== modified file 'modules/book/book.module'
--- modules/book/book.module	2009-08-22 14:34:17 +0000
+++ modules/book/book.module	2009-08-22 17:45:48 +0000
@@ -105,6 +105,7 @@ function book_menu() {
     'page callback' => 'book_admin_overview',
     'access arguments' => array('administer book outlines'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'book.admin.inc',
   );
   $items['admin/content/book/list'] = array(
     'title' => 'List',
@@ -117,6 +118,7 @@ function book_menu() {
     'access arguments' => array('administer site configuration'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 8,
+    'file' => 'book.admin.inc',
   );
   $items['admin/content/book/%node'] = array(
     'title' => 'Re-order book pages and change titles',
@@ -125,18 +127,21 @@ function book_menu() {
     'access callback' => '_book_outline_access',
     'access arguments' => array(3),
     'type' => MENU_CALLBACK,
+    'file' => 'book.admin.inc',
   );
   $items['book'] = array(
     'title' => 'Books',
     'page callback' => 'book_render',
     'access arguments' => array('access content'),
     'type' => MENU_SUGGESTED_ITEM,
+    'file' => 'book.pages.inc',
   );
   $items['book/export/%/%'] = array(
     'page callback' => 'book_export',
     'page arguments' => array(2, 3),
     'access arguments' => array('access printer-friendly version'),
     'type' => MENU_CALLBACK,
+    'file' => 'book.pages.inc',
   );
   $items['node/%node/outline'] = array(
     'title' => 'Outline',
@@ -146,6 +151,7 @@ function book_menu() {
     'access arguments' => array(1),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
+    'file' => 'book.pages.inc',
   );
   $items['node/%node/outline/remove'] = array(
     'title' => 'Remove from outline',
@@ -154,11 +160,13 @@ function book_menu() {
     'access callback' => '_book_outline_remove_access',
     'access arguments' => array(1),
     'type' => MENU_CALLBACK,
+    'file' => 'book.pages.inc',
   );
   $items['book/js/form'] = array(
     'page callback' => 'book_form_update',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    'file' => 'book.pages.inc',
   );
 
   return $items;

=== modified file 'modules/comment/comment.module'
--- modules/comment/comment.module	2009-08-22 14:34:17 +0000
+++ modules/comment/comment.module	2009-08-22 17:45:48 +0000
@@ -133,6 +133,7 @@ function comment_menu() {
     'page callback' => 'comment_admin',
     'access arguments' => array('administer comments'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'comment.admin.inc',
   );
   // Tabs begin here.
   $items['admin/content/comment/new'] = array(
@@ -151,6 +152,7 @@ function comment_menu() {
     'page callback' => 'comment_delete_page',
     'access arguments' => array('administer comments'),
     'type' => MENU_CALLBACK,
+    'file' => 'comment.admin.inc',
   );
   $items['comment/edit/%comment'] = array(
     'title' => 'Edit comment',
@@ -167,6 +169,7 @@ function comment_menu() {
     'access callback' => 'node_access',
     'access arguments' => array('view', 2),
     'type' => MENU_CALLBACK,
+    'file' => 'comment.pages.inc',
   );
   $items['comment/approve'] = array(
     'title' => 'Approve a comment',
@@ -174,6 +177,7 @@ function comment_menu() {
     'page arguments' => array(2),
     'access arguments' => array('administer comments'),
     'type' => MENU_CALLBACK,
+    'file' => 'comment.pages.inc',
   );
   $items['comment/%comment'] = array(
     'title' => 'Comment permalink',

=== modified file 'modules/contact/contact.module'
--- modules/contact/contact.module	2009-08-12 12:36:03 +0000
+++ modules/contact/contact.module	2009-08-22 15:04:51 +0000
@@ -57,11 +57,13 @@ function contact_menu() {
     'description' => 'Create a system contact form and set up categories for the form to use.',
     'page callback' => 'contact_admin_categories',
     'access arguments' => array('administer site-wide contact form'),
+    'file' => 'contact.admin.inc',
   );
   $items['admin/structure/contact/list'] = array(
     'title' => 'List',
     'page callback' => 'contact_admin_categories',
     'type' => MENU_DEFAULT_LOCAL_TASK,
+    'file' => 'contact.admin.inc',
   );
   $items['admin/structure/contact/add'] = array(
     'title' => 'Add category',
@@ -70,6 +72,7 @@ function contact_menu() {
     'access arguments' => array('administer site-wide contact form'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 1,
+    'file' => 'contact.admin.inc',
   );
   $items['admin/structure/contact/edit/%contact'] = array(
     'title' => 'Edit contact category',
@@ -77,6 +80,7 @@ function contact_menu() {
     'page arguments' => array('contact_admin_edit', 3, 4),
     'access arguments' => array('administer site-wide contact form'),
     'type' => MENU_CALLBACK,
+    'file' => 'contact.admin.inc',
   );
   $items['admin/structure/contact/delete/%contact'] = array(
     'title' => 'Delete contact',
@@ -84,6 +88,7 @@ function contact_menu() {
     'page arguments' => array('contact_admin_delete', 4),
     'access arguments' => array('administer site-wide contact form'),
     'type' => MENU_CALLBACK,
+    'file' => 'contact.admin.inc',
   );
   $items['admin/settings/contact'] = array(
     'title' => 'Contact form',
@@ -91,12 +96,14 @@ function contact_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('contact_admin_settings'),
     'access arguments' => array('administer site-wide contact form'),
+    'file' => 'contact.admin.inc',
   );
   $items['contact'] = array(
     'title' => 'Contact',
     'page callback' => 'contact_site_page',
     'access arguments' => array('access site-wide contact form'),
     'type' => MENU_SUGGESTED_ITEM,
+    'file' => 'contact.pages.inc',
   );
   $items['user/%user/contact'] = array(
     'title' => 'Contact',
@@ -106,6 +113,7 @@ function contact_menu() {
     'access callback' => '_contact_personal_tab_access',
     'access arguments' => array(1),
     'weight' => 2,
+    'file' => 'contact.pages.inc',
   );
   return $items;
 }

=== modified file 'modules/dblog/dblog.admin.inc'
--- modules/dblog/dblog.admin.inc	2009-08-22 14:34:17 +0000
+++ modules/dblog/dblog.admin.inc	2009-08-22 18:16:45 +0000
@@ -7,20 +7,6 @@
  */
 
 /**
- * Implement hook_form_FORM_ID_alter().
- */
-function dblog_form_system_logging_settings_alter(&$form, $form_state) {
-  $form['dblog_row_limit'] = array(
-    '#type' => 'select',
-    '#title' => t('Database log entries to keep'),
-    '#default_value' => variable_get('dblog_row_limit', 1000),
-    '#options' => drupal_map_assoc(array(100, 1000, 10000, 100000, 1000000)),
-    '#description' => t('The maximum number of entries to keep in the database log. Requires a <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status')))
-  );
-  $form['buttons']['#weight'] = 1;
-}
-
-/**
  * Menu callback; displays a listing of log messages.
  */
 function dblog_overview() {
@@ -93,9 +79,9 @@ function dblog_overview() {
   }
 
   $build['dblog_table'] = array(
-    '#theme' => 'table', 
-    '#header' => $header, 
-    '#rows' => $rows, 
+    '#theme' => 'table',
+    '#header' => $header,
+    '#rows' => $rows,
     '#attributes' => array('id' => 'admin-dblog'),
   );
   $build['dblog_pager'] = array('#theme' => 'pager');
@@ -139,8 +125,8 @@ function dblog_top($type) {
   }
 
   $build['dblog_top_table']  = array(
-    '#theme' => 'table', 
-    '#header' => $header, 
+    '#theme' => 'table',
+    '#header' => $header,
     '#rows' => $rows,
   );
   $build['dblog_top_pager'] = array('#theme' => 'pager');
@@ -194,8 +180,8 @@ function dblog_event($id) {
       ),
     );
     $build['dblog_table'] = array(
-      '#theme' => 'table', 
-      '#rows' => $rows, 
+      '#theme' => 'table',
+      '#rows' => $rows,
       '#attributes' => array('class' => array('dblog-event')),
     );
     return $build;

=== modified file 'modules/dblog/dblog.module'
--- modules/dblog/dblog.module	2009-05-27 18:33:54 +0000
+++ modules/dblog/dblog.module	2009-08-22 18:16:55 +0000
@@ -48,6 +48,7 @@ function dblog_menu() {
     'page callback' => 'dblog_overview',
     'access arguments' => array('access site reports'),
     'weight' => -1,
+    'file' => 'dblog.admin.inc',
   );
   $items['admin/reports/page-not-found'] = array(
     'title' => "Top 'page not found' errors",
@@ -55,6 +56,7 @@ function dblog_menu() {
     'page callback' => 'dblog_top',
     'page arguments' => array('page not found'),
     'access arguments' => array('access site reports'),
+    'file' => 'dblog.admin.inc',
   );
   $items['admin/reports/access-denied'] = array(
     'title' => "Top 'access denied' errors",
@@ -62,6 +64,7 @@ function dblog_menu() {
     'page callback' => 'dblog_top',
     'page arguments' => array('access denied'),
     'access arguments' => array('access site reports'),
+    'file' => 'dblog.admin.inc',
   );
   $items['admin/reports/event/%'] = array(
     'title' => 'Details',
@@ -69,6 +72,7 @@ function dblog_menu() {
     'page arguments' => array(3),
     'access arguments' => array('access site reports'),
     'type' => MENU_CALLBACK,
+    'file' => 'dblog.admin.inc',
   );
   return $items;
 }
@@ -149,6 +153,20 @@ function dblog_watchdog(array $log_entry
 }
 
 /**
+ * Implement hook_form_FORM_ID_alter().
+ */
+function dblog_form_system_logging_settings_alter(&$form, $form_state) {
+  $form['dblog_row_limit'] = array(
+    '#type' => 'select',
+    '#title' => t('Database log entries to keep'),
+    '#default_value' => variable_get('dblog_row_limit', 1000),
+    '#options' => drupal_map_assoc(array(100, 1000, 10000, 100000, 1000000)),
+    '#description' => t('The maximum number of entries to keep in the database log. Requires a <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status')))
+  );
+  $form['buttons']['#weight'] = 1;
+}
+
+/**
  * Theme dblog administration filter selector.
  *
  * @ingroup themeable

=== modified file 'modules/field/field.attach.inc'
--- modules/field/field.attach.inc	2009-08-22 00:58:52 +0000
+++ modules/field/field.attach.inc	2009-08-22 15:04:51 +0000
@@ -207,7 +207,7 @@ function _field_invoke($op, $obj_type, $
 
       // Invoke the field hook and collect results.
       $function = $options['default'] ? 'field_default_' . $op : $field['module'] . '_field_' . $op;
-      if (drupal_function_exists($function)) {
+      if (function_exists($function)) {
         // Iterate over all the field translations.
         foreach ($field_translations as $langcode => $items) {
           $result = $function($obj_type, $object, $field, $instance, $langcode, $items, $a, $b);
@@ -336,7 +336,7 @@ function _field_invoke_multiple($op, $ob
   foreach ($fields as $field_id => $field) {
     $field_name = $field['field_name'];
     $function = $options['default'] ? 'field_default_' . $op : $field['module'] . '_field_' . $op;
-    if (drupal_function_exists($function)) {
+    if (function_exists($function)) {
       // Iterate over all the field translations.
       foreach ($grouped_items[$field_id] as $langcode => $items) {
         $results = $function($obj_type, $grouped_objects[$field_id], $field, $grouped_instances[$field_id], $langcode, $grouped_items[$field_id][$langcode], $options, $a, $b);

=== modified file 'modules/field/field.form.inc'
--- modules/field/field.form.inc	2009-08-22 14:34:17 +0000
+++ modules/field/field.form.inc	2009-08-22 17:45:48 +0000
@@ -56,7 +56,7 @@ function field_default_form($obj_type, $
   else {
     $delta = isset($get_delta) ? $get_delta : 0;
     $function = $instance['widget']['module'] . '_field_widget';
-    if (drupal_function_exists($function)) {
+    if (function_exists($function)) {
       if ($element = $function($form, $form_state, $field, $instance, $items, $delta)) {
         $defaults = array(
           '#required' => $get_delta > 0 ? FALSE : $instance['required'],
@@ -155,7 +155,7 @@ function field_multiple_value_form($fiel
   );
 
   $function = $instance['widget']['module'] . '_field_widget';
-  if (drupal_function_exists($function)) {
+  if (function_exists($function)) {
     for ($delta = 0; $delta <= $max; $delta++) {
       if ($element = $function($form, $form_state, $field, $instance, $items, $delta)) {
         $multiple = $field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED;
@@ -295,7 +295,7 @@ function field_default_form_errors($obj_
   $field_name = $field['field_name'];
   if (!empty($errors[$field_name][$langcode])) {
     $function = $instance['widget']['module'] . '_field_widget_error';
-    $function_exists = drupal_function_exists($function);
+    $function_exists = function_exists($function);
 
     // Walk the form down to where the widget lives.
     $form_path = $form['#fields'][$field_name]['form_path'];
@@ -330,7 +330,7 @@ function field_default_form_errors($obj_
  */
 function field_add_more_submit($form, &$form_state) {
   // Set the form to rebuild and run submit handlers.
-  if (isset($form['#builder_function']) && drupal_function_exists($form['#builder_function'])) {
+  if (isset($form['#builder_function']) && function_exists($form['#builder_function'])) {
     $entity = $form['#builder_function']($form, $form_state);
 
     // Make the changes we want to the form state.

=== modified file 'modules/field/field.module'
--- modules/field/field.module	2009-08-22 00:58:52 +0000
+++ modules/field/field.module	2009-08-22 15:04:51 +0000
@@ -11,9 +11,11 @@
  * every page request.
  */
 require(DRUPAL_ROOT . '/modules/field/field.crud.inc');
+require(DRUPAL_ROOT . '/modules/field/field.default.inc');
 require(DRUPAL_ROOT . '/modules/field/field.info.inc');
 require(DRUPAL_ROOT . '/modules/field/field.multilingual.inc');
 require(DRUPAL_ROOT . '/modules/field/field.attach.inc');
+require(DRUPAL_ROOT . '/modules/field/field.form.inc');
 
 /**
  * @defgroup field Field API
@@ -164,6 +166,7 @@ function field_menu() {
     'page callback' => 'field_add_more_js',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    'file' => 'field.form.inc',
   );
 
   return $items;
@@ -289,7 +292,7 @@ function field_get_default_value($obj_ty
   $items = array();
   if (!empty($instance['default_value_function'])) {
     $function = $instance['default_value_function'];
-    if (drupal_function_exists($function)) {
+    if (function_exists($function)) {
       $items = $function($obj_type, $object, $field, $instance, $langcode);
     }
   }
@@ -315,7 +318,7 @@ function field_get_default_value($obj_ty
 function field_set_empty($field, $items) {
   $function = $field['module'] . '_field_is_empty';
   // We ensure the function is loaded, but explicitly break if it is missing.
-  drupal_function_exists($function);
+  function_exists($function);
   foreach ((array) $items as $delta => $item) {
     if ($function($item, $field)) {
       unset($items[$delta]);
@@ -601,7 +604,7 @@ function field_view_field($obj_type, $ob
 
     // One-field equivalent to _field_invoke('sanitize').
     $function = $field['module'] . '_field_sanitize';
-    if (drupal_function_exists($function)) {
+    if (function_exists($function)) {
       $function($obj_type, $object, $field, $instance, $items);
       $object->$field['field_name'] = $items;
     }
@@ -723,4 +726,4 @@ function template_preprocess_field(&$var
 
 /**
  * @} End of "defgroup field"
- */
\ No newline at end of file
+ */

=== modified file 'modules/field/modules/list/list.module'
--- modules/field/modules/list/list.module	2009-08-22 00:58:52 +0000
+++ modules/field/modules/list/list.module	2009-08-22 15:04:51 +0000
@@ -151,7 +151,7 @@ function list_allowed_values($field) {
   $allowed_values[$field['field_name']] = array();
 
   $function = $field['settings']['allowed_values_function'];
-  if (!empty($function) && drupal_function_exists($function)) {
+  if (!empty($function) && function_exists($function)) {
     $allowed_values[$field['field_name']] = $function($field);
   }
   elseif (!empty($field['settings']['allowed_values'])) {

=== modified file 'modules/field_ui/field_ui.admin.inc'
--- modules/field_ui/field_ui.admin.inc	2009-08-22 14:34:17 +0000
+++ modules/field_ui/field_ui.admin.inc	2009-08-22 17:45:48 +0000
@@ -1205,7 +1205,7 @@ function field_ui_default_value_widget($
       'instance' => $instance,
     ),
   );
-  drupal_function_exists('field_default_form');
+  function_exists('field_default_form');
   // @todo Allow multiple values (requires more work on 'add more' JS handler).
   $widget_form = field_default_form(NULL, NULL, $field, $instance, FIELD_LANGUAGE_NONE, $items, $form, $form_state, 0);
   $form['instance']['default_value_widget'] += $widget_form;
@@ -1257,7 +1257,7 @@ function field_ui_field_edit_form_valida
 
       // Widget now does its own validation, should be no need to add anything
       // for widget validation here.
-      if (drupal_function_exists($field_function)) {
+      if (function_exists($field_function)) {
         $field_function('validate', $node, $field, $default_value, $form, NULL);
       }
       // The field validation routine won't set an error on the right field, so

=== modified file 'modules/field_ui/field_ui.module'
--- modules/field_ui/field_ui.module	2009-08-21 02:54:46 +0000
+++ modules/field_ui/field_ui.module	2009-08-22 15:04:51 +0000
@@ -38,6 +38,7 @@ function field_ui_menu() {
     'page callback' => 'field_ui_fields_list',
     'access arguments' => array('administer content types'),
     'type' => MENU_NORMAL_ITEM,
+    'file' => 'field_ui.admin.inc',
   );
 
   // Ensure the following is not executed until field_bundles is working and
@@ -60,6 +61,7 @@ function field_ui_menu() {
           'page arguments' => array('field_ui_field_overview_form', $obj_type, $bundle_arg),
           'type' => MENU_LOCAL_TASK,
           'weight' => 1,
+          'file' => 'field_ui.admin.inc',
         ) + $access;
         $instance_position = count(explode('/', $path)) + 1;
         $items["$path/fields/%field_ui_menu"] = array(
@@ -69,6 +71,7 @@ function field_ui_menu() {
           'page callback' => 'drupal_get_form',
           'page arguments' => array('field_ui_field_edit_form', $obj_type, $bundle_arg, $instance_position),
           'type' => MENU_LOCAL_TASK,
+          'file' => 'field_ui.admin.inc',
         ) + $access;
         $items["$path/fields/%field_ui_menu/edit"] = array(
           'title' => 'Edit instance settings',
@@ -76,6 +79,7 @@ function field_ui_menu() {
           'page callback' => 'drupal_get_form',
           'page arguments' => array('field_ui_field_edit_form', $obj_type, $bundle_arg, $instance_position),
           'type' => MENU_DEFAULT_LOCAL_TASK,
+          'file' => 'field_ui.admin.inc',
         ) + $access;
         $items["$path/fields/%field_ui_menu/field-settings"] = array(
           'title' => 'Edit field settings',
@@ -83,6 +87,7 @@ function field_ui_menu() {
           'page callback' => 'drupal_get_form',
           'page arguments' => array('field_ui_field_settings_form', $obj_type, $bundle_arg, $instance_position),
           'type' => MENU_LOCAL_TASK,
+          'file' => 'field_ui.admin.inc',
         ) + $access;
         $items["$path/fields/%field_ui_menu/widget-type"] = array(
           'title' => 'Change widget type',
@@ -90,6 +95,7 @@ function field_ui_menu() {
           'page callback' => 'drupal_get_form',
           'page arguments' => array('field_ui_widget_type_form', $obj_type, $bundle_arg, $instance_position),
           'type' => MENU_LOCAL_TASK,
+          'file' => 'field_ui.admin.inc',
         ) + $access;
         $items["$path/fields/%field_ui_menu/delete"] = array(
           'title' => 'Delete instance',
@@ -97,6 +103,7 @@ function field_ui_menu() {
           'page callback' => 'drupal_get_form',
           'page arguments' => array('field_ui_field_delete_form', $obj_type, $bundle_arg, $instance_position),
           'type' => MENU_LOCAL_TASK,
+          'file' => 'field_ui.admin.inc',
         ) + $access;
 
         // 'Display fields' tab and context secondary tabs.
@@ -106,6 +113,7 @@ function field_ui_menu() {
           'page arguments' => array('field_ui_display_overview_form', $obj_type, $bundle_arg),
           'type' => MENU_LOCAL_TASK,
           'weight' => 2,
+          'file' => 'field_ui.admin.inc',
         ) + $access;
         $tabs = field_ui_build_modes_tabs($obj_type);
         foreach ($tabs as $key => $tab) {
@@ -114,6 +122,7 @@ function field_ui_menu() {
             'page arguments' => array('field_ui_display_overview_form', $obj_type, $bundle_arg, $key),
             'type' => $key == 'basic' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
             'weight' => $key == 'basic' ? 0 : 1,
+            'file' => 'field_ui.admin.inc',
           ) + $access;
         }
       }

=== modified file 'modules/filter/filter.admin.inc'
--- modules/filter/filter.admin.inc	2009-08-22 14:34:17 +0000
+++ modules/filter/filter.admin.inc	2009-08-22 17:45:48 +0000
@@ -352,7 +352,7 @@ function filter_admin_configure(&$form_s
   $form = array();
   foreach ($list as $filter) {
     $filter_info = module_invoke($filter->module, 'filter_info');
-    if (isset($filter_info[$filter->name]['settings callback']) && drupal_function_exists($filter_info[$filter->name]['settings callback'])) {
+    if (isset($filter_info[$filter->name]['settings callback']) && function_exists($filter_info[$filter->name]['settings callback'])) {
       $form_module = call_user_func($filter_info[$filter->name]['settings callback'], $format->format);
     }
     if (isset($form_module) && is_array($form_module)) {

=== modified file 'modules/filter/filter.module'
--- modules/filter/filter.module	2009-08-22 14:34:17 +0000
+++ modules/filter/filter.module	2009-08-22 17:45:48 +0000
@@ -76,6 +76,7 @@ function filter_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('filter_admin_overview'),
     'access arguments' => array('administer filters'),
+    'file' => 'filter.admin.inc',
   );
   $items['admin/settings/formats/list'] = array(
     'title' => 'List',
@@ -87,6 +88,7 @@ function filter_menu() {
     'access arguments' => array('administer filters'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 1,
+    'file' => 'filter.admin.inc',
   );
   $items['admin/settings/formats/delete'] = array(
     'title' => 'Delete text format',
@@ -94,12 +96,14 @@ function filter_menu() {
     'page arguments' => array('filter_admin_delete'),
     'access arguments' => array('administer filters'),
     'type' => MENU_CALLBACK,
+    'file' => 'filter.admin.inc',
   );
   $items['filter/tips'] = array(
     'title' => 'Compose tips',
     'page callback' => 'filter_tips_long',
     'access callback' => TRUE,
     'type' => MENU_SUGGESTED_ITEM,
+    'file' => 'filter.pages.inc',
   );
   $items['admin/settings/formats/%filter_format'] = array(
     'type' => MENU_CALLBACK,
@@ -108,6 +112,7 @@ function filter_menu() {
     'page callback' => 'filter_admin_format_page',
     'page arguments' => array(3),
     'access arguments' => array('administer filters'),
+    'file' => 'filter.admin.inc',
   );
   $items['admin/settings/formats/%filter_format/edit'] = array(
     'title' => 'Edit',
@@ -121,6 +126,7 @@ function filter_menu() {
     'access arguments' => array('administer filters'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 1,
+    'file' => 'filter.admin.inc',
   );
   $items['admin/settings/formats/%filter_format/order'] = array(
     'title' => 'Rearrange',
@@ -129,6 +135,7 @@ function filter_menu() {
     'access arguments' => array('administer filters'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
+    'file' => 'filter.admin.inc',
   );
   return $items;
 }
@@ -259,7 +266,7 @@ function _filter_html_tips($format, $lon
       $output .= theme('table', $header, $rows);
       return $output;
     }
-    
+
     else {
       return t('Allowed HTML tags: @tags', array('@tags' => $allowed_html));
     }
@@ -270,7 +277,7 @@ function _filter_autop_tips($format, $lo
   if ($long) {
     return t('Lines and paragraphs are automatically recognized. The &lt;br /&gt; line break, &lt;p&gt; paragraph and &lt;/p&gt; close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.');
   }
-  else {   
+  else {
     return t('Lines and paragraphs break automatically.');
   }
 }
@@ -446,7 +453,7 @@ function check_markup($text, $format = F
     // Give filters the chance to escape HTML-like data such as code or formulas.
     foreach ($filters as $filter) {
       $filter_info = module_invoke($filter->module, 'filter_info');
-      if (isset($filter_info[$filter->name]['prepare callback']) && drupal_function_exists($filter_info[$filter->name]['prepare callback'])) {
+      if (isset($filter_info[$filter->name]['prepare callback']) && function_exists($filter_info[$filter->name]['prepare callback'])) {
         $text = call_user_func($filter_info[$filter->name]['prepare callback'], $text, $format, $langcode, $cache_id);
       }
     }
@@ -454,7 +461,7 @@ function check_markup($text, $format = F
     // Perform filtering.
     foreach ($filters as $filter) {
       $filter_info = module_invoke($filter->module, 'filter_info');
-      if (isset($filter_info[$filter->name]['process callback']) && drupal_function_exists($filter_info[$filter->name]['process callback'])) {
+      if (isset($filter_info[$filter->name]['process callback']) && function_exists($filter_info[$filter->name]['process callback'])) {
         $text = call_user_func($filter_info[$filter->name]['process callback'], $text, $format, $langcode, $cache_id);
       }
     }
@@ -566,7 +573,7 @@ function _filter_tips($format, $long = F
     $tips[$format->name] = array();
     foreach ($filters as $id => $filter) {
       $filter_info = module_invoke($filter->module, 'filter_info');
-      if (isset($filter_info[$filter->name]['tips callback']) && drupal_function_exists($filter_info[$filter->name]['tips callback'])) {
+      if (isset($filter_info[$filter->name]['tips callback']) && function_exists($filter_info[$filter->name]['tips callback'])) {
         $tip = call_user_func($filter_info[$filter->name]['tips callback'],$format->format, $long);
         $tips[$format->name][] = array('tip' => $tip, 'id' => $id);
       }

=== modified file 'modules/forum/forum.module'
--- modules/forum/forum.module	2009-08-22 15:26:04 +0000
+++ modules/forum/forum.module	2009-08-22 17:45:48 +0000
@@ -87,6 +87,7 @@ function forum_menu() {
     'title' => 'Forums',
     'page callback' => 'forum_page',
     'access arguments' => array('access content'),
+    'file' => 'forum.pages.inc',
   );
   $items['admin/structure/forum'] = array(
     'title' => 'Forums',
@@ -94,6 +95,7 @@ function forum_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('forum_overview'),
     'access arguments' => array('administer forums'),
+    'file' => 'forum.admin.inc',
   );
   $items['admin/structure/forum/list'] = array(
     'title' => 'List',
@@ -107,6 +109,7 @@ function forum_menu() {
     'access arguments' => array('administer forums'),
     'type' => MENU_LOCAL_TASK,
     'parent' => 'admin/structure/forum',
+    'file' => 'forum.admin.inc',
   );
   $items['admin/structure/forum/add/forum'] = array(
     'title' => 'Add forum',
@@ -115,6 +118,7 @@ function forum_menu() {
     'access arguments' => array('administer forums'),
     'type' => MENU_LOCAL_TASK,
     'parent' => 'admin/structure/forum',
+    'file' => 'forum.admin.inc',
   );
   $items['admin/structure/forum/settings'] = array(
     'title' => 'Settings',
@@ -124,11 +128,13 @@ function forum_menu() {
     'weight' => 5,
     'type' => MENU_LOCAL_TASK,
     'parent' => 'admin/structure/forum',
+    'file' => 'forum.admin.inc',
   );
   $items['admin/structure/forum/edit/%forum_term'] = array(
     'page callback' => 'forum_form_main',
     'access arguments' => array('administer forums'),
     'type' => MENU_CALLBACK,
+    'file' => 'forum.admin.inc',
   );
   $items['admin/structure/forum/edit/container/%forum_term'] = array(
     'title' => 'Edit container',
@@ -136,6 +142,7 @@ function forum_menu() {
     'page arguments' => array('container', 5),
     'access arguments' => array('administer forums'),
     'type' => MENU_CALLBACK,
+    'file' => 'forum.admin.inc',
   );
   $items['admin/structure/forum/edit/forum/%forum_term'] = array(
     'title' => 'Edit forum',
@@ -143,6 +150,7 @@ function forum_menu() {
     'page arguments' => array('forum', 5),
     'access arguments' => array('administer forums'),
     'type' => MENU_CALLBACK,
+    'file' => 'forum.admin.inc',
   );
   return $items;
 }

=== modified file 'modules/help/help.module'
--- modules/help/help.module	2009-08-12 23:51:19 +0000
+++ modules/help/help.module	2009-08-22 15:04:51 +0000
@@ -15,6 +15,7 @@ function help_menu() {
     'page callback' => 'help_main',
     'access arguments' => array('access administration pages'),
     'weight' => 9,
+    'file' => 'help.admin.inc',
   );
 
   foreach (module_implements('help', TRUE) as $module) {
@@ -24,6 +25,7 @@ function help_menu() {
       'page arguments' => array(2),
       'access arguments' => array('access administration pages'),
       'type' => MENU_CALLBACK,
+      'file' => 'help.admin.inc',
     );
   }
 

=== modified file 'modules/help/help.test'
--- modules/help/help.test	2009-08-15 20:07:24 +0000
+++ modules/help/help.test	2009-08-22 15:04:51 +0000
@@ -81,7 +81,7 @@ class HelpTestCase extends DrupalWebTest
     $this->modules = array();
     $result = db_query("SELECT name, filename, info FROM {system} WHERE type = 'module' AND status = 1 ORDER BY weight ASC, filename ASC");
     foreach ($result as $module) {
-      if (file_exists($module->filename) && drupal_function_exists($module->name . '_help')) {
+      if (file_exists($module->filename) && function_exists($module->name . '_help')) {
         $fullname = unserialize($module->info);
         $this->modules[$module->name] = $fullname['name'];
       }

=== modified file 'modules/image/image.admin.inc'
--- modules/image/image.admin.inc	2009-08-22 14:34:17 +0000
+++ modules/image/image.admin.inc	2009-08-22 17:45:48 +0000
@@ -321,7 +321,7 @@ function image_effect_form(&$form_state,
     '#tree' => TRUE,
     '#attached_css' => array(drupal_get_path('module', 'image') . '/image.admin.css' => array('preprocess' => FALSE)),
   );
-  if (drupal_function_exists($effect['form callback'])) {
+  if (function_exists($effect['form callback'])) {
     $form['data'] = call_user_func($effect['form callback'], $effect['data']);
   }
 

=== modified file 'modules/image/image.module'
--- modules/image/image.module	2009-08-20 10:48:02 +0000
+++ modules/image/image.module	2009-08-22 19:16:18 +0000
@@ -51,6 +51,7 @@ function image_menu() {
     'description' => 'Configure styles that can be used for resizing or adjusting images on display.',
     'page callback' => 'image_style_list',
     'access arguments' => array('administer image styles'),
+    'file' => 'image.admin.inc',
   );
   $items['admin/config/media/image-styles/list'] = array(
     'title' => 'List',
@@ -59,6 +60,7 @@ function image_menu() {
     'access arguments' => array('administer image styles'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
     'weight' => 1,
+    'file' => 'image.admin.inc',
   );
   $items['admin/config/media/image-styles/add'] = array(
     'title' => 'Add style',
@@ -68,6 +70,7 @@ function image_menu() {
     'access arguments' => array('administer image styles'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
+    'file' => 'image.admin.inc',
   );
   $items['admin/config/media/image-styles/edit/%image_style'] = array(
     'title' => 'Edit style',
@@ -78,6 +81,7 @@ function image_menu() {
     'page arguments' => array('image_style_form', 5),
     'access arguments' => array('administer image styles'),
     'type' => MENU_CALLBACK,
+    'file' => 'image.admin.inc',
   );
   $items['admin/config/media/image-styles/delete/%image_style'] = array(
     'title' => 'Delete style',
@@ -88,6 +92,7 @@ function image_menu() {
     'page arguments' => array('image_style_delete_form', 5, TRUE),
     'access arguments' => array('administer image styles'),
     'type' => MENU_CALLBACK,
+    'file' => 'image.admin.inc',
   );
   $items['admin/config/media/image-styles/edit/%image_style/effects/%image_effect'] = array(
     'title' => 'Edit image effect',
@@ -98,6 +103,7 @@ function image_menu() {
     'page arguments' => array('image_effect_form', 5, 7),
     'access arguments' => array('administer image styles'),
     'type' => MENU_CALLBACK,
+    'file' => 'image.admin.inc',
   );
   $items['admin/config/media/image-styles/edit/%image_style/effects/%image_effect/delete'] = array(
     'title' => 'Delete image effect',
@@ -108,6 +114,7 @@ function image_menu() {
     'page arguments' => array('image_effect_delete_form', 5, 7),
     'access arguments' => array('administer image styles'),
     'type' => MENU_CALLBACK,
+    'file' => 'image.admin.inc',
   );
   $items['admin/config/media/image-styles/edit/%image_style/add/%image_effect_definition'] = array(
     'title' => 'Add image effect',
@@ -118,6 +125,7 @@ function image_menu() {
     'page arguments' => array('image_effect_form', 5, 7),
     'access arguments' => array('administer image styles'),
     'type' => MENU_CALLBACK,
+    'file' => 'image.admin.inc',
   );
 
   return $items;
@@ -577,7 +585,7 @@ function image_style_url($style_name, $p
   // Set a cache entry to grant access to this style/image path. This will be
   // checked by image_style_generate().
   cache_set('access:' . $style_name . ':' . md5($path), 1, 'cache_image', REQUEST_TIME + 600);
-  
+
   $scheme = file_uri_scheme($path);
   $target = file_uri_target($path);
 
@@ -624,6 +632,7 @@ function image_effect_definitions() {
     }
     else {
       $effects = array();
+      include_once DRUPAL_ROOT . '/modules/image/image.effects.inc';
       foreach (module_implements('image_effect_info') as $module) {
         foreach (module_invoke($module, 'image_effect_info') as $name => $effect) {
           // Ensure the current toolkit supports the effect.
@@ -766,7 +775,7 @@ function image_effect_delete($effect) {
  *   TRUE on success. FALSE if unable to perform the image effect on the image.
  */
 function image_effect_apply($image, $effect) {
-  if (drupal_function_exists($effect['effect callback'])) {
+  if (function_exists($effect['effect callback'])) {
     return call_user_func($effect['effect callback'], $image, $effect['data']);
   }
   return FALSE;

=== modified file 'modules/locale/locale.module'
--- modules/locale/locale.module	2009-08-22 14:34:17 +0000
+++ modules/locale/locale.module	2009-08-22 17:45:48 +0000
@@ -76,6 +76,8 @@ function locale_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('locale_languages_overview_form'),
     'access arguments' => array('administer languages'),
+    'file' => 'locale.inc',
+    'file path' => 'includes',
   );
   $items['admin/config/regional/language/overview'] = array(
     'title' => 'List',
@@ -87,6 +89,8 @@ function locale_menu() {
     'page callback' => 'locale_languages_add_screen', // two forms concatenated
     'access arguments' => array('administer languages'),
     'weight' => 5,
+    'file' => 'locale.inc',
+    'file path' => 'includes',
     'type' => MENU_LOCAL_TASK,
   );
   $items['admin/config/regional/language/configure'] = array(
@@ -95,6 +99,8 @@ function locale_menu() {
     'page arguments' => array('locale_languages_configure_form'),
     'access arguments' => array('administer languages'),
     'weight' => 10,
+    'file' => 'locale.inc',
+    'file path' => 'includes',
     'type' => MENU_LOCAL_TASK,
   );
   $items['admin/config/regional/language/edit/%'] = array(
@@ -102,6 +108,8 @@ function locale_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('locale_languages_edit_form', 5),
     'access arguments' => array('administer languages'),
+    'file' => 'locale.inc',
+    'file path' => 'includes',
     'type' => MENU_CALLBACK,
   );
   $items['admin/config/regional/language/delete/%'] = array(
@@ -109,6 +117,8 @@ function locale_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('locale_languages_delete_form', 5),
     'access arguments' => array('administer languages'),
+    'file' => 'locale.inc',
+    'file path' => 'includes',
     'type' => MENU_CALLBACK,
   );
 
@@ -116,8 +126,11 @@ function locale_menu() {
   $items['admin/config/regional/translate'] = array(
     'title' => 'Translate interface',
     'description' => 'Translate the built in interface and optionally other text.',
-    'page callback' => 'locale_translate_overview_screen', // not a form, just a table
+    'page callback' => 'locale_inc_callback',
+    'page arguments' => array('locale_translate_overview_screen'), // not a form, just a table
     'access arguments' => array('translate interface'),
+    'file' => 'locale.inc',
+    'file path' => 'includes',
   );
   $items['admin/config/regional/translate/overview'] = array(
     'title' => 'Overview',
@@ -130,6 +143,8 @@ function locale_menu() {
     'type' => MENU_LOCAL_TASK,
     'page callback' => 'locale_translate_seek_screen', // search results and form concatenated
     'access arguments' => array('translate interface'),
+    'file' => 'locale.inc',
+    'file path' => 'includes',
   );
   $items['admin/config/regional/translate/import'] = array(
     'title' => 'Import',
@@ -138,6 +153,8 @@ function locale_menu() {
     'access arguments' => array('translate interface'),
     'weight' => 20,
     'type' => MENU_LOCAL_TASK,
+    'file' => 'locale.inc',
+    'file path' => 'includes',
   );
   $items['admin/config/regional/translate/export'] = array(
     'title' => 'Export',
@@ -152,6 +169,8 @@ function locale_menu() {
     'page arguments' => array('locale_translate_edit_form', 5),
     'access arguments' => array('translate interface'),
     'type' => MENU_CALLBACK,
+    'file' => 'locale.inc',
+    'file path' => 'includes',
   );
   $items['admin/config/regional/translate/delete/%'] = array(
     'title' => 'Delete string',
@@ -159,6 +178,8 @@ function locale_menu() {
     'page arguments' => array(5),
     'access arguments' => array('translate interface'),
     'type' => MENU_CALLBACK,
+    'file' => 'locale.inc',
+    'file path' => 'includes',
   );
 
   return $items;

=== modified file 'modules/menu/menu.module'
--- modules/menu/menu.module	2009-08-22 14:34:17 +0000
+++ modules/menu/menu.module	2009-08-22 17:45:48 +0000
@@ -54,6 +54,7 @@ function menu_menu() {
     'page callback' => 'menu_overview_page',
     'access callback' => 'user_access',
     'access arguments' => array('administer menu'),
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu/list'] = array(
     'title' => 'List menus',
@@ -66,6 +67,7 @@ function menu_menu() {
     'page arguments' => array('menu_edit_menu', 'add'),
     'access arguments' => array('administer menu'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu/settings'] = array(
     'title' => 'Settings',
@@ -74,6 +76,7 @@ function menu_menu() {
     'access arguments' => array('administer menu'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 5,
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu-customize/%menu'] = array(
     'title' => 'Customize menu',
@@ -83,6 +86,7 @@ function menu_menu() {
     'title arguments' => array(3),
     'access arguments' => array('administer menu'),
     'type' => MENU_CALLBACK,
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu-customize/%menu/list'] = array(
     'title' => 'List links',
@@ -95,6 +99,7 @@ function menu_menu() {
     'page arguments' => array('menu_edit_item', 'add', NULL, 3),
     'access arguments' => array('administer menu'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu-customize/%menu/edit'] = array(
     'title' => 'Edit menu',
@@ -102,6 +107,7 @@ function menu_menu() {
     'page arguments' => array('menu_edit_menu', 'edit', 3),
     'access arguments' => array('administer menu'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu-customize/%menu/delete'] = array(
     'title' => 'Delete menu',
@@ -109,6 +115,7 @@ function menu_menu() {
     'page arguments' => array(3),
     'access arguments' => array('administer menu'),
     'type' => MENU_CALLBACK,
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu/item/%menu_link/edit'] = array(
     'title' => 'Edit menu link',
@@ -116,6 +123,7 @@ function menu_menu() {
     'page arguments' => array('menu_edit_item', 'edit', 4, NULL),
     'access arguments' => array('administer menu'),
     'type' => MENU_CALLBACK,
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu/item/%menu_link/reset'] = array(
     'title' => 'Reset menu link',
@@ -123,6 +131,7 @@ function menu_menu() {
     'page arguments' => array('menu_reset_item_confirm', 4),
     'access arguments' => array('administer menu'),
     'type' => MENU_CALLBACK,
+    'file' => 'menu.admin.inc',
   );
   $items['admin/structure/menu/item/%menu_link/delete'] = array(
     'title' => 'Delete menu link',
@@ -130,6 +139,7 @@ function menu_menu() {
     'page arguments' => array(4),
     'access arguments' => array('administer menu'),
     'type' => MENU_CALLBACK,
+    'file' => 'menu.admin.inc',
   );
   return $items;
 }
@@ -157,7 +167,7 @@ function menu_theme() {
  */
 function menu_enable() {
   menu_rebuild();
-  $base_link = db_query("SELECT mlid AS plid, menu_name from {menu_links} WHERE link_path = 'admin/structure/menu' AND module = 'system'")->fetchAssoc();
+  $base_link = db_query("SELECT mlid AS plid, menu_name FROM {menu_links} WHERE link_path = 'admin/structure/menu' AND module = 'system'")->fetchAssoc();
   $base_link['router_path'] = 'admin/structure/menu-customize/%';
   $base_link['module'] = 'menu';
   $result = db_query("SELECT * FROM {menu_custom}", array(), array('fetch' => PDO::FETCH_ASSOC));

=== modified file 'modules/node/node.module'
--- modules/node/node.module	2009-08-22 14:34:17 +0000
+++ modules/node/node.module	2009-08-22 17:45:48 +0000
@@ -1696,6 +1696,7 @@ function node_menu() {
     'page arguments' => array('node_admin_content'),
     'access arguments' => array('administer nodes'),
     'weight' => -10,
+    'file' => 'node.admin.inc',
   );
   $items['admin/content/node'] = array(
     'title' => 'Content',
@@ -1711,6 +1712,7 @@ function node_menu() {
     // has to be allowed access to the 'node access rebuild' confirm form.
     'access arguments' => array('access administration pages'),
     'type' => MENU_CALLBACK,
+    'file' => 'node.admin.inc',
   );
 
   $items['admin/structure/types'] = array(
@@ -1718,6 +1720,7 @@ function node_menu() {
     'description' => 'Manage posts by content type, including default status, front page promotion, comment settings, etc.',
     'page callback' => 'node_overview_types',
     'access arguments' => array('administer content types'),
+    'file' => 'content_types.inc',
   );
   $items['admin/structure/types/list'] = array(
     'title' => 'List',
@@ -1730,12 +1733,14 @@ function node_menu() {
     'page arguments' => array('node_type_form'),
     'access arguments' => array('administer content types'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'content_types.inc',
   );
   $items['node'] = array(
     'title' => 'Content',
     'page callback' => 'node_page_default',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    'file' => 'node.pages.inc',
   );
   $items['node/add'] = array(
     'title' => 'Add new content',
@@ -1743,6 +1748,7 @@ function node_menu() {
     'access callback' => '_node_add_access',
     'weight' => 1,
     'menu_name' => 'management',
+    'file' => 'node.pages.inc',
   );
   $items['rss.xml'] = array(
     'title' => 'RSS feed',
@@ -1762,6 +1768,7 @@ function node_menu() {
       'access callback' => 'node_access',
       'access arguments' => array('create', $type->type),
       'description' => $type->description,
+      'file' => 'node.pages.inc',
     );
     $items['admin/structure/node-type/' . $type_url_str] = array(
       'title' => $type->name,
@@ -1769,6 +1776,7 @@ function node_menu() {
       'page arguments' => array('node_type_form', $type),
       'access arguments' => array('administer content types'),
       'type' => MENU_CALLBACK,
+      'file' => 'content_types.inc',
     );
     $items['admin/structure/node-type/' . $type_url_str . '/edit'] = array(
       'title' => 'Edit',
@@ -1779,6 +1787,7 @@ function node_menu() {
       'page arguments' => array('node_type_delete_confirm', $type),
       'access arguments' => array('administer content types'),
       'type' => MENU_CALLBACK,
+      'file' => 'content_types.inc',
     );
   }
   $items['node/%node'] = array(
@@ -1801,6 +1810,7 @@ function node_menu() {
     'access arguments' => array('update', 1),
     'weight' => 1,
     'type' => MENU_LOCAL_TASK,
+    'file' => 'node.pages.inc',
   );
   $items['node/%node/delete'] = array(
     'title' => 'Delete',
@@ -1809,7 +1819,9 @@ function node_menu() {
     'access callback' => 'node_access',
     'access arguments' => array('delete', 1),
     'weight' => 1,
-    'type' => MENU_CALLBACK);
+    'type' => MENU_CALLBACK,
+    'file' => 'node.pages.inc',
+  );
   $items['node/%node/revisions'] = array(
     'title' => 'Revisions',
     'page callback' => 'node_revision_overview',
@@ -1818,6 +1830,7 @@ function node_menu() {
     'access arguments' => array(1),
     'weight' => 2,
     'type' => MENU_LOCAL_TASK,
+    'file' => 'node.pages.inc',
   );
   $items['node/%node/revisions/%/view'] = array(
     'title' => 'Revisions',
@@ -1836,6 +1849,7 @@ function node_menu() {
     'access callback' => '_node_revision_access',
     'access arguments' => array(1, 'update'),
     'type' => MENU_CALLBACK,
+    'file' => 'node.pages.inc',
   );
   $items['node/%node/revisions/%/delete'] = array(
     'title' => 'Delete earlier revision',
@@ -1845,6 +1859,7 @@ function node_menu() {
     'access callback' => '_node_revision_access',
     'access arguments' => array(1, 'delete'),
     'type' => MENU_CALLBACK,
+    'file' => 'node.pages.inc',
   );
   return $items;
 }

=== modified file 'modules/openid/openid.module'
--- modules/openid/openid.module	2009-08-22 14:34:17 +0000
+++ modules/openid/openid.module	2009-08-22 17:45:48 +0000
@@ -15,6 +15,7 @@ function openid_menu() {
     'page callback' => 'openid_authentication_page',
     'access callback' => 'user_is_anonymous',
     'type' => MENU_CALLBACK,
+    'file' => 'openid.pages.inc',
   );
   $items['user/%user/openid'] = array(
     'title' => 'OpenID identities',
@@ -23,6 +24,7 @@ function openid_menu() {
     'access callback' => 'user_edit_access',
     'access arguments' => array(1),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'openid.pages.inc',
   );
   $items['user/%user/openid/delete'] = array(
     'title' => 'Delete OpenID',
@@ -31,6 +33,7 @@ function openid_menu() {
     'access callback' => 'user_edit_access',
     'access arguments' => array(1),
     'type' => MENU_CALLBACK,
+    'file' => 'openid.pages.inc',
   );
   return $items;
 }

=== modified file 'modules/path/path.module'
--- modules/path/path.module	2009-08-15 15:45:07 +0000
+++ modules/path/path.module	2009-08-22 15:04:51 +0000
@@ -38,12 +38,14 @@ function path_menu() {
     'description' => "Change your site's URL paths by aliasing them.",
     'page callback' => 'path_admin_overview',
     'access arguments' => array('administer url aliases'),
+    'file' => 'path.admin.inc',
   );
   $items['admin/settings/path/edit'] = array(
     'title' => 'Edit alias',
     'page callback' => 'path_admin_edit',
     'access arguments' => array('administer url aliases'),
     'type' => MENU_CALLBACK,
+    'file' => 'path.admin.inc',
   );
   $items['admin/settings/path/delete'] = array(
     'title' => 'Delete alias',
@@ -51,6 +53,7 @@ function path_menu() {
     'page arguments' => array('path_admin_delete_confirm'),
     'access arguments' => array('administer url aliases'),
     'type' => MENU_CALLBACK,
+    'file' => 'path.admin.inc',
   );
   $items['admin/settings/path/list'] = array(
     'title' => 'List',
@@ -62,6 +65,7 @@ function path_menu() {
     'page callback' => 'path_admin_edit',
     'access arguments' => array('administer url aliases'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'path.admin.inc',
   );
 
   return $items;

=== modified file 'modules/poll/poll.module'
--- modules/poll/poll.module	2009-08-22 14:34:17 +0000
+++ modules/poll/poll.module	2009-08-22 17:45:48 +0000
@@ -81,6 +81,7 @@ function poll_menu() {
     'page callback' => 'poll_page',
     'access arguments' => array('access content'),
     'type' => MENU_SUGGESTED_ITEM,
+    'file' => 'poll.pages.inc',
   );
 
   $items['node/%node/votes'] = array(
@@ -91,6 +92,7 @@ function poll_menu() {
     'access arguments' => array(1, 'inspect all votes', FALSE),
     'weight' => 3,
     'type' => MENU_LOCAL_TASK,
+    'file' => 'poll.pages.inc',
   );
 
   $items['node/%node/results'] = array(
@@ -101,6 +103,7 @@ function poll_menu() {
     'access arguments' => array(1, 'access content', TRUE),
     'weight' => 3,
     'type' => MENU_LOCAL_TASK,
+    'file' => 'poll.pages.inc',
   );
 
   return $items;

=== modified file 'modules/profile/profile.module'
--- modules/profile/profile.module	2009-08-22 14:34:17 +0000
+++ modules/profile/profile.module	2009-08-22 17:45:48 +0000
@@ -80,6 +80,7 @@ function profile_menu() {
     'title' => 'User list',
     'page callback' => 'profile_browse',
     'access arguments' => array('access user profiles'),
+    'file' => 'profile.pages.inc',
     'type' => MENU_SUGGESTED_ITEM,
   );
   $items['admin/config/people/profile'] = array(
@@ -88,18 +89,21 @@ function profile_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('profile_admin_overview'),
     'access arguments' => array('administer users'),
+    'file' => 'profile.admin.inc',
   );
   $items['admin/config/people/profile/add'] = array(
     'title' => 'Add field',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('profile_field_form'),
     'access arguments' => array('administer users'),
+    'file' => 'profile.admin.inc',
     'type' => MENU_CALLBACK,
   );
   $items['admin/config/people/profile/autocomplete'] = array(
     'title' => 'Profile category autocomplete',
     'page callback' => 'profile_admin_settings_autocomplete',
     'access arguments' => array('administer users'),
+    'file' => 'profile.admin.inc',
     'type' => MENU_CALLBACK,
   );
   $items['admin/config/people/profile/edit'] = array(
@@ -107,6 +111,7 @@ function profile_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('profile_field_form'),
     'access arguments' => array('administer users'),
+    'file' => 'profile.pages.inc',
     'type' => MENU_CALLBACK,
   );
   $items['admin/config/people/profile/delete'] = array(
@@ -114,12 +119,14 @@ function profile_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('profile_field_delete'),
     'access arguments' => array('administer users'),
+    'file' => 'profile.pages.inc',
     'type' => MENU_CALLBACK,
   );
   $items['profile/autocomplete'] = array(
     'title' => 'Profile autocomplete',
     'page callback' => 'profile_autocomplete',
     'access arguments' => array('access user profiles'),
+    'file' => 'profile.pages.inc',
     'type' => MENU_CALLBACK,
   );
   return $items;
@@ -128,7 +135,7 @@ function profile_menu() {
 /**
  * Implement hook_block_list().
  */
-function profile_block_list() {
+ function profile_block_list() {
   $blocks['author-information']['info'] = t('Author information');
   $blocks['author-information']['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE;
   return $blocks;

=== modified file 'modules/search/search.module'
--- modules/search/search.module	2009-08-22 14:34:17 +0000
+++ modules/search/search.module	2009-08-22 17:45:48 +0000
@@ -190,6 +190,7 @@ function search_menu() {
     'page callback' => 'search_view',
     'access arguments' => array('search content'),
     'type' => MENU_SUGGESTED_ITEM,
+    'file' => 'search.pages.inc',
   );
   $items['admin/settings/search'] = array(
     'title' => 'Search settings',
@@ -198,6 +199,7 @@ function search_menu() {
     'page arguments' => array('search_admin_settings'),
     'access arguments' => array('administer search'),
     'type' => MENU_NORMAL_ITEM,
+    'file' => 'search.admin.inc',
   );
   $items['admin/settings/search/reindex'] = array(
     'title' => 'Clear index',
@@ -205,6 +207,7 @@ function search_menu() {
     'page arguments' => array('search_reindex_confirm'),
     'access arguments' => array('administer search'),
     'type' => MENU_CALLBACK,
+    'file' => 'search.admin.inc',
   );
   $items['admin/reports/search'] = array(
     'title' => 'Top search phrases',
@@ -213,6 +216,7 @@ function search_menu() {
     'page arguments' => array('search'),
     'access arguments' => array('access site reports'),
     'file path' => drupal_get_path('module', 'dblog'),
+    'file' => 'dblog.admin.inc',
   );
 
   foreach (module_implements('search') as $module) {
@@ -225,6 +229,7 @@ function search_menu() {
       'access arguments' => array($module),
       'type' => MENU_LOCAL_TASK,
       'parent' => 'search',
+      'file' => 'search.pages.inc',
     );
   }
   return $items;

=== modified file 'modules/simpletest/drupal_web_test_case.php'
--- modules/simpletest/drupal_web_test_case.php	2009-08-22 00:58:52 +0000
+++ modules/simpletest/drupal_web_test_case.php	2009-08-22 15:04:51 +0000
@@ -519,7 +519,7 @@ abstract class DrupalTestCase {
  *
  * These tests can not access the database nor files. Calling any Drupal
  * function that needs the database will throw exceptions. These include
- * watchdog(), drupal_function_exists(), module_implements(),
+ * watchdog(), function_exists(), module_implements(),
  * module_invoke_all() etc.
  */
 class DrupalUnitTestCase extends DrupalTestCase {
@@ -1203,7 +1203,7 @@ class DrupalWebTestCase extends DrupalTe
       // Reload module list and implementations to ensure that test module hooks
       // aren't called after tests.
       module_list(TRUE);
-      module_implements(MODULE_IMPLEMENTS_CLEAR_CACHE);
+      module_implements('', FALSE, TRUE);
 
       // Reset the Field API.
       field_cache_clear();

=== modified file 'modules/simpletest/simpletest.module'
--- modules/simpletest/simpletest.module	2009-08-17 19:14:39 +0000
+++ modules/simpletest/simpletest.module	2009-08-22 15:04:51 +0000
@@ -31,6 +31,7 @@ function simpletest_menu() {
     'page arguments' => array('simpletest_test_form'),
     'description' => 'Run tests against Drupal core and your active modules. These tests help assure that your site code is working as designed.',
     'access arguments' => array('administer unit tests'),
+    'file' => 'simpletest.pages.inc',
   );
   $items['admin/config/development/testing/list'] = array(
     'title' => 'List',
@@ -42,6 +43,7 @@ function simpletest_menu() {
     'page arguments' => array('simpletest_settings_form'),
     'access arguments' => array('administer unit tests'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'simpletest.pages.inc',
   );
   $items['admin/config/development/testing/results/%'] = array(
     'title' => 'Test result',
@@ -50,6 +52,7 @@ function simpletest_menu() {
     'description' => 'View result of tests.',
     'access arguments' => array('administer unit tests'),
     'type' => MENU_CALLBACK,
+    'file' => 'simpletest.pages.inc',
   );
   return $items;
 }

=== modified file 'modules/simpletest/tests/batch.test'
--- modules/simpletest/tests/batch.test	2009-07-13 21:51:08 +0000
+++ modules/simpletest/tests/batch.test	2009-08-22 15:04:51 +0000
@@ -70,7 +70,7 @@ class BatchAPIPercentagesTestCase extend
    */
   function testBatchAPIPercentages() {
     // Include batch.inc if it's not already included.
-    drupal_function_exists('_batch_api_percentage');
+    function_exists('_batch_api_percentage');
     foreach ($this->testCases as $expected_result => $arguments) {
       // PHP sometimes casts numeric strings that are array keys to integers,
       // cast them back here.
@@ -86,4 +86,4 @@ class BatchAPIPercentagesTestCase extend
       }
     }
   }
-}
\ No newline at end of file
+}

=== modified file 'modules/simpletest/tests/image.test'
--- modules/simpletest/tests/image.test	2009-08-17 19:14:39 +0000
+++ modules/simpletest/tests/image.test	2009-08-22 15:04:51 +0000
@@ -255,7 +255,7 @@ class ImageToolkitGdTestCase extends Dru
    */
   function testManipulations() {
     // If GD isn't available don't bother testing this.
-    if (!drupal_function_exists('image_gd_check_settings') || !image_gd_check_settings()) {
+    if (!function_exists('image_gd_check_settings') || !image_gd_check_settings()) {
       $this->pass(t('Image manipulations for the GD toolkit were skipped because the GD toolkit is not available.'));
       return;
     }
@@ -325,7 +325,7 @@ class ImageToolkitGdTestCase extends Dru
     );
 
     // Systems using non-bundled GD2 don't have imagerotate. Test if available.
-    if (drupal_function_exists('imagerotate')) {
+    if (function_exists('imagerotate')) {
       $operations += array(
         'rotate_5' => array(
           'function' => 'rotate',
@@ -359,7 +359,7 @@ class ImageToolkitGdTestCase extends Dru
     }
 
     // Systems using non-bundled GD2 don't have imagefilter. Test if available.
-    if (drupal_function_exists('imagefilter')) {
+    if (function_exists('imagefilter')) {
       $operations += array(
         'desaturate' => array(
           'function' => 'desaturate',

=== modified file 'modules/simpletest/tests/xmlrpc.test'
--- modules/simpletest/tests/xmlrpc.test	2009-07-13 21:51:08 +0000
+++ modules/simpletest/tests/xmlrpc.test	2009-08-22 15:04:51 +0000
@@ -14,7 +14,7 @@ class XMLRPCValidator1IncTestCase extend
     parent::setUp('xmlrpc_test');
 
     // Force loading the xmlrpc.inc to have the xmlrpc() function.
-    drupal_function_exists('xmlrpc');
+    function_exists('xmlrpc');
   }
 
   /**
@@ -137,7 +137,7 @@ class XMLRPCMessagesTestCase extends Dru
     parent::setUp('xmlrpc_test');
 
     // Force loading the xmlrpc.inc to have the xmlrpc() function.
-    drupal_function_exists('xmlrpc');
+    function_exists('xmlrpc');
   }
 
   /**

=== modified file 'modules/statistics/statistics.module'
--- modules/statistics/statistics.module	2009-08-22 14:34:17 +0000
+++ modules/statistics/statistics.module	2009-08-22 17:45:49 +0000
@@ -130,6 +130,7 @@ function statistics_menu() {
     'description' => 'View pages that have recently been visited.',
     'page callback' => 'statistics_recent_hits',
     'access arguments' => array('access statistics'),
+    'file' => 'statistics.admin.inc',
   );
   $items['admin/reports/pages'] = array(
     'title' => 'Top pages',
@@ -137,6 +138,7 @@ function statistics_menu() {
     'page callback' => 'statistics_top_pages',
     'access arguments' => array('access statistics'),
     'weight' => 1,
+    'file' => 'statistics.admin.inc',
   );
   $items['admin/reports/visitors'] = array(
     'title' => 'Top visitors',
@@ -144,12 +146,14 @@ function statistics_menu() {
     'page callback' => 'statistics_top_visitors',
     'access arguments' => array('access statistics'),
     'weight' => 2,
+    'file' => 'statistics.admin.inc',
   );
   $items['admin/reports/referrers'] = array(
     'title' => 'Top referrers',
     'description' => 'View top referrers.',
     'page callback' => 'statistics_top_referrers',
     'access arguments' => array('access statistics'),
+    'file' => 'statistics.admin.inc',
   );
   $items['admin/reports/access/%'] = array(
     'title' => 'Details',
@@ -158,6 +162,7 @@ function statistics_menu() {
     'page arguments' => array(3),
     'access arguments' => array('access statistics'),
     'type' => MENU_CALLBACK,
+    'file' => 'statistics.admin.inc',
   );
   $items['admin/settings/statistics'] = array(
     'title' => 'Statistics',
@@ -165,6 +170,7 @@ function statistics_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('statistics_settings_form'),
     'access arguments' => array('administer statistics'),
+    'file' => 'statistics.admin.inc',
   );
   $items['user/%user/track/navigation'] = array(
     'title' => 'Track page visits',
@@ -173,6 +179,7 @@ function statistics_menu() {
     'access arguments' => array('access statistics'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
+    'file' => 'statistics.pages.inc',
   );
   $items['node/%node/track'] = array(
     'title' => 'Track',
@@ -181,6 +188,7 @@ function statistics_menu() {
     'access arguments' => array('access statistics'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
+    'file' => 'statistics.pages.inc',
   );
 
   return $items;

=== modified file 'modules/system/image.gd.inc'
--- modules/system/image.gd.inc	2009-08-17 19:14:39 +0000
+++ modules/system/image.gd.inc	2009-08-22 15:04:51 +0000
@@ -118,7 +118,7 @@ function image_gd_resize(stdClass $image
  */
 function image_gd_rotate(stdClass $image, $degrees, $background = NULL) {
   // PHP installations using non-bundled GD do not have imagerotate.
-  if (!drupal_function_exists('imagerotate')) {
+  if (!function_exists('imagerotate')) {
     watchdog('image', 'The image %file could not be rotated because the imagerotate() function is not available in this PHP installation.', array('%file' => $image->source));
     return FALSE;
   }
@@ -215,7 +215,7 @@ function image_gd_crop(stdClass $image, 
  */
 function image_gd_desaturate(stdClass $image) {
   // PHP installations using non-bundled GD do not have imagefilter.
-  if (!drupal_function_exists('imagefilter')) {
+  if (!function_exists('imagefilter')) {
     watchdog('image', 'The image %file could not be desaturated because the imagefilter() function is not available in this PHP installation.', array('%file' => $image->source));
     return FALSE;
   }

=== modified file 'modules/system/system.admin.inc'
--- modules/system/system.admin.inc	2009-08-22 16:01:09 +0000
+++ modules/system/system.admin.inc	2009-08-22 17:45:49 +0000
@@ -991,7 +991,7 @@ function system_modules_submit($form, &$
     drupal_install_modules($new_modules);
   }
 
-  $current_module_list = module_list(TRUE);
+  $current_module_list = module_list(TRUE, FALSE);
   if ($old_module_list != $current_module_list) {
     drupal_set_message(t('The configuration options have been saved.'));
   }
@@ -1553,7 +1553,7 @@ function system_image_toolkit_settings()
 
   // Get the toolkit's settings form.
   $function = 'image_' . $current_toolkit . '_settings';
-  if (drupal_function_exists($function)) {
+  if (function_exists($function)) {
     $form['image_toolkit_settings'] = $function();
   }
 

=== modified file 'modules/system/system.install'
--- modules/system/system.install	2009-08-22 16:55:46 +0000
+++ modules/system/system.install	2009-08-22 17:45:49 +0000
@@ -44,7 +44,7 @@ function system_requirements($phase) {
         'severity' => REQUIREMENT_INFO,
         'weight' => -9
       );
-    } 
+    }
   }
 
   // Web server information.
@@ -953,6 +953,11 @@ function system_schema() {
         'not null' => TRUE,
         'default' => 0,
       ),
+      'file' => array(
+        'description' => 'The file to include for this element, usually the page callback function lives in this file.',
+        'type' => 'text',
+        'size' => 'medium'
+      ),
     ),
     'indexes' => array(
       'fit' => array('fit'),
@@ -1237,13 +1242,6 @@ function system_schema() {
         'not null' => TRUE,
         'default' => ''
       ),
-      'suffix' => array(
-        'description' => "The part of the function name after the module, which is the hook this function implements, if any.",
-        'type' => 'varchar',
-        'length' => 68,
-        'not null' => TRUE,
-        'default' => ''
-      ),
       'weight' => array(
         'description' => "The order in which this module's hooks should be invoked relative to other modules. Equal-weighted modules are ordered by name.",
         'type' => 'int',
@@ -1253,7 +1251,7 @@ function system_schema() {
     ),
     'primary key' => array('name', 'type'),
     'indexes' => array(
-      'hook' => array('type', 'suffix', 'weight', 'module'),
+      'hook' => array('type', 'weight', 'module'),
     ),
   );
 
@@ -1399,6 +1397,12 @@ function system_schema() {
         'not null' => TRUE,
         'default' => 0,
       ),
+      'bootstrap' => array(
+        'description' => "Boolean indicating whether this module is loaded during Drupal's early bootstrapping phase (e.g. even before the page cache is consulted).",
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
       'schema_version' => array(
         'description' => "The module's database schema version number. -1 if the module is not installed (its tables do not exist); 0 or the largest N of the module's hook_update_N() function that has either been run or existed when the module was first installed.",
         'type' => 'int',
@@ -1421,6 +1425,7 @@ function system_schema() {
     'primary key' => array('filename'),
     'indexes' => array(
       'modules' => array('type', 'status', 'weight', 'name'),
+      'bootstrap' => array('type', 'status', 'bootstrap', 'weight', 'name'),
       'type_name' => array('type', 'name'),
     ),
   );
@@ -1711,19 +1716,17 @@ function system_update_7005() {
  */
 function system_update_7006() {
   $ret = array();
-  db_drop_field($ret, 'menu_router', 'file');
   $schema['registry'] = array(
     'fields' => array(
       'name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
       'type'   => array('type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
       'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
       'module'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'suffix'   => array('type' => 'varchar', 'length' => 68, 'not null' => TRUE, 'default' => ''),
       'weight'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
     ),
     'primary key' => array('name', 'type'),
     'indexes' => array(
-      'hook' => array('type', 'suffix', 'weight', 'module'),
+      'hook' => array('type', 'weight', 'module'),
     ),
   );
   $schema['registry_file'] = array(
@@ -1919,11 +1922,10 @@ function system_update_7013() {
 }
 
 /**
- * Drop the bootstrap column from the {system} table.
+ * Drop the bootstrap column from the {system} table. This was reverted.
  */
 function system_update_7014() {
   $ret = array();
-  db_drop_field($ret, 'system', 'bootstrap');
   return $ret;
 }
 

=== modified file 'modules/system/system.module'
--- modules/system/system.module	2009-08-22 16:01:09 +0000
+++ modules/system/system.module	2009-08-22 19:03:50 +0000
@@ -497,18 +497,22 @@ function system_menu() {
     'page callback' => 'ajax_form_callback',
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
+    'file path' => 'includes',
+    'file' => 'form.inc',
   );
   $items['system/timezone'] = array(
     'title' => 'Time zone',
     'page callback' => 'system_timezone',
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   $items['system/run-cron-image'] = array(
     'title' => 'Execute cron',
     'page callback' => 'system_run_cron_image',
     'access callback' => 'system_run_cron_image_access',
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   $items['admin'] = array(
     'title' => 'Administer',
@@ -516,18 +520,21 @@ function system_menu() {
     'page callback' => 'system_main_admin_page',
     'weight' => 9,
     'menu_name' => 'management',
+    'file' => 'system.admin.inc',
   );
   $items['admin/compact'] = array(
     'title' => 'Compact mode',
     'page callback' => 'system_admin_compact_page',
     'access arguments' => array('access administration pages'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   $items['admin/by-task'] = array(
     'title' => 'By task',
     'page callback' => 'system_main_admin_page',
     'access arguments' => array('access administration pages'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
+    'file' => 'system.admin.inc',
   );
   $items['admin/by-module'] = array(
     'title' => 'By module',
@@ -535,6 +542,7 @@ function system_menu() {
     'access arguments' => array('access administration pages'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
+    'file' => 'system.admin.inc',
   );
 
   // Menu items that are basically just menu blocks.
@@ -546,6 +554,7 @@ function system_menu() {
     'page callback' => 'system_settings_overview',
     'access callback' => 'system_admin_menu_block_access',
     'access arguments' => array('admin/settings', 'access administration pages'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/structure'] = array(
     'title' => 'Structure',
@@ -555,6 +564,7 @@ function system_menu() {
     'page callback' => 'system_admin_menu_block_page',
     'access callback' => 'system_admin_menu_block_access',
     'access arguments' => array('admin/structure', 'access administration pages'),
+    'file' => 'system.admin.inc',
   );
   // Appearance.
   $items['admin/appearance'] = array(
@@ -565,18 +575,21 @@ function system_menu() {
     'access arguments' => array('administer site configuration'),
     'position' => 'left',
     'weight' => -6,
+    'file' => 'system.admin.inc',
   );
   $items['admin/appearance/select'] = array(
     'title' => 'List',
     'description' => 'Select the default theme for your site.',
     'type' => MENU_DEFAULT_LOCAL_TASK,
     'weight' => -1,
+    'file' => 'system.admin.inc',
   );
   $items['admin/appearance/settings'] = array(
     'title' => 'Configure',
     'page arguments' => array('system_theme_settings'),
     'access arguments' => array('administer site configuration'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'system.admin.inc',
   );
   // Theme configuration subtabs.
   $items['admin/appearance/settings/global'] = array(
@@ -592,6 +605,7 @@ function system_menu() {
       'type' => MENU_LOCAL_TASK,
       'access callback' => '_system_themes_access',
       'access arguments' => array($theme),
+      'file' => 'system.admin.inc',
     );
   }
 
@@ -600,12 +614,14 @@ function system_menu() {
     'title' => 'Configuration and modules',
     'page callback' => 'system_admin_config_page',
     'access arguments' => array('access administration pages'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/config'] = array(
     'title' => 'Configuration',
     'access arguments' => array('administer site configuration'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
     'weight' => -10,
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/modules'] = array(
     'title' => 'Modules',
@@ -613,6 +629,7 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_modules'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
     'type' => MENU_LOCAL_TASK,
     'weight' => 10,
   );
@@ -630,11 +647,25 @@ function system_menu() {
     'page arguments' => array('system_modules_uninstall'),
     'access arguments' => array('administer site configuration'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/modules/uninstall/confirm'] = array(
     'title' => 'Uninstall',
     'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
+  );
+
+  // Development menu category.
+  $items['admin/development'] = array(
+    'title' => 'Development',
+    'description' => 'Development tools.',
+    'position' => 'right',
+    'weight' => -7,
+    'page callback' => 'system_admin_menu_block_page',
+    'access callback' => 'system_admin_menu_block_access',
+    'access arguments' => array('admin/development', 'access administration pages'),
+    'file' => 'system.admin.inc',
   );
 
   // Actions.
@@ -642,7 +673,8 @@ function system_menu() {
     'title' => 'Actions',
     'description' => 'Manage the actions defined for your site.',
     'access arguments' => array('administer actions'),
-    'page callback' => 'system_actions_manage'
+    'page callback' => 'system_actions_manage',
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/actions/manage'] = array(
     'title' => 'Manage actions',
@@ -650,6 +682,7 @@ function system_menu() {
     'page callback' => 'system_actions_manage',
     'type' => MENU_DEFAULT_LOCAL_TASK,
     'weight' => -2,
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/actions/configure'] = array(
     'title' => 'Configure an advanced action',
@@ -657,6 +690,7 @@ function system_menu() {
     'page arguments' => array('system_actions_configure'),
     'access arguments' => array('administer actions'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/actions/delete/%actions'] = array(
     'title' => 'Delete action',
@@ -665,12 +699,14 @@ function system_menu() {
     'page arguments' => array('system_actions_delete_form', 4),
     'access arguments' => array('administer actions'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/actions/orphan'] = array(
     'title' => 'Remove orphans',
     'page callback' => 'system_actions_remove_orphans',
     'access arguments' => array('administer actions'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
 
   // IP address blocking.
@@ -679,6 +715,7 @@ function system_menu() {
     'description' => 'Manage blocked IP addresses.',
     'page callback' => 'system_ip_blocking',
     'access arguments' => array('block IP addresses'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/ip-blocking/%'] = array(
     'title' => 'IP address blocking',
@@ -686,6 +723,7 @@ function system_menu() {
     'page callback' => 'system_ip_blocking',
     'access arguments' => array('block IP addresses'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/ip-blocking/delete/%blocked_ip'] = array(
     'title' => 'Delete IP address',
@@ -693,17 +731,19 @@ function system_menu() {
     'page arguments' => array('system_ip_blocking_delete', 4),
     'access arguments' => array('block IP addresses'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
 
   // Configuration.
   $items['admin/config/development'] = array(
-   'title' => 'Development',
-   'description' => 'Development tools.',
-   'position' => 'left',
-   'weight' => 10,
-   'page callback' => 'system_admin_menu_block_page',
-   'access callback' => 'system_admin_menu_block_access',
-   'access arguments' => array('admin/config/development', 'access administration pages'),
+    'title' => 'Development',
+    'description' => 'Development tools.',
+    'position' => 'left',
+    'weight' => 10,
+    'page callback' => 'system_admin_menu_block_page',
+    'access callback' => 'system_admin_menu_block_access',
+    'access arguments' => array('admin/config/development', 'access administration pages'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/development/maintenance'] = array(
     'title' => 'Maintenance mode',
@@ -711,6 +751,7 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_site_maintenance_mode'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/development/performance'] = array(
     'title' => 'Performance',
@@ -718,15 +759,17 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_performance_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/media'] = array(
-   'title' => 'Media',
-   'description' => 'Media tools.',
-   'position' => 'left',
-   'weight' => 10,
-   'page callback' => 'system_admin_menu_block_page',
-   'access callback' => 'system_admin_menu_block_access',
-   'access arguments' => array('admin/config/media', 'access administration pages'),
+    'title' => 'Media',
+    'description' => 'Media tools.',
+    'position' => 'left',
+    'weight' => 10,
+    'page callback' => 'system_admin_menu_block_page',
+    'access callback' => 'system_admin_menu_block_access',
+    'access arguments' => array('admin/config/media', 'access administration pages'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/media/file-system'] = array(
     'title' => 'File-system',
@@ -734,6 +777,7 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_file_system_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
     $items['admin/config/media/image-toolkit'] = array(
     'title' => 'Image toolkit',
@@ -741,6 +785,15 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_image_toolkit_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
+  );
+  $items['admin/settings/performance'] = array(
+    'title' => 'Performance',
+    'description' => 'Enable or disable page caching for anonymous users and set CSS and JS bandwidth optimization options.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('system_performance_settings'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
     $items['admin/config/development/logging'] = array(
     'title' => 'Logging and errors',
@@ -748,15 +801,17 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_logging_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/regional'] = array(
-   'title' => 'Regional and language',
-   'description' => 'Regional settings, localization and translation.',
-   'position' => 'left',
-   'weight' => -7,
-   'page callback' => 'system_admin_menu_block_page',
-   'access callback' => 'system_admin_menu_block_access',
-   'access arguments' => array('admin/config/regional', 'access administration pages'),
+    'title' => 'Regional and language',
+    'description' => 'Regional settings, localization and translation.',
+    'position' => 'left',
+    'weight' => -7,
+    'page callback' => 'system_admin_menu_block_page',
+    'access callback' => 'system_admin_menu_block_access',
+    'access arguments' => array('admin/config/regional', 'access administration pages'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/regional/settings'] = array(
     'title' => 'Regional settings',
@@ -765,14 +820,16 @@ function system_menu() {
     'page arguments' => array('system_regional_settings'),
     'access arguments' => array('administer site configuration'),
     'weight' => -10,
+    'file' => 'system.admin.inc',
   );
   $items['admin/config/regional/settings/lookup'] = array(
     'title' => 'Date and time lookup',
     'type' => MENU_CALLBACK,
     'page callback' => 'system_date_time_lookup',
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
-  
+
   // Settings.
   $items['admin/settings/site-information'] = array(
     'title' => 'Site information',
@@ -780,6 +837,7 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_site_information_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/rss-publishing'] = array(
     'title' => 'RSS publishing',
@@ -787,6 +845,7 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_rss_feeds_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/clean-urls'] = array(
     'title' => 'Clean URLs',
@@ -794,6 +853,8 @@ function system_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('system_clean_url_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
+    'file' => 'system.admin.inc',
   );
   $items['admin/settings/clean-urls/check'] = array(
     'title' => 'Clean URL check',
@@ -801,6 +862,7 @@ function system_menu() {
     'page arguments' => array(array('status' => TRUE)),
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
 
   // Reports.
@@ -812,6 +874,7 @@ function system_menu() {
     'access arguments' => array('admin/reports', 'access site reports'),
     'weight' => 5,
     'position' => 'left',
+    'file' => 'system.admin.inc',
   );
   $items['admin/reports/status'] = array(
     'title' => 'Status report',
@@ -819,24 +882,28 @@ function system_menu() {
     'page callback' => 'system_status',
     'weight' => 10,
     'access arguments' => array('administer site configuration'),
+    'file' => 'system.admin.inc',
   );
   $items['admin/reports/status/run-cron'] = array(
     'title' => 'Run cron',
     'page callback' => 'system_run_cron',
     'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   $items['admin/reports/status/php'] = array(
     'title' => 'PHP',
     'page callback' => 'system_php',
     'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   // Default page for batch operations.
   $items['batch'] = array(
     'page callback' => 'system_batch_page',
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
+    'file' => 'system.admin.inc',
   );
   return $items;
 }
@@ -1271,7 +1338,7 @@ function system_filetransfer_backends() 
       'weight' => 0,
     );
   }
-  
+
   if (ini_get('allow_url_fopen')) {
     $backends['ftp_wrapper'] = array(
       'title' => t('FTP using file streams'),
@@ -1280,7 +1347,7 @@ function system_filetransfer_backends() 
       'weight' => 10,
     );
   }
-  
+
   // SSH2 lib connection is only available if the proper PHP extension is
   // installed.
   if (function_exists('ssh2_connect')) {
@@ -1306,7 +1373,7 @@ function system_filetransfer_backends() 
 function system_get_filetransfer_settings_form($filetransfer_backend_name, $defaults) {
   $available_backends = module_invoke_all('filetransfer_backends');
   $form = call_user_func($available_backends[$filetransfer_backend_name]['settings_form']);
-  
+
   foreach ($form as $name => &$element) {
     if (isset($defaults[$name])) {
       $element['#default_value'] = $defaults[$name];
@@ -1338,30 +1405,30 @@ function system_filetransfer_backend_for
  */
 function _system_filetransfer_backend_form_common() {
   $form = array();
-  
+
   $form['hostname'] = array (
     '#type' => 'textfield',
     '#title' => t('Host'),
     '#default_value' => 'localhost',
   );
-  
+
   $form['port'] = array (
     '#type' => 'textfield',
     '#title' => t('Port'),
     '#default_value' => NULL,
   );
-  
+
   $form['username'] = array (
     '#type' => 'textfield',
     '#title' => t('Username'),
   );
-  
+
   $form['password'] = array (
     '#type' => 'password',
     '#title' => t('Password'),
     '#description' => t('This is not saved in the database and is only used to test the connection'),
   );
-  
+
   return $form;
 }
 
@@ -1640,7 +1707,7 @@ function system_admin_menu_block($item) 
  */
 function system_check_directory($form_element) {
   $directory = $form_element['#value'];
-  
+
   if (!is_dir($directory) && !drupal_mkdir($directory, NULL, TRUE)) {
     // If the directory does not exists and cannot be created.
     form_set_error($form_element['#parents'][0], t('The directory %directory does not exist and could not be created.', array('%directory' => $directory)));
@@ -1797,6 +1864,7 @@ function _system_get_module_data() {
     'version' => NULL,
     'php' => DRUPAL_MINIMUM_PHP,
     'files' => array(),
+    'bootstrap' => 0,
   );
 
   // Read info files for each module.
@@ -1835,6 +1903,22 @@ function system_get_module_data() {
   ksort($modules);
   system_get_files_database($modules, 'module');
   system_update_files_database($modules, 'module');
+  // Refresh bootstrap status.
+  $bootstrap_modules = array();
+  foreach (bootstrap_hooks() as $hook) {
+    foreach (module_implements($hook) as $module) {
+      $bootstrap_modules[] = $module;
+    }
+  }
+  $query = db_update('system')->fields(array('bootstrap' => 0));
+  if ($bootstrap_modules) {
+    db_update('system')
+      ->fields(array('bootstrap' => 1))
+      ->condition('name', $bootstrap_modules, 'IN')
+      ->execute();
+    $query->condition('name', $bootstrap_modules, 'NOT IN');
+  }
+  $query->execute();
   $modules = _module_build_dependencies($modules);
   return $modules;
 }
@@ -2584,7 +2668,7 @@ function system_actions_configure($form_
 function system_actions_configure_validate($form, $form_state) {
   $function = actions_function_lookup($form_state['values']['actions_action']) . '_validate';
   // Hand off validation to the action.
-  if (drupal_function_exists($function)) {
+  if (function_exists($function)) {
     $function($form, $form_state);
   }
 }
@@ -2744,7 +2828,7 @@ function system_send_email_action($objec
   }
 
   $recipient = token_replace($context['recipient'], $context);
-  
+
   $language = user_preferred_language($account);
   $params = array('context' => $context);
 
@@ -2937,10 +3021,11 @@ function theme_meta_generator_header($ve
  * Implement hook_image_toolkits().
  */
 function system_image_toolkits() {
+  include_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'system') . '/' . 'image.gd.inc';
   return array(
     'gd' => array(
       'title' => t('GD2 image manipulation toolkit'),
-      'available' => drupal_function_exists('image_gd_check_settings') && image_gd_check_settings(),
+      'available' => function_exists('image_gd_check_settings') && image_gd_check_settings(),
     ),
   );
 }
@@ -2968,18 +3053,18 @@ function system_retrieve_file($url, $des
   }
   $parsed_url = parse_url($url);
   $local = is_dir(file_directory_path() . '/' . $destination) ? $destination . '/' . basename($parsed_url['path']) : $destination;
-  
+
   if (!$overwrite && file_exists($local)) {
     drupal_set_message(t('@remote could not be saved. @local already exists', array('@remote' => $url, '@local' => $local)), 'error');
     return FALSE;
   }
-  
+
   $result = drupal_http_request($url);
   if ($result->code != 200 || !file_save_data($result->data, $local)) {
     drupal_set_message(t('@remote could not be saved.', array('@remote' => $url)), 'error');
     return FALSE;
   }
-  
+
   return $local;
 }
 

=== modified file 'modules/system/system.test'
--- modules/system/system.test	2009-08-22 16:01:09 +0000
+++ modules/system/system.test	2009-08-22 17:45:49 +0000
@@ -41,7 +41,7 @@ class ModuleTestCase extends DrupalWebTe
    *   Expected module state.
    */
   function assertModules(array $modules, $enabled) {
-    module_list(TRUE);
+    module_list(TRUE, FALSE);
     foreach ($modules as $module) {
       if ($enabled) {
         $message = 'Module "@module" is enabled.';
@@ -1150,7 +1150,7 @@ class TokenReplaceTestCase extends Drupa
     // passed properly through the call stack and being handled correctly by a 'known'
     // token, [node:title].
     $this->assertFalse(strcmp($target, $result), t('Basic placeholder tokens replaced.'));
-    
+
     $raw_tokens = array(
       'node' => array('title' => '[node:title]'),
     );

=== modified file 'modules/taxonomy/taxonomy.module'
--- modules/taxonomy/taxonomy.module	2009-08-22 14:34:17 +0000
+++ modules/taxonomy/taxonomy.module	2009-08-22 17:45:49 +0000
@@ -196,6 +196,7 @@ function taxonomy_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('taxonomy_overview_vocabularies'),
     'access arguments' => array('administer taxonomy'),
+    'file' => 'taxonomy.admin.inc',
   );
 
   $items['admin/structure/taxonomy/list'] = array(
@@ -210,6 +211,7 @@ function taxonomy_menu() {
     'page arguments' => array('taxonomy_form_vocabulary'),
     'access arguments' => array('administer taxonomy'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'taxonomy.admin.inc',
   );
 
   $items['taxonomy/term/%taxonomy_term'] = array(
@@ -220,6 +222,7 @@ function taxonomy_menu() {
     'page arguments' => array(2),
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    'file' => 'taxonomy.pages.inc',
   );
 
   $items['taxonomy/term/%taxonomy_term/view'] = array(
@@ -234,6 +237,7 @@ function taxonomy_menu() {
     'access arguments' => array('administer taxonomy'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10,
+    'file' => 'taxonomy.pages.inc',
   );
   $items['taxonomy/term/%taxonomy_term/feed'] = array(
     'title' => 'Taxonomy term',
@@ -243,12 +247,14 @@ function taxonomy_menu() {
     'page arguments' => array(2),
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    'file' => 'taxonomy.feeds.inc',
   );
   $items['taxonomy/autocomplete'] = array(
     'title' => 'Autocomplete taxonomy',
     'page callback' => 'taxonomy_autocomplete',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,
+    'file' => 'taxonomy.pages.inc',
   );
   // TODO: remove with taxonomy_term_node_*
   $items['taxonomy/autocomplete/legacy'] = array(
@@ -266,6 +272,7 @@ function taxonomy_menu() {
     'title arguments' => array(3),
     'access arguments' => array('administer taxonomy'),
     'type' => MENU_CALLBACK,
+    'file' => 'taxonomy.admin.inc',
   );
 
   $items['admin/structure/taxonomy/%taxonomy_vocabulary/edit'] = array(
@@ -281,6 +288,7 @@ function taxonomy_menu() {
     'access arguments' => array('administer taxonomy'),
     'type' => MENU_LOCAL_TASK,
     'weight' => -10,
+    'file' => 'taxonomy.admin.inc',
   );
 
   $items['admin/structure/taxonomy/%taxonomy_vocabulary/add'] = array(
@@ -289,6 +297,7 @@ function taxonomy_menu() {
     'page arguments' => array('taxonomy_form_term', 3),
     'access arguments' => array('administer taxonomy'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'taxonomy.admin.inc',
   );
 
   return $items;

=== modified file 'modules/tracker/tracker.module'
--- modules/tracker/tracker.module	2009-05-27 18:33:54 +0000
+++ modules/tracker/tracker.module	2009-08-22 15:04:51 +0000
@@ -28,6 +28,7 @@ function tracker_menu() {
     'page callback' => 'tracker_page',
     'access arguments' => array('access content'),
     'weight' => 1,
+    'file' => 'tracker.pages.inc',
   );
   $items['tracker/all'] = array(
     'title' => 'All recent posts',
@@ -48,6 +49,7 @@ function tracker_menu() {
     'access callback' => '_tracker_user_access',
     'access arguments' => array(1),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'tracker.pages.inc',
   );
   $items['user/%user/track/posts'] = array(
     'title' => 'Track posts',

=== modified file 'modules/translation/translation.module'
--- modules/translation/translation.module	2009-08-22 14:34:17 +0000
+++ modules/translation/translation.module	2009-08-22 17:45:49 +0000
@@ -63,6 +63,7 @@ function translation_menu() {
     'access arguments' => array(1),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
+    'file' => 'translation.pages.inc',
   );
   return $items;
 }

=== modified file 'modules/trigger/trigger.module'
--- modules/trigger/trigger.module	2009-08-22 15:35:36 +0000
+++ modules/trigger/trigger.module	2009-08-22 17:48:03 +0000
@@ -40,6 +40,7 @@ function trigger_menu() {
     'description' => 'Tell Drupal when to execute actions.',
     'page callback' => 'trigger_assign',
     'access arguments' => array('administer actions'),
+    'file' => 'trigger.admin.inc',
   );
 
   // Explicitly define the system menu item so we can label it "cron" rather
@@ -50,6 +51,7 @@ function trigger_menu() {
     'page arguments' => array('system'),
     'access arguments' => array('administer actions'),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'trigger.admin.inc',
   );
 
   // We want contributed modules to be able to describe
@@ -73,6 +75,7 @@ function trigger_menu() {
       'page arguments' => array($module),
       'access arguments' => array('administer actions'),
       'type' => MENU_LOCAL_TASK,
+      'file' => 'trigger.admin.inc',
     );
   }
   $items['admin/structure/trigger/unassign'] = array(
@@ -82,6 +85,7 @@ function trigger_menu() {
     'page arguments' => array('trigger_unassign'),
     'access arguments' => array('administer actions'),
     'type' => MENU_CALLBACK,
+    'file' => 'trigger.admin.inc',
   );
 
   return $items;

=== modified file 'modules/update/update.module'
--- modules/update/update.module	2009-08-22 14:34:17 +0000
+++ modules/update/update.module	2009-08-22 17:45:49 +0000
@@ -132,6 +132,7 @@ function update_menu() {
     'page callback' => 'update_status',
     'access arguments' => array('administer site configuration'),
     'weight' => 10,
+    'file' => 'update.report.inc',
   );
   $items['admin/settings/updates'] = array(
     'title' => 'Updates',
@@ -139,12 +140,14 @@ function update_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('update_settings'),
     'access arguments' => array('administer site configuration'),
+    'file' => 'update.settings.inc',
   );
   $items['admin/reports/updates/check'] = array(
     'title' => 'Manual update check',
     'page callback' => 'update_manual_status',
     'access arguments' => array('administer site configuration'),
     'type' => MENU_CALLBACK,
+    'file' => 'update.fetch.inc',
   );
 
   return $items;

=== modified file 'modules/upload/upload.module'
--- modules/upload/upload.module	2009-08-22 14:34:17 +0000
+++ modules/upload/upload.module	2009-08-22 17:45:49 +0000
@@ -99,6 +99,7 @@ function upload_menu() {
     'page arguments' => array('upload_admin_settings'),
     'access arguments' => array('administer site configuration'),
     'type' => MENU_NORMAL_ITEM,
+    'file' => 'upload.admin.inc',
   );
   return $items;
 }

=== modified file 'modules/user/user.admin.inc'
--- modules/user/user.admin.inc	2009-08-22 14:34:17 +0000
+++ modules/user/user.admin.inc	2009-08-22 17:45:49 +0000
@@ -966,7 +966,7 @@ function user_modules_installed($modules
 function user_modules_uninstalled($modules) {
   $permissions = array();
   foreach ($modules as $module) {
-    if (drupal_function_exists($module . '_permission')) {
+    if (function_exists($module . '_permission')) {
       $permissions = array_merge($permissions, array_keys(module_invoke($module, 'permission')));
     }
   }

=== modified file 'modules/user/user.module'
--- modules/user/user.module	2009-08-22 14:34:17 +0000
+++ modules/user/user.module	2009-08-22 17:45:49 +0000
@@ -433,7 +433,7 @@ function user_save($account, $edit = arr
       if (($picture->status & FILE_STATUS_PERMANENT) == 0) {
         $info = image_get_info($picture->uri);
         $picture_directory =  variable_get('file_default_scheme', 'public') . '://' . variable_get('user_picture_path', 'pictures');
-        
+
         // Prepare the pictures directory.
         file_prepare_directory($picture_directory, FILE_CREATE_DIRECTORY);
         $destination = file_stream_wrapper_uri_normalize($picture_directory . '/picture-' . $account->uid . '.' . $info['extension']);
@@ -1298,6 +1298,7 @@ function user_menu() {
     'access callback' => 'user_access',
     'access arguments' => array('access user profiles'),
     'type' => MENU_CALLBACK,
+    'file' => 'user.pages.inc',
   );
 
   // Registration and login pages.
@@ -1306,6 +1307,7 @@ function user_menu() {
     'page callback' => 'user_page',
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
+    'file' => 'user.pages.inc',
   );
 
   $items['user/login'] = array(
@@ -1328,6 +1330,7 @@ function user_menu() {
     'page arguments' => array('user_pass'),
     'access callback' => 'user_is_anonymous',
     'type' => MENU_LOCAL_TASK,
+    'file' => 'user.pages.inc',
   );
   $items['user/reset/%/%/%'] = array(
     'title' => 'Reset password',
@@ -1335,6 +1338,7 @@ function user_menu() {
     'page arguments' => array('user_pass_reset', 2, 3, 4),
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
+    'file' => 'user.pages.inc',
   );
 
   $items['user/logout'] = array(
@@ -1343,6 +1347,7 @@ function user_menu() {
     'page callback' => 'user_logout',
     'weight' => 10,
     'menu_name' => 'user-menu',
+    'file' => 'user.pages.inc',
   );
 
   // User listing pages.
@@ -1354,6 +1359,7 @@ function user_menu() {
     'access arguments' => array('administer users'),
     'position' => 'left',
     'weight' => -4,
+    'file' => 'user.admin.inc',
   );
   $items['admin/people/list'] = array(
     'title' => 'List',
@@ -1382,6 +1388,7 @@ function user_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('user_admin_settings'),
     'access arguments' => array('administer users'),
+    'file' => 'user.admin.inc',
     'weight' => -10,
   );
   $items['admin/config/people/accounts/settings'] = array(
@@ -1397,6 +1404,7 @@ function user_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('user_admin_new_role'),
     'access arguments' => array('administer permissions'),
+    'file' => 'user.admin.inc',
     'weight' => -9,
   );
   $items['admin/config/people/roles/edit'] = array(
@@ -1411,6 +1419,7 @@ function user_menu() {
     'page callback' => 'drupal_get_form',
     'page arguments' => array('user_admin_permissions'),
     'access arguments' => array('administer permissions'),
+    'file' => 'user.admin.inc',
     'weight' => -8,
   );
 
@@ -1424,6 +1433,7 @@ function user_menu() {
     'access arguments' => array(1),
     'weight' => -10,
     'menu_name' => 'user-menu',
+    'file' => 'user.pages.inc',
   );
 
   $items['user/%user/view'] = array(
@@ -1439,6 +1449,7 @@ function user_menu() {
     'access callback' => 'user_cancel_access',
     'access arguments' => array(1),
     'type' => MENU_CALLBACK,
+    'file' => 'user.pages.inc',
   );
 
   $items['user/%user/cancel/confirm/%/%'] = array(
@@ -1448,6 +1459,7 @@ function user_menu() {
     'access callback' => 'user_cancel_access',
     'access arguments' => array(1),
     'type' => MENU_CALLBACK,
+    'file' => 'user.pages.inc',
   );
 
   $items['user/%user/edit'] = array(
@@ -1457,6 +1469,7 @@ function user_menu() {
     'access callback' => 'user_edit_access',
     'access arguments' => array(1),
     'type' => MENU_LOCAL_TASK,
+    'file' => 'user.pages.inc',
   );
 
   $items['user/%user_category/edit/account'] = array(
@@ -1480,6 +1493,7 @@ function user_menu() {
           'weight' => $category['weight'],
           'load arguments' => array('%map', '%index'),
           'tab_parent' => 'user/%/edit',
+          'file' => 'user.pages.inc',
         );
       }
     }
@@ -1711,7 +1725,7 @@ function user_login_authenticate_validat
 
 /**
  * The final validation handler on the login form.
- * 
+ *
  * Sets a form error if user has not been authenticated, or if too many
  * logins have been attempted. This validation function should always
  * be the last one.

=== modified file 'update.php'
--- update.php	2009-08-21 06:40:05 +0000
+++ update.php	2009-08-22 15:04:56 +0000
@@ -281,7 +281,7 @@ if (empty($op) && $update_access_allowed
   include_once DRUPAL_ROOT . '/includes/module.inc';
   $module_list['system']['filename'] = 'modules/system/system.module';
   $module_list['filter']['filename'] = 'modules/filter/filter.module';
-  module_list(TRUE, FALSE, $module_list);
+  module_list(TRUE, FALSE, FALSE, $module_list);
   drupal_load('module', 'system');
   drupal_load('module', 'filter');
 

