Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autoload/README.txt,v
retrieving revision 1.1
diff -u -p -r1.1 README.txt
--- README.txt	3 Oct 2008 05:43:31 -0000	1.1
+++ README.txt	10 Jun 2010 14:13:58 -0000
@@ -25,7 +25,15 @@ it loads normally.  If not, it generates
 if there had been no autoload functions.  The catch, of course, is making sure
 the autoload functions know how to find the requested class.
 
-This module provides two hooks, hook_autoload_info() and hook_autoload_info_alter().  
+The simplest way to support autoloading of your classes is to list any files
+containing classes in your .info file:
+
+name = "Example"
+description = "Example module with classes"
+files[] = my.base.classes.inc
+files[] = include/handlers/my.handlers.inc
+
+This module also provides two hooks, hook_autoload_info() and hook_autoload_info_alter().  
 Both are extremely simple.
 
 hook_autoload_info() is a registry-style hook.  That is, it must return an
Index: autoload.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autoload/Attic/autoload.install,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 autoload.install
--- autoload.install	3 Jun 2010 03:33:11 -0000	1.1.2.2
+++ autoload.install	10 Jun 2010 14:13:58 -0000
@@ -2,6 +2,96 @@
 // $Id: autoload.install,v 1.1.2.2 2010/06/03 03:33:11 crell Exp $
 
 /**
+ * Implementation of hook_schema().
+ */
+function autoload_schema() {
+  $schema = array();
+  $schema['registry'] = array(
+    'description' => "Each record is a function, class, or interface name and the file it is in.",
+    'fields' => array(
+      'name'   => array(
+        'description' => 'The name of the function, class, or interface.',
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'type'   => array(
+        'description' => 'Either function or class or interface.',
+        'type' => 'varchar',
+        'length' => 9,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'filename'   => array(
+        'description' => 'Name of the file.',
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+      ),
+      'module' => array(
+        'description' => 'Name of the module the file belongs to.',
+        'type' => 'varchar',
+        'length' => 255,
+        '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',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('name', 'type'),
+    'indexes' => array(
+      'hook' => array('type', 'weight', 'module'),
+    ),
+  );
+
+  $schema['registry_file'] = array(
+    'description' => "Files parsed to build the registry.",
+    'fields' => array(
+      'filename'   => array(
+        'description' => 'Path to the file.',
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+      ),
+      'filectime'  => array(
+        'description' => "The creation time of the file when last parsed.",
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'filemtime'  => array(
+        'description' => "The modification time of the file when last parsed.",
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('filename'),
+  );
+
+  return $schema;
+}
+
+/**
+ * Implementation of hook_install().
+ */
+function autoload_install() {
+  drupal_install_schema('autoload');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function autoload_uninstall() {
+  drupal_uninstall_schema('autoload');
+}
+
+/**
  * Implementaton of hook_enable().
  */
 function autoload_enable() {
@@ -18,3 +108,14 @@ function autoload_update_6001() {
 
   return array();
 }
+
+/**
+ * Add the registry and registry_file tables.
+ */
+function autoload_update_6002() {
+  $ret = array();
+  $schema = autoload_schema();
+  db_create_table($ret, 'registry', $schema['registry']);
+  db_create_table($ret, 'registry_file', $schema['registry_file']);
+  return $ret;
+}
Index: autoload.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/autoload/autoload.module,v
retrieving revision 1.1.2.9
diff -u -p -r1.1.2.9 autoload.module
--- autoload.module	10 Jun 2010 05:39:38 -0000	1.1.2.9
+++ autoload.module	10 Jun 2010 14:13:58 -0000
@@ -76,3 +76,22 @@ function autoload_get_lookup($reset = FA
     return $lookup;
   }
 }
+
+/**
+ * Implementation of hook_autoload_info().
+  */
+function autoload_autoload_info() {
+  // Update the registry with any changed files
+  require_once drupal_get_path('module', 'autoload') . '/registry.inc';
+  registry_update();
+
+  // Add registered classes
+  $classes = array();
+  $result = db_query("SELECT name, filename FROM {registry}");
+  while ($row = db_fetch_object($result)) {
+    // Indicate that the filename is relative to Drupal root
+    $classes[$row->name] =
+      array('file' => $row->filename, 'file path' => '.');
+  }
+  return $classes;
+}
