? 000-api.patch
? 100-drush-weight.patch
? 763442-api.patch
? 819904-domain0.patch
? domain_alias/domain_alias.domain.inc
? domain_conf/domain_conf.domain.inc
? domain_content/domain_content.domain.inc
? domain_source/domain_source.domain.inc
? domain_theme/domain_theme.domain.inc
Index: API.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/API.php,v
retrieving revision 1.61
diff -u -p -r1.61 API.php
--- API.php	17 May 2010 21:35:28 -0000	1.61
+++ API.php	27 Jun 2010 19:36:26 -0000
@@ -32,7 +32,7 @@
  *
  * @ingroup domain_hooks
  */
-function hook_domainload(&$domain) {
+function hook_domain_load(&$domain) {
   // Add a variable to the $domain array.
   $domain['myvar'] = 'mydomainvar';
   // Remove the site_grant flag, making it so users can't see content for 'all affiliates.'
@@ -40,37 +40,49 @@ function hook_domainload(&$domain) {
 }
 
 /**
- * Notify other modules that we have created a new domain or
- * updated a domain record.
+ * Notify other modules that we have created a new domain.
  *
- * For 'update' and 'delete' operations, the $domain array holds the
- * original values of the domain record.  The $edit array will hold the
- * new, replacement values.  This is useful when making changes to
- * records, such as in domain_user_domainupdate().
+ * @param $domain
+ *  The domain record taken from {domain}, as an array.
+ * @param $form_values
+ *   The form values processed by the form.  Note that these are not editable since
+ *   module_invoke_all() cannot pass by reference.
+ *
+ * @ingroup domain_hooks
+ */
+function hook_domain_insert($domain, $form_values = array()) {
+  db_query("INSERT INTO {mytable} (subdomain, sitename) VALUES ('%s', '%s')", $domain['subdomain'], $domain['sitename']);
+}
+
+/**
+ * Notify other modules that we have updated a domain.
  *
- * @param $op
- *   The operation being performed: 'create', 'update', 'delete'
  * @param $domain
  *  The domain record taken from {domain}, as an array.
- * @param $form_state
+ * @param $form_values
  *   The form values processed by the form.  Note that these are not editable since
- *   module_invoke_all() cannot pass by reference.  We set $form_state to an array
- *   by default in case this hook gets called by a non-form function.
+ *   module_invoke_all() cannot pass by reference.
  *
  * @ingroup domain_hooks
  */
-function hook_domainupdate($op, $domain, $form_state = array()) {
-  switch ($op) {
-    case 'create':
-      db_query("INSERT INTO {mytable} (subdomain, sitename) VALUES ('%s', '%s')", $domain['subdomain'], $domain['sitename']);
-      break;
-    case 'update':
-      db_query("UPDATE {mytable} SET subdomain = '%s', sitename = '%s' WHERE domain_id = %d", $domain['subdomain'], $domain['sitename'], $domain['domain_id']);
-      break;
-    case 'delete':
-      db_query("DELETE FROM {mytable} WHERE subdomain = '%s'", $domain['subdomain']);
-      break;
-  }
+function hook_domain_update($domain, $form_values = array()) {
+  db_query("UPDATE {mytable} SET subdomain = '%s', sitename = '%s' WHERE domain_id = %d", $domain['subdomain'], $domain['sitename'], $domain['domain_id']);
+}
+
+/**
+ * Notify other modules that we have deleted a domain.
+ *
+ * @param $domain
+ *  The domain record taken from {domain}, as an array.
+ * @param $form_values
+ *   The form values processed by the form.  Note that these are not editable since
+ *   module_invoke_all() cannot pass by reference.
+ *
+ * @ingroup domain_hooks
+ */
+
+function hook_domain_delete($domain, $form_values = array()) {
+  db_query("DELETE FROM {mytable} WHERE subdomain = '%s'", $domain['subdomain']);
 }
 
 /**
@@ -95,7 +107,7 @@ function hook_domainupdate($op, $domain,
  *
  * @ingroup domain_hooks
  */
-function hook_domainlinks($domain) {
+function hook_domain_link($domain) {
   // These actions do not apply to the primary domain.
   if (user_access('my permission') && $domain['domain_id'] > 0) {
     $links[] = array(
@@ -127,7 +139,7 @@ function hook_domainlinks($domain) {
  *
  * @ingroup domain_hooks
  */
-function hook_domainnav($domain) {
+function hook_domain_nav($domain) {
   $extra = array();
   $extra['test'] = 'test';
   return $extra;
@@ -153,7 +165,7 @@ function hook_domainnav($domain) {
  *
  * @ingroup domain_hooks
  */
-function hook_domaincron($domain) {
+function hook_domain_cron($domain) {
   // Run a node query.
   $result = db_query_range(db_rewrite_sql("SELECT n.nid FROM {node} n ORDER BY n.changed"), 0, 1);
   $node = db_fetch_object($result);
@@ -168,11 +180,11 @@ function hook_domaincron($domain) {
  * This hook allows those modules to check to see if they have been installed
  * correctly.  Usually the module is enabled, but the required function is not.
  *
- * @see domain_conf_domaininstall()
+ * @see domain_conf_domain_install()
  *
  * @ingroup domain_hooks
  */
-function hook_domaininstall() {
+function hook_domain_install() {
   // If MyModule is being used, check to see that it is installed correctly.
   if (module_exists('mymodule') && !function_exists('_mymodule_load')) {
     drupal_set_message(t('MyModule is not installed correctly.  Please edit your settings.php file as described in <a href="!url">INSTALL.txt</a>', array('!url' => drupal_get_path('module', 'mymodule') . '/INSTALL.txt')));
@@ -191,7 +203,7 @@ function hook_domaininstall() {
  *   -- 'data' defines the data to be written in the column for the
  *       specified domain. These will match the order of your $header.
  * @param $domain
- *   The $domain object prepared by hook_domainload().
+ *   The $domain object prepared by hook_domain_load().
  * @return
  *   Return values vary based on the $op value.
  *   -- 'header' return a $header array formatted as per theme_table().
@@ -203,7 +215,7 @@ function hook_domaininstall() {
  *
  * @ingroup domain_hooks
  */
-function hook_domainview($op, $domain = array(), $query = NULL) {
+function hook_domain_view($op, $domain = array(), $query = NULL) {
   switch ($op) {
     case 'header':
       return array(array('data' => t('UID'), 'field' => 'de.uid'));
@@ -228,7 +240,7 @@ function hook_domainview($op, $domain = 
  * @return
  *   No return value.  The $form is modified by reference, as needed.
  */
-function hook_domainform(&$form) {
+function hook_domain_form(&$form) {
   // Add the form element to the main screen.
   $form['domain_mymodule'] = array(
     '#type' => 'fieldset',
@@ -261,7 +273,7 @@ function hook_domainform(&$form) {
  *
  * @ingroup domain_hooks
  */
-function hook_domainwarnings() {
+function hook_domain_warning() {
   // These are the forms for variables set by Domain Conf.
   $forms = array(
     'system_admin_theme_settings',
@@ -329,7 +341,7 @@ function hook_domain_source_path_alter(&
  *
  *  This hook is implemented by the Domain Conf module.
  *
- * You may wish to pair this hook with hook_domainbatch() to allow the mass update
+ * You may wish to pair this hook with hook_domain_batch() to allow the mass update
  * of your settings.
  *
  * If you wish to store settings that are not related to another module, you must pass
@@ -341,8 +353,8 @@ function hook_domain_source_path_alter(&
  * must be stored for the primary domain.  This feature is useful for creating special data
  * that needs to be associated with a domain record but does not need a separate table.
  *
- * Using the variable override of hook_domainconf() is an alternative to creating a module
- * and database table for use with hook_domainload().
+ * Using the variable override of hook_domain_conf() is an alternative to creating a module
+ * and database table for use with hook_domain_load().
  *
  * For site managers who wish to implement this hook in other modules, but cannot wait for
  * patches, you do not need to hack the code.  Simply put your functions inside a domain_conf.inc
@@ -354,7 +366,7 @@ function hook_domain_source_path_alter(&
  *
  *  @ingroup domain_hooks
  */
-function hook_domainconf() {
+function hook_domain_conf() {
   $form['pictures'] = array(
     '#type' => 'fieldset',
     '#title' => t('User picture'),
@@ -383,9 +395,9 @@ function hook_domainconf() {
  * of menu hook and form element.  The $batch array contains all the information
  * needed to create an administrative page and form that will process your settings.
  *
- * For a basic example, see domain_domainbatch().
+ * For a basic example, see domain_domain_batch().
  *
- * For a more complex example, with custom processing, see domain_theme_domainbatch().
+ * For a more complex example, with custom processing, see domain_theme_domain_batch().
  *
  * The $batch array is formatted according to the following rules:
  *
@@ -402,7 +414,7 @@ function hook_domainconf() {
  *  Use this when complex variables do not allow a normal usage.
  * - '#domain_action' [required] Indicates what submit action will be invoked for this setting.  Allowed values are:
  * --- 'domain' == writes the value to the {domain} table.  Normally, contributed modules will not use this option.
- * --- 'domain_conf' == writes the value to the {domain_conf} table.  Use in connection with hook_domainconf().
+ * --- 'domain_conf' == writes the value to the {domain_conf} table.  Use in connection with hook_domain_conf().
  * --- 'domain_delete' == used to delete rows from specific tables.  If this is used, the #table value must be present.
  * --- 'custom' == used if you need your own submit handler. Must be paired with a #submit parameter.
  *
@@ -446,7 +458,7 @@ function hook_domainconf() {
  *
  * @ingroup domain_hooks
  */
-function hook_domainbatch() {
+function hook_domain_batch() {
   // A simple function to rename my setting in Domain Configuration.
   $batch = array();
   $batch['mysetting'] = array(
@@ -476,7 +488,7 @@ function hook_domainbatch() {
  * @return
  *   An array of form ids that should not run through domain_form_alter.
  */
-function hook_domainignore() {
+function hook_domain_ignore() {
   // User login should always be from the current domain.
   return array('user_login');
 }
@@ -592,7 +604,7 @@ function hook_domain_bootstrap_full($dom
  *
  * @ingroup domain_hooks
  */
-function hook_domainpath($domain_id, &$path, $path_language = '') {
+function hook_domain_path($domain_id, &$path, $path_language = '') {
   // Give a normal path alias
   $path = drupal_get_path_alias($path);
 }
@@ -606,7 +618,7 @@ function hook_domainpath($domain_id, &$p
  *
  * Use this function if you need to reset a domain-specific variable
  * from your own code. It is especially useful in conjunction with
- * hook_domainupdate().
+ * hook_domain_update().
  *
  * @link http://drupal.org/node/367963
  *
@@ -666,14 +678,14 @@ function hook_domain_nav_options_alter(&
 
 /**
  * Allows modules to remove form_ids from the list set
- * by hook_domainwarnings().
+ * by hook_domain_warning().
  *
  * Required by Domain Settings, whose code is shown below.
  *
  * @param &$forms
  *   An array of form_ids, passed by reference.
  */
-function hook_domain_warnings_alter(&$forms) {
+function hook_domain_warning_alter(&$forms) {
   // Forms which Domain Settings handles and are set as warnings.
   $core_forms = array(
     'system_admin_theme_settings',
Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/README.txt,v
retrieving revision 1.80
diff -u -p -r1.80 README.txt
--- README.txt	6 Jun 2010 20:50:26 -0000	1.80
+++ README.txt	27 Jun 2010 19:36:26 -0000
@@ -1025,7 +1025,7 @@ are available by default.
   - Edit all domain status flags
 
 Additional batch actions are made available for the Domain Configuration
-module.  Other modules may Implements hook_domainbatch() to provide
+module.  Other modules may Implements hook_domain_batch() to provide
 additional batch actions.
 
 It may be necessary to enter the batch form from the primary domain.
Index: domain.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.admin.inc,v
retrieving revision 1.67
diff -u -p -r1.67 domain.admin.inc
--- domain.admin.inc	6 Jun 2010 20:50:27 -0000	1.67
+++ domain.admin.inc	27 Jun 2010 19:36:27 -0000
@@ -28,7 +28,7 @@ function domain_view() {
     array('data' => t('Scheme'), 'field' => 'd.scheme'),
   );
   // Get header elements from other modules
-  $extra = module_invoke_all('domainview', 'header');
+  $extra = module_invoke_all('domain_view', 'header');
   $header = array_merge($header, $extra);
   $header[] = array('data' => t('Actions'));
 
@@ -40,7 +40,7 @@ function domain_view() {
   $query = db_select('domain', 'd')
     ->fields('d', array('domain_id', 'sitename', 'subdomain', 'scheme', 'valid', 'weight'));
   // Get any tablesort sql from other modules.
-  module_invoke_all('domainview', 'query', array(), $query);
+  module_invoke_all('domain_view', 'query', array(), $query);
   // Add the tablesort.
   $query = $query
     ->extend('TableSort')
@@ -72,7 +72,7 @@ function domain_view() {
     }
     // Add advanced settings from other modules.
     $items = array();
-    $items = module_invoke_all('domainlinks', $domain);
+    $items = module_invoke_all('domain_link', $domain);
     if (!empty($items)) {
       foreach ($items as $item) {
         if (!empty($item)) {
@@ -85,8 +85,8 @@ function domain_view() {
     $row = array($domain['weight'], ($domain['domain_id'] == $_domain['domain_id']) ? '<strong>' . $link . '</strong>' : $link, filter_xss_admin($domain['sitename']), $domain['domain_id'], $valid, $domain['scheme']);
     // Let other modules add data.
     $data = array();
-    foreach (module_implements('domainview') as $module) {
-      $add = module_invoke($module, 'domainview', 'data', $domain);
+    foreach (module_implements('domain_view') as $module) {
+      $add = module_invoke($module, 'domain_view', 'data', $domain);
       $row = array_merge($row, $add);
     }
     // Add the actions.
@@ -112,7 +112,7 @@ function domain_view() {
 function domain_configure() {
   if (empty($_POST)) {
     // Is the module installed correctly?
-    module_invoke_all('domaininstall');
+    module_invoke_all('domain_install');
   }
   // Return the configuration form.
   return drupal_get_form('domain_configure_form');
@@ -318,10 +318,10 @@ function domain_configure_form($form, $f
   );
 
   // Allow submodules to add elements to the form.
-  $modules = module_implements('domainform');
+  $modules = module_implements('domain_form');
   if (!empty($modules)) {
     foreach ($modules as $module) {
-      $func = $module . '_domainform';
+      $func = $module . '_domain_form';
       $func($form);
     }
   }
@@ -365,7 +365,7 @@ function domain_configure_form_submit($f
     ))
     ->execute();
   // Allow other modules to respond to changes.
-  module_invoke_all('domainupdate', 'update', domain_default(TRUE));
+  module_invoke_all('domain_update', domain_default(TRUE));
 }
 
 /**
@@ -583,7 +583,7 @@ function domain_delete_form_submit($form
     ->execute();
 
   // Let other modules act.
-  module_invoke_all('domainupdate', 'delete', $domain, $form_state);
+  module_invoke_all('domain_delete', $domain, $form_state['values']);
 
   // Hide the message from the Domain User module.
   if (empty($form_state['values']['domain_arguments']['user_submitted'])) {
@@ -671,7 +671,7 @@ function domain_check_response($domain) 
  *
  * @param $action
  *   The name of the action to perform; corresponds to the keys of the $batch array
- *   returned by hook_domainbatch().
+ *   returned by hook_domain_batch().
  * @return
  *   The appropriate form, or a list of actions, or an error.
  */
@@ -682,7 +682,7 @@ function domain_batch($action = NULL) {
     return t('There are no domains configured for this site.');
   }
 
-  $batch = module_invoke_all('domainbatch');
+  $batch = module_invoke_all('domain_batch');
   // We must have some actions, otherwise, no point.
   if (empty($batch)) {
     return t('There are no batch actions configured.');
@@ -720,7 +720,7 @@ function domain_batch($action = NULL) {
  * Lists available batch updates for the domain module.
  *
  * @param $batch
- *   An array of batch actions, as defined by hook_domainbatch().
+ *   An array of batch actions, as defined by hook_domain_batch().
  * @return
  *   A themed table of links and descriptions for batch actions.
  */
@@ -768,9 +768,9 @@ function domain_batch_sort($a, $b) {
  *   The current form state, passed by FormsAPI.
  * @param $action
  *   The name of the action to perform; corresponds to the keys of the $batch array
- *   returned by hook_domainbatch().
+ *   returned by hook_domain_batch().
  * @param $batch
- *   The batch data for this $action, as defined by hook_domainbatch().
+ *   The batch data for this $action, as defined by hook_domain_batch().
  * @param $domains
  *   The current settings for each domain.
  * @return
Index: domain.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.drush.inc,v
retrieving revision 1.2
diff -u -p -r1.2 domain.drush.inc
--- domain.drush.inc	1 Apr 2010 21:08:36 -0000	1.2
+++ domain.drush.inc	27 Jun 2010 19:36:27 -0000
@@ -42,6 +42,7 @@ function drush_domain_list() {
     'scheme' => dt('scheme'),
     'valid' => dt('active'),
     'domain_id' => dt('domain_id'),
+    'weight' => dt('weight'),
   );
   $rows = array(array_values($header));
   foreach ($domains as $domain) {
Index: domain.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.module,v
retrieving revision 1.197
diff -u -p -r1.197 domain.module
--- domain.module	19 Jun 2010 19:00:58 -0000	1.197
+++ domain.module	27 Jun 2010 19:36:27 -0000
@@ -220,7 +220,7 @@ function domain_menu() {
     'weight' => -6
   );
   // Register the batch actions as menu callbacks
-  $batch = module_invoke_all('domainbatch');
+  $batch = module_invoke_all('domain_batch');
   if (!empty($batch)) {
     $items['admin/config/domain/batch'] = array(
       'title' => 'Batch updating',
@@ -334,6 +334,81 @@ function domain_theme($existing, $type, 
 }
 
 /**
+ * Implements hook_hook_info().
+ *
+ * Allows the use of $module.domain.inc files.
+ */
+function domain_hook_info() {
+  $hooks['domain_load'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_insert'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_update'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_delete'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_link'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_cron'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_install'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_ignore'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_view'] = array(
+    'group' => 'domain',
+  );
+  // Replace with form alter?
+  $hooks['domain_form'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_warning'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_source_alter'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_source_path_alter'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_batch'] = array(
+    'group' => 'domain',
+  );
+  // Test that these work.
+  $hooks['domain_bootstrap_lookup'] = array(
+    'group' => 'domain',
+  );
+  // Test that these work.
+  $hooks['domain_bootstrap_full'] = array(
+    'group' => 'domain',
+  );
+  // Rename to hook_domain_path
+  $hooks['domain_path'] = array(
+    'group' => 'domain',
+  );
+  // Rename to hook_domain_warning_alter
+  $hooks['domain_warning_alter'] = array(
+    'group' => 'domain',
+  );
+  // Replace with form_alter?
+  $hooks['domain_settings'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_validate_alter'] = array(
+    'group' => 'domain',
+  );
+  return $hooks;
+}
+
+/**
  * Implements hook_block_info().
  */
 function domain_block_info() {
@@ -767,12 +842,12 @@ function domain_update_users($form, &$fo
  /**
  * Implements hook_cron()
  *
- * This function invokes hook_domaincron() and allows
+ * This function invokes hook_domain_cron() and allows
  * Domain Access modules to run functions for all active affiliates.
  */
 function domain_cron() {
   // Check to see if this function is needed at all.
-  $modules = module_implements('domaincron');
+  $modules = module_implements('domain_cron');
   if (!empty($modules)) {
     // Get the domain list.
     $domains = domain_domains();
@@ -780,7 +855,7 @@ function domain_cron() {
     foreach ($domains as $domain) {
       domain_set_domain($domain['domain_id'], TRUE);
       foreach ($modules as $module) {
-        module_invoke($module, 'domaincron', $domain);
+        module_invoke($module, 'domain_cron', $domain);
       }
     }
     // Reset the active domain.
@@ -813,28 +888,29 @@ function domain_load($domain_id = NULL) 
  * Domain save function.
  *
  * @param $values
- *   Form value information.
- * @param $edit
- *   Form state information.
+ *   Form value information required to edit a domain.
+ * @param $form_values
+ *   Form values passed to the submit handler. May be used by other
+ *   modules.
  * @return
  *   $domain array on success or -1 on failure.
  */
-function domain_save($values, $edit) {
+function domain_save($values, $form_values) {
   // Update or insert a record?
   $update = (isset($values['domain_id']) && is_numeric($values['domain_id'])) ? array('domain_id') : array();
 
   if (!empty($update)) {
-    $action = 'update';
+    $action = 'domain_update';
   }
   else {
-    $action = 'create';
+    $action = 'domain_insert';
   }
 
   drupal_write_record('domain', $values, $update);
 
   // Let other modules act.
   $domain = domain_lookup(NULL, $values['subdomain']);
-  module_invoke_all('domainupdate', $action, $domain, $edit);
+  module_invoke_all($action, $domain, $form_values);
   // Return the recorded domain.
   return $domain;
 }
@@ -842,7 +918,7 @@ function domain_save($values, $edit) {
 /**
  * Runs a lookup against the {domain} table.  One of the two values must be present
  *
- * This function also calls hook_domainload(), which lets module developers overwrite
+ * This function also calls hook_domain_load(), which lets module developers overwrite
  * or add to the $domain array.
  *
  * @param $domain_id
@@ -853,7 +929,7 @@ function domain_save($values, $edit) {
  *   A boolean flag to clear the static variable if necessary.
  * @return
  *   An array containing the requested row from the {domain} table, plus the
- *   elements added by hook_domainload().  Returns -1 on failure.
+ *   elements added by hook_domain_load().  Returns -1 on failure.
  */
 function domain_lookup($domain_id = NULL, $subdomain = NULL, $reset = FALSE) {
   static $domains;
@@ -956,7 +1032,7 @@ function domain_set_primary_domain() {
   variable_set('domain_sitename', $site);
 
   // Allow other modules to respond to changes.
-  module_invoke_all('domainupdate', 'update', domain_default(TRUE));
+  module_invoke_all('domain_update', domain_default(TRUE));
 }
 
 /**
@@ -1176,24 +1252,24 @@ function domain_get_user_domains($accoun
 }
 
 /**
- * Helper function for passing hook_domainload() by reference.
+ * Helper function for passing hook_domain_load() by reference.
  *
  * @param $domain
  *   The domain array defined by domain_lookup().
  * @param $reset
  *    A boolean flag to clear the static variable if necessary.
  * @return
- *   The $domain array, modified by reference by hook_domainload() implementations.
+ *   The $domain array, modified by reference by hook_domain_load() implementations.
  */
 function domain_api($domain, $reset = FALSE) {
   static $_modules;
   if (!isset($_modules) || $reset) {
-    $_modules = module_implements('domainload');
+    $_modules = module_implements('domain_load');
   }
   if (!empty($_modules)) {
     foreach ($_modules as $module) {
       // Cannot use module_invoke_all() since these are passed by reference.
-      $function = $module . '_domainload';
+      $function = $module . '_domain_load';
       $function($domain);
     }
   }
@@ -1290,11 +1366,11 @@ function domain_check_primary($msg = 'de
 }
 
 /**
- * Implements hook_domainload()
+ * Implements hook_domain_load()
  *
  * Adds the home page 'path' and 'site_grant' boolean.
  */
-function domain_domainload(&$domain) {
+function domain_domain_load(&$domain) {
   // Get the path to the home page for this domain.
   $domain['path'] = domain_get_path($domain);
   // Grant access to all affiliates.
@@ -1840,7 +1916,7 @@ function domain_enable() {
  */
 function domain_form_alter(&$form, &$form_state, $form_id) {
   // There are forms that we never want to alter, and they are passed here.
-  $forms = module_invoke_all('domainignore');
+  $forms = module_invoke_all('domain_ignore');
   if (in_array($form_id, $forms)) {
     return;
   }
@@ -2430,41 +2506,37 @@ function domain_lookup_simple($name, $re
 }
 
 /**
- * Implements hook_domaininstall()
+ * Implements hook_domain_install()
  */
-function domain_domaininstall() {
+function domain_domain_install() {
   // Set the proper variables for our bootstrap load, as a precaution.
   domain_bootstrap_register();
 }
 
 /**
- * Implements hook_domainupdate()
+ * Implements hook_domain_delete()
  *
  * @TODO: reassign orphans?
  */
-function domain_domainupdate($op, $domain, $form_state = array()) {
-  switch ($op) {
-    case 'delete':
-      if ($domain != -1) {
-        // Remove domain-specific entries from tables and clear the cache.
-        db_delete('domain_access')
-          ->condition('gid', $domain['domain_id'])
-          ->condition('realm', 'domain_id')
-          ->execute();
-        db_delete('domain_editor')
-          ->condition('domain_id', $domain['domain_id'])
-          ->execute();
-      }
-      break;
+function domain_domain_delete($domain, $form_values = array()) {
+  if ($domain != -1) {
+    // Remove domain-specific entries from tables and clear the cache.
+    db_delete('domain_access')
+      ->condition('gid', $domain['domain_id'])
+      ->condition('realm', 'domain_id')
+      ->execute();
+    db_delete('domain_editor')
+      ->condition('domain_id', $domain['domain_id'])
+      ->execute();
   }
   // In all cases, we need to force a menu rebuild, which also clears the cache.
   menu_rebuild();
 }
 
 /**
- * Implements hook_domainbatch()
+ * Implements hook_domain_batch()
  */
-function domain_domainbatch() {
+function domain_domain_batch() {
   // Change all the domain names at once.
   $batch = array();
   $batch['subdomain'] = array(
@@ -2540,7 +2612,7 @@ function domain_domainbatch() {
 }
 
 /**
- * Validate handler for hook_domainbatch()
+ * Validate handler for hook_domain_batch()
  */
 function domain_batch_validate($values) {
   $case = $values['variable'];
@@ -2588,7 +2660,7 @@ function domain_warning_check($form_id) 
     global $_domain;
     // Add the list of forms
     $forms = array();
-    $forms = module_invoke_all('domainwarnings');
+    $forms = module_invoke_all('domain_warning');
     drupal_alter('domain_warnings', $forms);
     if ($form_id == 'domain_batch_form' || (arg(2) != 'domain' && in_array($form_id, array_keys($forms)))) {
       $default = domain_default();
@@ -2617,7 +2689,7 @@ function domain_warning_check($form_id) 
 }
 
 /**
- * Helper function for passing hook_domainpath() by reference.
+ * Helper function for passing hook_domain_path() by reference.
  *
  * @param $domain_id
  * The domain_id taken from {domain}.
@@ -2626,14 +2698,14 @@ function domain_warning_check($form_id) 
  * @param $path_language
  * Optional language code to look up the path in.
  * @return
- * The $path, modified by reference by hook_domainpath() implementations.
+ * The $path, modified by reference by hook_domain_path() implementations.
  */
 function domain_path($domain_id, $path, $path_language = '') {
   $modules = _domain_path_modules();
   if (!empty($modules)) {
     foreach ($modules as $module) {
       // Cannot use module_invoke_all() since these are passed by reference.
-      $function = $module . '_domainpath';
+      $function = $module . '_domain_path';
       $function($domain_id, $path, $path_language);
     }
   }
@@ -2646,15 +2718,15 @@ function domain_path($domain_id, $path, 
 function _domain_path_modules() {
   static $modules;
   if (!isset($modules)) {
-    $modules = module_implements('domainpath');
+    $modules = module_implements('domain_path');
   }
   return $modules;
 }
 
 /**
- * Implements hook_domainignore().
+ * Implements hook_domain_ignore().
  */
-function domain_domainignore() {
+function domain_domain_ignore() {
   // In Drupal 6, the update script behaves differently than D5, so we ignore it.
   return array('update_script_selection_form');
 }
Index: settings_custom_url.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/settings_custom_url.inc,v
retrieving revision 1.30
diff -u -p -r1.30 settings_custom_url.inc
--- settings_custom_url.inc	1 Apr 2010 21:08:36 -0000	1.30
+++ settings_custom_url.inc	27 Jun 2010 19:36:27 -0000
@@ -127,7 +127,7 @@ function domain_url_outbound_alter(&$pat
         // TODO: merge this code with the above for cleanup.
       }
     }
-    // We may have to Implements hook_domainpath().
+    // We may have to Implements hook_domain_path().
     if (!isset($path_rewrite)) {
       $path_rewrite = count(_domain_path_modules());
     }
Index: domain_alias/domain_alias.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_alias/domain_alias.info,v
retrieving revision 1.5
diff -u -p -r1.5 domain_alias.info
--- domain_alias/domain_alias.info	1 Apr 2010 21:02:21 -0000	1.5
+++ domain_alias/domain_alias.info	27 Jun 2010 19:36:27 -0000
@@ -5,5 +5,6 @@ core = 7.x
 package = Domain Access
 dependencies[] = domain
 files[] = domain_alias.admin.inc
+files[] = domain_alias.domain.inc
 files[] = domain_alias.install
 files[] = domain_alias.module
Index: domain_alias/domain_alias.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_alias/domain_alias.module,v
retrieving revision 1.20
diff -u -p -r1.20 domain_alias.module
--- domain_alias/domain_alias.module	1 Apr 2010 21:08:36 -0000	1.20
+++ domain_alias/domain_alias.module	27 Jun 2010 19:36:27 -0000
@@ -294,100 +294,6 @@ function domain_alias_list($domain_id, $
 }
 
 /**
- * Implements hook_domainload()
- *
- * Adds a list of all aliases for the current domain.
- */
-function domain_alias_domainload(&$domain) {
-  // Get the domain aliases
-  $domain['aliases'] = domain_alias_list($domain['domain_id']);
-  if (isset($domain['active_alias_id'])) {
-    $domain['aliases'][$domain['active_alias_id']]['active'] = TRUE;
-  }
-}
-
-/**
- * Implements hook_domainupdate().
- *
- * When a {domain} entry is deleted also delete all related {domain_alias} entries.
- */
-function domain_alias_domainupdate($op, $domain = array(), $form_state = array()) {
-  switch ($op) {
-    case 'delete':
-      db_delete('domain_alias')
-        ->condition('domain_id', $domain['domain_id'])
-        ->execute();
-      break;
-  }
-}
-
-/**
- * Implements hook_domainview().
- */
-function domain_alias_domainview($op, $domain = array(), $query = NULL) {
-  switch ($op) {
-    case 'header':
-      return array(array('data' => t('Aliases')));
-      break;
-    case 'query':
-      $query->leftJoin('domain_alias', 'dalias', 'd.domain_id = dalias.domain_id');
-      $query->addField('dalias', 'pattern');
-      break;
-    case 'data':
-      if (empty($domain)) {
-        return;
-      }
-      $aliases = domain_alias_list($domain['domain_id']);
-      $pieces = array();
-      foreach ($aliases as $alias) {
-        if (strpos($alias['pattern'], '*') === FALSE) {
-          $link = str_replace($domain['subdomain'], $domain['aliases'][$alias['alias_id']]['pattern'], domain_get_uri($domain));
-          $pieces[] = l($alias['pattern'], $link, array('absolute' => TRUE));
-        }
-        else {
-          $pieces[] = $alias['pattern'];
-        }
-      }
-      $linktext = empty($pieces) ? 'add alias' : 'edit aliases';
-      $action[] = l($linktext, 'admin/config/domain/alias/' . $domain['domain_id']);
-      $pieces = array_merge($action, $pieces);
-      if (!empty($pieces)) {
-        return array(theme('item_list', array('items' => $pieces)));
-      }
-      return array();
-      break;
-  }
-}
-
-/**
- * Implements hook_domainlinks()
- */
-function domain_alias_domainlinks($domain) {
-  $links[] = array(
-    'title' => t('aliases'),
-    'path' => 'admin/config/domain/alias/' . $domain['domain_id']
-  );
-  return $links;
-}
-
-/**
- * Implements hook_domainnav().
- *
- * Ensure that active domains are correctly marked as active.
- */
-function domain_alias_domainnav($domain) {
-  global $_domain;
-  $extra = array();
-  if (isset($_domain['active_alias_id'])) {
-    $alias_id = $_domain['active_alias_id'];
-    if (in_array($alias_id, array_keys($domain['aliases']))) {
-      $extra['active'] = TRUE;
-    }
-  }
-  return $extra;
-}
-
-/**
  * Theme element for the Domain Alias switcher block.
  *
  * @param $domains
Index: domain_conf/INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_conf/INSTALL.txt,v
retrieving revision 1.8
diff -u -p -r1.8 INSTALL.txt
--- domain_conf/INSTALL.txt	24 Oct 2009 22:11:27 -0000	1.8
+++ domain_conf/INSTALL.txt	27 Jun 2010 19:36:27 -0000
@@ -35,4 +35,4 @@ For proper use of this module, you shoul
 manually inside your settings.php file. If you do, be sure to put your custom
 $conf changes _after_ the domain access settings code.
 
-Preferred use is to use hook_domainconf() to add settings.
+Preferred use is to use hook_domain_conf() to add settings.
Index: domain_conf/README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_conf/README.txt,v
retrieving revision 1.21
diff -u -p -r1.21 README.txt
--- domain_conf/README.txt	1 Apr 2010 21:08:36 -0000	1.21
+++ domain_conf/README.txt	27 Jun 2010 19:36:27 -0000
@@ -20,7 +20,7 @@ CONTENTS
 2.3   Menu Blocks
 3.  Batch Updates
 4.  Developer Notes
-4.1   Extending Options with hook_domainconf()
+4.1   Extending Options with hook_domain_conf()
 4.2   Setting Variables for Domains
 4.3   Using domain_conf.inc
 4.4   Database Schema
@@ -145,12 +145,12 @@ The following form elements were removed
 See http://drupal.org/node/197692 for the reasons.
 
 ----
-4.1   Extending Options with hook_domainconf()
+4.1   Extending Options with hook_domain_conf()
 
 The module works by applying hook_form_alter() to the form:
 'system_settings_form' and then adding addiitonal fields from other forms.
 
-hook_domainconf() allows developers to add additional form elements.
+hook_domain_conf() allows developers to add additional form elements.
 
 Note that you may use this hook to create variables that are independent
 of other Drupal modules.  To do so, be sure to set the '#domain_setting' flag
@@ -160,7 +160,7 @@ to TRUE before returning your $form arra
 
 Please see the full documentation in the API.
 
-http://therickards.com/api/function/hook_domainconf/Domain
+http://therickards.com/api/function/hook_domain_conf/Domain
 
 ----
 4.2   Setting Variables for Domains
@@ -175,7 +175,7 @@ Complete documentation of this function 
 ----
 4.3   Using domain_conf.inc
 
-The normal method for using hook_domainconf() is to have the hook implemented
+The normal method for using hook_domain_conf() is to have the hook implemented
 in other modules.
 
 However, the community development process may mean that it will take time for
@@ -195,9 +195,9 @@ file:
 ====
 <?php
 /**
- * Implements hook_domainconf() to add the user picture.
+ * Implements hook_domain_conf() to add the user picture.
  */
-function user_domainconf() {
+function user_domain_conf() {
   $form['pictures'] = array(
     '#type' => 'fieldset',
     '#title' => t('User picture'),
Index: domain_conf/domain_conf.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_conf/domain_conf.admin.inc,v
retrieving revision 1.22
diff -u -p -r1.22 domain_conf.admin.inc
--- domain_conf/domain_conf.admin.inc	12 Jun 2010 15:45:18 -0000	1.22
+++ domain_conf/domain_conf.admin.inc	27 Jun 2010 19:36:27 -0000
@@ -40,7 +40,7 @@ function domain_conf_page($domain) {
 /**
  * Custom form to generate domain-specific site settings.
  *
- * The items on this form are taken from hook_domainbatch() and hook_domainconf().
+ * The items on this form are taken from hook_domain_batch() and hook_domain_conf().
  * See the API for more information.
  *
  * @param $domain
@@ -48,7 +48,7 @@ function domain_conf_page($domain) {
  */
 function domain_conf_form($form, $form_state, $domain) {
   $form = array();
-  $batch = module_invoke_all('domainbatch');
+  $batch = module_invoke_all('domain_batch');
   $settings = array();
   $data = db_query("SELECT settings FROM {domain_conf} WHERE domain_id = :domain_id", array(':domain_id' => $domain['domain_id']))->fetchField();
   if (!empty($data)) {
Index: domain_conf/domain_conf.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_conf/domain_conf.info,v
retrieving revision 1.7
diff -u -p -r1.7 domain_conf.info
--- domain_conf/domain_conf.info	30 Mar 2010 21:39:23 -0000	1.7
+++ domain_conf/domain_conf.info	27 Jun 2010 19:36:27 -0000
@@ -5,5 +5,6 @@ package = Domain Access
 dependencies[] = domain
 core = 7.x
 files[] = domain_conf.admin.inc
+files[] = domain_conf.domain.inc
 files[] = domain_conf.install
 files[] = domain_conf.module
Index: domain_conf/domain_conf.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_conf/domain_conf.module,v
retrieving revision 1.66
diff -u -p -r1.66 domain_conf.module
--- domain_conf/domain_conf.module	25 Jun 2010 17:38:48 -0000	1.66
+++ domain_conf/domain_conf.module	27 Jun 2010 19:36:27 -0000
@@ -63,7 +63,7 @@ function domain_conf_domain_bootstrap_fu
  * Implements hook_init()
  */
 function domain_conf_init() {
-  // Allow sites to add implementations of hook_domainconf() without hacking.
+  // Allow sites to add implementations of hook_domain_conf() without hacking.
   // See http://drupal.org/node/236877.
   if (arg(0) == 'admin') {
     $extra = drupal_get_path('module', 'domain_conf') . '/domain_conf.inc';
@@ -110,335 +110,18 @@ function domain_conf_theme() {
 }
 
 /**
- * Implements hook_domainlinks()
+ * Implements hook_hook_info().
  */
-function domain_conf_domainlinks($domain) {
-  static $extra;
-  if (!isset($extra)) {
-    $extra = domain_conf_api();
-  }
-  if ($domain['domain_id'] > 0 || !empty($extra)) {
-    $links[] = array(
-      'title' => t('settings'),
-      'path' => 'admin/config/domain/conf/' . $domain['domain_id']
-    );
-    return $links;
-  }
-  return FALSE;
-}
-
-/**
- * Implements hook_domainwarnings()
- */
-function domain_conf_domainwarnings() {
-  // These are the forms for variables set by Domain Conf.
-  $forms = array(
-    'system_admin_theme_settings',
-    'system_performance_settings',
-    'system_regional_settings',
-    'system_site_information_settings',
-    'system_site_maintenance_mode',
-    'locale_languages_overview_form',
-    'menu_configure',
-  );
-  $return = array();
-  foreach ($forms as $form) {
-    $return[$form] = 'admin/config/domain/conf/%domain_id';
-  }
-  return $return;
-}
-
-/**
- * Implements hook_domainbatch()
- */
-function domain_conf_domainbatch() {
-  $batch = array();
-  // Allows the deletion of all Domain Configuration rows.
-  $batch['domain_conf'] = array(
-    '#form' => array(
-      '#title' => t('Reset configurations'),
-      '#type' => 'checkbox',
-      '#options' => array(0 => 1, 1 => t('Reset')),
-      '#description' => t('Delete custom settings for this domain.'),
-    ),
-    '#domain_action' => 'domain_delete',
-    '#system_default' => 0,
-    '#variable' => 'domain_conf',
-    '#meta_description' => t('Delete custom settings for domains as supplied by Domain Configuration.'),
-    '#table' => 'domain_conf',
-    '#weight' => -10,
-  );
-  // Change the email address.
-  $batch['site_mail'] = array(
-    '#form' => array(
-      '#title' => t('Email address'),
-      '#type' => 'textfield',
-      '#size' => 40,
-      '#maxlength' => 255,
-      '#description' => t('Set the email address for this domain.'),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => variable_get('site_mail', ''),
-    '#variable' => 'site_mail',
-    '#meta_description' => t('Set the email address for all domains.'),
-    '#data_type' => 'string',
-    '#weight' => -8,
-    '#update_all' => TRUE,
-    '#group' => t('Site configuration'),
-  );
-  // Change the site slogan.
-  $batch['site_slogan'] = array(
-    '#form' => array(
-      '#title' => t('Site slogan'),
-      '#type' => 'textfield',
-      '#size' => 60,
-      '#maxlength' => 255,
-      '#description' => t('The slogan of this domain. Some themes display a slogan when available.'),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => variable_get('site_slogan', ''),
-    '#variable' => 'site_slogan',
-    '#meta_description' => t('Set the site slogan for all domains.'),
-    '#data_type' => 'string',
-    '#weight' => -8,
-    '#update_all' => TRUE,
-    '#group' => t('Site configuration'),
-  );
-  // Change the site frontpage.
-  $batch['site_frontpage'] = array(
-    '#form' => array(
-      '#title' => t('Site frontpage'),
-      '#type' => 'textfield',
-      '#size' => 30,
-      '#maxlength' => 255,
-      '#description' => t('The home page displays content from this relative URL. If unsure, specify "node".'),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => variable_get('site_frontpage', 'node'),
-    '#variable' => 'site_frontpage',
-    '#meta_description' => t('Set the site frontpage for all domains.'),
-    '#data_type' => 'string',
-    '#weight' => -8,
-    '#update_all' => TRUE,
-    '#group' => t('Site configuration'),
-  );
-  // Change the anonymous user name.
-  $batch['anonymous'] = array(
-    '#form' => array(
-      '#title' => t('Anonymous user'),
-      '#type' => 'textfield',
-      '#size' => 30,
-      '#maxlength' => 255,
-      '#description' => t('The name used to indicate anonymous users for this domain.'),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => variable_get('anonymous', 'Anonymous'),
-    '#variable' => 'anonymous',
-    '#meta_description' => t('Set the anonymous user label for all domains.'),
-    '#data_type' => 'string',
-    '#weight' => -8,
-    '#update_all' => TRUE,
-    '#group' => t('Site configuration'),
-  );
-  // Change the administrative theme.
-  $themes = list_themes();
-  ksort($themes);
-  $options[] = t('Use domain default theme');
-  foreach ($themes as $key => $value) {
-    $options[$key] = $key;
-  }
-  $batch['admin_theme'] = array(
-    '#form' => array(
-      '#title' => t('Administrative theme'),
-      '#type' => 'select',
-      '#options' => $options,
-      '#description' => t('Select the administrative theme for this domain.'),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => variable_get('admin_theme', 0),
-    '#variable' => 'admin_theme',
-    '#meta_description' => t('Set the administrative theme for all domains.'),
-    '#data_type' => 'string',
-    '#weight' => -8,
-    '#update_all' => TRUE,
-    '#group' => t('Administrative theme'),
+function domain_conf_hook_info() {
+  // TODO: test the loader function, which may fail in D7.
+  $hooks['domain_conf'] = array(
+    'group' => 'domain',
   );
-  // Change the timezone.
-  $zones = system_time_zones();
-  $batch['date_default_timezone'] = array(
-    '#form' => array(
-      '#title' => t('Timezone default'),
-      '#type' => 'select',
-      '#options' => $zones,
-      '#description' => t('Select the default site time zone.'),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => variable_get('date_default_timezone', 0),
-    '#variable' => 'date_default_timezone',
-    '#meta_description' => t('Set the default timezone for all domains.'),
-    '#data_type' => 'string',
-    '#weight' => -6,
-    '#update_all' => TRUE,
-    '#group' => t('Timezone settings'),
-  );
-  // Change the caching mode.
-  $cache = variable_get('cache', 0);
-  $batch['cache'] = array(
-    '#form' => array(
-      '#type' => 'checkbox',
-      '#title' => t('Cache pages for anonymous users'),
-      '#default_value' => $cache,
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => $cache,
-    '#variable' => 'cache',
-    '#meta_description' => t('Set the page cache options for all domains.'),
-    '#data_type' => 'integer',
-    '#weight' => -5,
-    '#update_all' => TRUE,
-    '#group' => t('Performance'),
-  );
-  // Change the cache lifetime.
-  $period = drupal_map_assoc(array(0, 60, 180, 300, 600, 900, 1800, 2700, 3600, 10800, 21600, 32400, 43200, 86400), 'format_interval');
-  $period[0] = '<' . t('none') . '>';
-  $batch['cache_lifetime'] = array(
-    '#form' => array(
-      '#type' => 'select',
-      '#title' => t('Minimum cache lifetime'),
-      '#default_value' => variable_get('cache_lifetime', 0),
-      '#options' => $period,
-      '#description' => t('The minimum amount of time that will elapse before the caches are recreated.')
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => variable_get('cache_lifetime', 0),
-    '#variable' => 'cache_lifetime',
-    '#meta_description' => t('Set the minimum cache lifetime for all domains.'),
-    '#data_type' => 'integer',
-    '#weight' => -5,
-    '#update_all' => TRUE,
-    '#group' => t('Performance'),
-  );
-  // Toggle the site offline status.
-  $batch['maintenance_mode'] = array(
-    '#form' => array(
-      '#type' => 'checkbox',
-      '#title' => t('Put site into maintenance mode'),
-      '#default_value' => variable_get('maintenance_mode', 0),
-      '#description' => t('When enabled, only users with the "Access site in maintenance mode" <a href="@permissions-url">permission</a> are able to access your site to perform maintenance; all other visitors see the maintenance mode message configured below. Authorized users can log in directly via the <a href="@user-login">user login</a> page.', array('@permissions-url' => url('admin/people/permissions'), '@user-login' => url('user'))),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => variable_get('maintenance_mode', 0),
-    '#variable' => 'maintenance_mode',
-    '#meta_description' => t('Set maintenance for all domains.'),
-    '#data_type' => 'integer',
-    '#weight' => -4,
-    '#update_all' => TRUE,
-    '#group' => t('Maintenance mode'),
-  );
-  // Change the site offline message.
-  $batch['maintenance_mode_message'] = array(
-    '#form' => array(
-      '#title' => t('Site offline message'),
-      '#type' => 'textarea',
-      '#cols' => 30,
-      '#rows' => 5,
-      '#description' => t('Message to show visitors when this domain is in off-line mode.'),
-    ),
-    '#domain_action' => 'domain_conf',
-    '#system_default' => t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal'))),
-    '#variable' => 'maintenance_mode_message',
-    '#meta_description' => t('Set the site offline message for all domains.'),
-    '#data_type' => 'string',
-    '#weight' => -2,
-    '#update_all' => TRUE,
-    '#group' => t('Maintenance mode'),
-  );
-  // Change the default language.
-  if (module_exists('locale')) {
-    $languages = domain_conf_language_options();
-    $default = language_default();
-    $batch['language_default'] = array(
-      '#form' => array(
-        '#title' => t('Default language'),
-        '#type' => 'select',
-        '#options' => $languages,
-        '#description' => t('The default language to use for this domain. <em>Note: This setting only works with path-based language switching.</em>'),
-      ),
-      '#domain_action' => 'domain_conf',
-      '#system_default' => $default->language,
-      '#override_default' => TRUE,
-      '#variable' => '', // deliberately empty, since this is an array and cannot be set.
-      '#meta_description' => t('Set the default language for all domains.'),
-      '#data_type' => 'string',
-      '#weight' => 6,
-      '#update_all' => TRUE,
-      '#group' => t('Language settings'),
-      '#module' => t('Language'),
-    );
-  }
-  // Change the menus
-  if (module_exists('menu')) {
-    $menus = menu_get_menus();
-    $menus[0] = t('Do not use for this site');
-    $main = variable_get('menu_main_links_source', 'main-menu');
-    $batch['menu_main_links_source'] = array(
-      '#form' => array(
-        '#title' => t('Source for the Main links'),
-        '#type' => 'select',
-        '#options' => $menus,
-        '#description' => t('Select what should be displayed as the Main links (typically at the top of the page).'),
-      ),
-      '#domain_action' => 'domain_conf',
-      '#system_default' => $main,
-      '#variable' => 'menu_primary_links_source',
-      '#meta_description' => t('Select what should be displayed as the Main links (typically at the top of the page).'),
-      '#data_type' => 'string',
-      '#weight' => 2,
-      '#update_all' => TRUE,
-      '#group' => t('Menu settings'),
-      '#module' => t('Menu'),
-    );
-    $batch['menu_secondary_links_source'] = array(
-      '#form' => array(
-        '#title' => t('Source for the Secondary links'),
-        '#type' => 'select',
-        '#options' => $menus,
-        '#description' => t("Select the source for the Secondary links. An advanced option allows you to use the same source for both Main links (currently %main) and Secondary links: if your source menu has two levels of hierarchy, the top level menu links will appear in the Main links, and the children of the active link will appear in the Secondary links." , array('%main' => $menus[$main])),
-      ),
-      '#domain_action' => 'domain_conf',
-      '#system_default' => variable_get('menu_secondary_links_source', 0),
-      '#variable' => 'menu_secondary_links_source',
-      '#meta_description' => t('Set the secondary links menu in all domains.'),
-      '#data_type' => 'string',
-      '#weight' => 4,
-      '#update_all' => TRUE,
-      '#group' => t('Menu settings'),
-      '#module' => t('Menu'),
-    );
-  }
-  foreach ($batch as $key => $value) {
-    if (!isset($batch[$key]['#module'])) {
-      $batch[$key]['#module'] = t('Domain Configuration');
-    }
-  }
-
-  return $batch;
-}
-
-/**
- * Implements hook_domainupdate().
- */
-function domain_conf_domainupdate($op, $domain, $form_state = array()) {
-  if ($op == 'delete') {
-    db_delete('domain_conf')
-      ->condition('domain_id', $domain['domain_id'])
-      ->execute();
-    cache_clear_all('variables', 'cache_bootstrap');
-  }
+  return $hooks;
 }
 
 /**
- * Retrieves elements from hook_domainconf() and formats them
+ * Retrieves elements from hook_domain_conf() and formats them
  * as needed.
  *
  * @param $all
@@ -451,7 +134,7 @@ function domain_conf_domainupdate($op, $
 function domain_conf_api($all = FALSE, $settings = array()) {
   global $_domain;
   $options = array();
-  $extra = module_invoke_all('domainconf', $_domain);
+  $extra = module_invoke_all('domain_conf', $_domain);
   if (!empty($extra)) {
     foreach ($extra as $key => $value) {
       foreach (element_children($value) as $element) {
Index: domain_content/domain_content.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_content/domain_content.info,v
retrieving revision 1.8
diff -u -p -r1.8 domain_content.info
--- domain_content/domain_content.info	5 Apr 2010 21:19:11 -0000	1.8
+++ domain_content/domain_content.info	27 Jun 2010 19:36:27 -0000
@@ -5,4 +5,5 @@ package = Domain Access
 dependencies[] = domain
 core = 7.x
 files[] = domain_content.admin.inc
+files[] = domain_content.domain.inc
 files[] = domain_content.module
Index: domain_content/domain_content.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_content/domain_content.module,v
retrieving revision 1.36
diff -u -p -r1.36 domain_content.module
--- domain_content/domain_content.module	6 Apr 2010 14:21:33 -0000	1.36
+++ domain_content/domain_content.module	27 Jun 2010 19:36:27 -0000
@@ -140,17 +140,6 @@ function domain_content_check($domain_id
 }
 
 /**
- * Implements hook_domainlinks()
- */
-function domain_content_domainlinks($domain) {
-  $links[] = array(
-    'title' => t('content'),
-    'path' => 'admin/domain/content/'. $domain['domain_id']
-  );
-  return $links;
-}
-
-/**
  * Implement hook_node_operations()
  */
 function domain_content_node_operations() {
Index: domain_nav/README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_nav/README.txt,v
retrieving revision 1.4
diff -u -p -r1.4 README.txt
--- domain_nav/README.txt	1 Apr 2010 21:08:36 -0000	1.4
+++ domain_nav/README.txt	27 Jun 2010 19:36:27 -0000
@@ -21,7 +21,7 @@ CONTENTS
 3.3   Menu Items
 4.  Developer Notes
 4.1   domain_nav_render()
-4.2   hook_domainnav()
+4.2   hook_domain_nav()
 
 ----
 1.  Introduction
@@ -162,13 +162,13 @@ And $style indicates which theme functio
   'ul' == theme_domain_nav_ul()
 
 ----
-4.2 hook_domainnav()
+4.2 hook_domain_nav()
 
-The domainnav hook allows other modules to add parameters to the $options
+The domain_nav hook allows other modules to add parameters to the $options
 array that is passed to theme functions.  It is intended for use with
 custom theme functions of theme overrides that you may use.
 
-To use the function, Implements hook_domainnav($domain).  You should return
+To use the function, Implements hook_domain_nav($domain).  You should return
 an array of values to append to $options.
 
 Default parameters are passed in the $domain variable and should not be changed;
Index: domain_nav/domain_nav.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_nav/domain_nav.module,v
retrieving revision 1.21
diff -u -p -r1.21 domain_nav.module
--- domain_nav/domain_nav.module	5 Apr 2010 15:37:11 -0000	1.21
+++ domain_nav/domain_nav.module	27 Jun 2010 19:36:27 -0000
@@ -108,6 +108,19 @@ function domain_nav_theme() {
 }
 
 /**
+ * Implements hook_hook_info().
+ */
+function domain_nav_hook_info() {
+  $hooks['domain_nav'] = array(
+    'group' => 'domain',
+  );
+  $hooks['domain_nav_options_alter'] = array(
+    'group' => 'domain',
+  );
+  return $hooks;
+}
+
+/**
  * Implements hook_block_info().
  */
 function domain_nav_block_info() {
@@ -217,7 +230,7 @@ function domain_nav_render($paths = NULL
       $value['path'] = $path;
       // Allow other modules to add elements to the array.
       $extra = array();
-      $extra = module_invoke_all('domainnav', $value);
+      $extra = module_invoke_all('domain_nav', $value);
       $value = array_merge($value, $extra);
       $options[$value['domain_id']] = $value;
     }
@@ -240,7 +253,7 @@ function domain_nav_render($paths = NULL
  *    - path -- the link path (a Drupal-formatted path)
  *    - active -- a boolean flag indicating the currently active domain
  *
- *  If hook_domainnav() is invoked, additonal elements may be present.
+ *  If hook_domain_nav() is invoked, additonal elements may be present.
  */
 function theme_domain_nav_default($variables) {
   $_domain = domain_get_domain();
@@ -293,9 +306,30 @@ function theme_domain_nav_menus($variabl
 }
 
 /**
- * Implements hook_domainupdate()
+ * Implements hook_domain_insert()
+ */
+function domain_nav_domain_insert($domain, $form_values = array()) {
+  domain_nav_rebuild_menu();
+}
+
+/**
+ * Implements hook_domain_update()
+ */
+function domain_nav_domain_update($domain, $form_values = array()) {
+  domain_nav_rebuild_menu();
+}
+
+/**
+ * Implements hook_domain_delete()
+ */
+function domain_nav_domain_delete($domain, $form_values = array()) {
+  domain_nav_rebuild_menu();
+}
+
+/**
+ * Helper function for domain update hooks.
  */
-function domain_nav_domainupdate($op, $domain, $form_state = array()) {
+function domain_nav_rebuild_menu() {
   // Only execute if the menu is turned on.
   if (DOMAIN_NAV_MENU == TRUE) {
     // We rebuild the menu, since the domain records have changed.
Index: domain_settings/README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_settings/README.txt,v
retrieving revision 1.5
diff -u -p -r1.5 README.txt
--- domain_settings/README.txt	1 Apr 2010 21:08:36 -0000	1.5
+++ domain_settings/README.txt	27 Jun 2010 19:36:27 -0000
@@ -42,7 +42,7 @@ It is often desireable for affiliates to
 was originally addressed using the Domain Configuration module to expose
 certain settings through a single UI, but other settings and especially those
 from contributed modules could only be included by adding exceptions in
-hook_domainconf() or hook_domainbatch(). This is cumbersome for the site
+hook_domain_conf() or hook_domain_batch(). This is cumbersome for the site
 maintainer, and out of scope for the Domain Access project.
 
 Domain Settings makes it so that any form that uses system_settings_form() can
Index: domain_settings/domain_settings.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_settings/domain_settings.module,v
retrieving revision 1.13
diff -u -p -r1.13 domain_settings.module
--- domain_settings/domain_settings.module	29 Apr 2010 22:00:01 -0000	1.13
+++ domain_settings/domain_settings.module	27 Jun 2010 19:36:27 -0000
@@ -151,9 +151,9 @@ function domain_settings_form_submit($fo
 }
 
 /**
- * Implements hook_domainform().
+ * Implements hook_domain_form().
  */
-function domain_settings_domainform(&$form) {
+function domain_settings_domain_form(&$form) {
   // Add the form element to the main screen.
   $form['domain_settings_module'] = array(
     '#type' => 'fieldset',
@@ -206,9 +206,9 @@ function domain_settings_disallow() {
 }
 
 /**
- * Implements hook_domain_warnings_alter().
+ * Implements hook_domain_warning_alter().
  */
-function domain_settings_domain_warnings_alter(&$forms) {
+function domain_settings_domain_warning_alter(&$forms) {
   // Forms which Domain Settings handles and are set as warnings.
   $core_forms = array(
     'system_admin_theme_settings',
@@ -295,8 +295,8 @@ function domain_settings_batch_form_subm
  */
 function domain_settings_reset($domain_id) {
   // Get the conf elements and erase them from the record.
-  $batch = module_invoke_all('domainbatch');
-  $conf = module_invoke_all('domainconf');
+  $batch = module_invoke_all('domain_batch');
+  $conf = module_invoke_all('domain_conf');
   $list = array_merge(array_keys($batch), array_keys($conf));
   // Get the existing data.
   $result = db_query("SELECT domain_id, settings FROM {domain_conf} WHERE domain_id = :domain_id", array(':domain_id' => $domain_id))->fetchObject();
Index: domain_source/domain_source.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_source/domain_source.info,v
retrieving revision 1.5
diff -u -p -r1.5 domain_source.info
--- domain_source/domain_source.info	29 Mar 2010 20:29:53 -0000	1.5
+++ domain_source/domain_source.info	27 Jun 2010 19:36:27 -0000
@@ -4,6 +4,7 @@ description = Creates a canonical source
 package = Domain Access
 dependencies[] = domain
 core = 7.x
+files[] = domain_source.domain.inc
 files[] = domain_source.install
 files[] = domain_source.module
 files[] = domain_source.views.inc
Index: domain_source/domain_source.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_source/domain_source.module,v
retrieving revision 1.25
diff -u -p -r1.25 domain_source.module
--- domain_source/domain_source.module	12 Jun 2010 15:05:16 -0000	1.25
+++ domain_source/domain_source.module	27 Jun 2010 19:36:27 -0000
@@ -285,20 +285,6 @@ function domain_source_lookup($nid, $dom
 }
 
 /**
- * Implements hook_domain_source_alter().
- *
- * @param &$source
- *   The domain array from domain_get_node_match(), passed by reference.
- * @param $nid
- *   The node id.
- * @return
- *   No return value; modify $source by reference.
- */
-function domain_source_domain_source_alter(&$source, $nid) {
-  $source = domain_source_lookup($nid);
-}
-
-/**
  * FormAPI function that lets us update access rules.
  */
 function domain_source_update_nodes($form, &$form_state) {
@@ -362,19 +348,6 @@ function domain_source_validate($form, &
 }
 
 /**
- * Implements hook_domainupdate()
- *
- * When deleting domain records, we remove all traces from the {domain_source} table.
- */
-function domain_source_domainupdate($op, $domain, $form_state = array()) {
-  if ($op == 'delete' && $domain['domain_id'] > 0) {
-    db_delete('domain_source')
-      ->condition('domain_id', $domain['domain_id'])
-      ->execute();
-  }
-}
-
-/**
  * Implements hook_views_api().
 
 function domain_source_views_api() {
Index: domain_theme/domain_theme.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_theme/domain_theme.info,v
retrieving revision 1.6
diff -u -p -r1.6 domain_theme.info
--- domain_theme/domain_theme.info	2 Apr 2010 19:40:32 -0000	1.6
+++ domain_theme/domain_theme.info	27 Jun 2010 19:36:27 -0000
@@ -4,5 +4,6 @@ description = Assign themes to domains c
 package = Domain Access
 dependencies[] = domain
 core = 7.x
+files[] = domain_theme.domain.inc
 files[] = domain_theme.module
 files[] = domain_theme.admin.inc
Index: domain_theme/domain_theme.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_theme/domain_theme.module,v
retrieving revision 1.27
diff -u -p -r1.27 domain_theme.module
--- domain_theme/domain_theme.module	17 May 2010 21:23:55 -0000	1.27
+++ domain_theme/domain_theme.module	27 Jun 2010 19:36:27 -0000
@@ -142,23 +142,9 @@ function domain_theme_lookup($domain_id,
 }
 
 /**
- * Implements hook_domainlinks()
+ * Implements hook_domain_form()
  */
-function domain_theme_domainlinks($domain) {
-  if ($domain['domain_id'] > 0) {
-    $links[] = array(
-      'title' => t('theme'),
-      'path' => 'admin/config/domain/theme/' . $domain['domain_id']
-    );
-    return $links;
-  }
-  return FALSE;
-}
-
-/**
- * Implements hook_domainform()
- */
-function domain_theme_domainform(&$form) {
+function domain_theme_domain_form(&$form) {
   // Set the module weight for Domain Theme,
   $module_weight = variable_get('domain_theme_weight', 0);
   db_update('system')
@@ -187,58 +173,7 @@ function domain_theme_domainform(&$form)
 }
 
 /**
- * Implements hook_domainbatch()
- */
-function domain_theme_domainbatch() {
-  $batch = array();
-  // Allows the deletion of all Domain Theme rows.
-  $batch['domain_theme'] = array(
-    '#form' => array(
-      '#title' => t('Reset themes'),
-      '#type' => 'checkbox',
-      '#options' => array(0 => 1, 1 => t('Reset')),
-      '#description' => t('Delete custom theme settings for this domain.'),
-    ),
-    '#domain_action' => 'domain_delete',
-    '#system_default' => 0,
-    '#meta_description' => t('Delete custom theme settings for domains as supplied by Domain Theme.'),
-    '#table' => 'domain_theme',
-    '#weight' => -10,
-  );
-  // Change themes for sites.
-  $themes = list_themes();
-  $options = array();
-  foreach ($themes as $theme) {
-    if ($theme->status == 1) {
-      $options[$theme->name] = $theme->name;
-    }
-  }
-  $batch['site_theme'] = array(
-    '#form' => array(
-      '#title' => t('Theme settings'),
-      '#type' => 'select',
-      '#options' => $options,
-      '#description' => t('Select the theme for this domain.'),
-    ),
-    '#domain_action' => 'custom',
-    '#lookup' => 'domain_theme_lookup',
-    '#submit' => 'domain_theme_batch',
-    '#system_default' => variable_get('theme_default', 'garland'),
-    '#variable' => 'theme_default',
-    '#meta_description' => t('Change the themes for all domains.'),
-    '#data_type' => 'string',
-    '#update_all' => TRUE,
-    '#weight' => -9,
-  );
-  foreach ($batch as $key => $value) {
-    $batch[$key]['#module'] = t('Domain Theme');
-  }
-
-  return $batch;
-}
-
-/**
- * Custom handler for domain_theme_domainbatch().
+ * Custom handler for domain_theme_domain_batch().
  *
  * @param $values
  * The form values passed by the FormsAPI.
@@ -263,21 +198,6 @@ function domain_theme_batch($values) {
 }
 
 /**
- * Implements hook_domainwarnings()
- */
-function domain_theme_domainwarnings() {
-  $forms =  array(
-    'system_themes_form',
-    'system_theme_settings',
-  );
-  $return = array();
-  foreach ($forms as $form) {
-    $return[$form] =  'admin/config/domain/theme/%domain_id';
-  }
-  return $return;
-}
-
-/**
  * Return the unique string path element used by color.module.
  *
  * @param $path
