=== modified file 'includes/module.inc'
--- includes/module.inc	2009-08-24 00:14:18 +0000
+++ includes/module.inc	2009-09-26 15:44:47 +0000
@@ -18,6 +18,32 @@ function module_load_all($bootstrap = FA
 }
 
 /**
+ * Load all of a given include file for enabled modules.
+ *
+ * Modules may place code into named include files that will not be loaded
+ * automatically when Drupal initializes. Other modules may then include
+ * such files en masse when necessary using this function. That is particularly
+ * useful for modules that have optional integration with another module,
+ * as then the integration code will not be loaded if it is not needed
+ * but can be easily loaded for all modules when necessary with a single
+ * function call.
+ *
+ * @param $group
+ *   The grouping key of the include file to be loaded. The file must be named
+ *   in the form $module.$group.inc, where $group is the value specified here
+ *   and $module is whatever module is providing the include.
+ */
+function module_include_all($group) {
+	foreach (module_list() as $module) {
+	  $file = drupal_get_path('module', $module) . "/{$module}.{$group}.inc";
+	  if (file_exists($file)) {
+	    include_once($file);
+	  }
+	}
+  module_implements('', FALSE, TRUE);
+}
+
+/**
  * Collect a list of all loaded modules. During the bootstrap, return only
  * vital modules. See bootstrap.inc
  *

