? deadwood.patch
? deadwood_plus.patch
Index: hosting.features.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/hosting.features.inc,v
retrieving revision 1.3
diff -u -p -r1.3 hosting.features.inc
--- hosting.features.inc	30 Nov 2008 22:06:13 -0000	1.3
+++ hosting.features.inc	13 May 2009 13:09:15 -0000
@@ -1,5 +1,6 @@
 <?php
 // $Id: hosting.features.inc,v 1.3 2008/11/30 22:06:13 adrian Exp $
+
 /**
  * @file Hosting features
  *
@@ -60,7 +61,7 @@ function hosting_features_form() {
   return system_settings_form($form);
 }
 
-function hosting_features_form_submit($form_id, $values) {
+function hosting_features_form_submit($form, &$form_state) {
   $features = hosting_get_features(TRUE);
   foreach ($features  as $feature => $info) {
     $value = $values[$feature];
@@ -114,7 +115,7 @@ function hosting_get_features($refresh =
     foreach ($hooks as $func) {
       $features = array_merge($features, $func());
     }
-    cache_set('hosting_features', 'cache', serialize($features));
+    cache_set('hosting_features', $features);
     return $features;
   }
   else {
Index: hosting.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/hosting.info,v
retrieving revision 1.10
diff -u -p -r1.10 hosting.info
--- hosting.info	17 Feb 2009 15:46:42 -0000	1.10
+++ hosting.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,12 @@
 name = Hosting
 description = Allow this Drupal site to deploy hosted sites.
 package = Hosting
-dependencies = hosting_task hosting_client hosting_db_server hosting_package hosting_platform hosting_site hosting_web_server
+#dependencies[] = hosting_task
+#dependencies[] = hosting_client
+#dependencies[] = hosting_db_server
+#dependencies[] = hosting_package
+#dependencies[] = hosting_platform
+#dependencies[] = hosting_site
+#dependencies[] = hosting_web_server
+
+core = 6.x
Index: hosting.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/hosting.module,v
retrieving revision 1.101
diff -u -p -r1.101 hosting.module
--- hosting.module	9 May 2009 16:31:00 -0000	1.101
+++ hosting.module	13 May 2009 13:09:15 -0000
@@ -1,5 +1,26 @@
 <?php
 // $Id: hosting.module,v 1.101 2009/05/09 16:31:00 anarcat Exp $
+
+/**
+ * Implementation of hook_theme().
+ */
+function hosting_theme() {
+  return array(
+    'hosting_summary_block' => array(
+      'file' => 'hosting.module',
+      'arguments' => array(
+        'components' => NULL,
+      ),
+    ),
+    'hosting_queues_configure' => array(
+      'file' => 'hosting.module',
+      'arguments' => array(
+        'form' => NULL,
+      ),
+    ),
+  );
+}
+
 /**
  * @file Hosting module
  *
@@ -12,91 +33,104 @@
  */
 
 include_once('hosting_help.inc');
-include_once('hosting.wizard.inc');
+//include_once('hosting.wizard.inc');
 include_once('hosting.queues.inc');
 include_once('hosting.features.inc');
 
 /**
  * Implementation of hook_menu()
  */
-function hosting_menu($may_cache = true) {
+function hosting_menu() {
   global $user;
   $items = array();
-  hosting_wizard_menu($may_cache, $items);
-  if ($may_cache) {
+  //hosting_wizard_menu(, $items);
+/* TODO
+   Non menu code that was placed in hook_menu under the '!$may_cache' block
+   so that it could be run during initialization, should now be moved to hook_init.
+   Previously we called hook_init twice, once early in the bootstrap process, second
+   just after the bootstrap has finished. The first instance is now called boot
+   instead of init.
+   
+   In Drupal 6, there are now two hooks that can be used by modules to execute code
+   at the beginning of a page request. hook_boot() replaces hook_boot() in Drupal 5
+   and runs on each page request, even for cached pages. hook_boot() now only runs
+   for non-cached pages and thus can be used for code that was previously placed in
+   hook_menu() with $may_cache = FALSE:
+   
+   Dynamic menu items under a '!$may_cache' block can often be simplified
+   to remove references to arg(n) and use of '%<function-name>' to check
+   conditions. See http://drupal.org/node/103114.
+   
+   The title and description arguments should not have strings wrapped in t(),
+   because translation of these happen in a later stage in the menu system.
+*/
+  //if ($may_cache) {
  
-    $items[] = array(
-      'path' => 'hosting/disabled',
-      'title' => t('Site disabled'),
-      'callback' => 'hosting_disabled_site',
-      'access' => TRUE,
+    $items['hosting/disabled'] = array(
+      'title' => 'Site disabled',
+      'page callback' => 'hosting_disabled_site',
+      'access arguments' => array('access content'),
       'type' => MENU_CALLBACK
     );
 
  
-    $items[] = array(
-      'path' => 'hosting/maintenance',
-      'title' => t('Site maintenance'),
-      'callback' => 'hosting_site_maintenance',
-      'access' => TRUE,
+    $items['hosting/maintenance'] = array(
+      'title' => 'Site maintenance',
+      'page callback' => 'hosting_site_maintenance',
+      'access arguments' => array('access content'),
       'type' => MENU_CALLBACK
     );
 
     
-    $items[] = array(
-      'path' => 'admin/help/provision/requirements',
-      'title' => t('Provisioning requirements'),
-      'description' => t("Information of how to configure the provisioning system."),
-      'callback' => 'hosting_help_requirements',
+    $items['admin/help/provision/requirements'] = array(
+      'title' => 'Provisioning requirements',
+      'description' => "Information of how to configure the provisioning system.",
+      'page callback' => 'hosting_help_requirements',
       'type' => MENU_CALLBACK
     );
 
 
-    $items[] = array(
-      'path' => 'admin/hosting',
-      'title' => t('Hosting'),
-      'description' => t('Configure and manage the hosting system'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_features_form'),
-      'access' => user_access('administer hosting'),
+    $items['admin/hosting'] = array(
+      'title' => 'Hosting',
+      'description' => 'Configure and manage the hosting system',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_features_form'),
+      'access arguments' => array('administer hosting'),
       'type' => MENU_NORMAL_ITEM
     );
 
-    $items[] = array(
-      'path' => 'admin/hosting/features',
-      'title' => t('Features'),
-      'description' => t('Configure the exposed functionality of the Hosting system'),
+    $items['admin/hosting/features'] = array(
+      'title' => 'Features',
+      'description' => 'Configure the exposed functionality of the Hosting system',
       'weight' => -100,
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_features_form'),
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_features_form'),
       'type' => MENU_DEFAULT_LOCAL_TASK,
-      'access' => user_access('administer hosting features'),
+      'access arguments' => array('administer hosting features'),
     );
 
-    $items[] = array(
-      'path' => 'admin/hosting/queues',
-      'title' => t('Queues'),
-      'description' => t('Configure the frequency that cron, backup and task events are process'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_queues_configure'),
+    $items['admin/hosting/queues'] = array(
+      'title' => 'Queues',
+      'description' => 'Configure the frequency that cron, backup and task events are process',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_queues_configure'),
       'type' => MENU_LOCAL_TASK,
-      'access' => user_access('administer hosting queues'),
+      'access arguments' => array('administer hosting queues'),
     );
     // Kludge : Replace node/add page to hide functionality.
-    $items[] = array('path' => 'node/add',
-      'title' => t('Create content'),
-      'callback' => '_hosting_node_add',
-      'access' => user_access('access content'),
+    $items['node/add'] = array(
+      'title' => 'Create content',
+      'page callback' => '_hosting_node_add',
+      'access arguments' => array('access content'),
       'type' => MENU_ITEM_GROUPING,
       'weight' => 1);
    
     // Queue page & task lists
     
-    $items[] = array(
-       'path' => 'hosting/queues',
-       'callback' => 'hosting_queues',
+    $items['hosting/queues'] = array(
+       'page callback' => 'hosting_queues',
        'type' => MENU_CALLBACK,
-       'access' => user_access('access task logs')
+       'access arguments' => array('access task logs')
       );
     // Disable unsupported features.
     $features = hosting_get_features();
@@ -105,15 +139,14 @@ function hosting_menu($may_cache = true)
       if (isset($feature['node'])) {
         $type_url_str = str_replace('_', '-', $feature['node']);
         
-        $items[] = array(
-          'path' => 'node/add/'. $type_url_str,
+        $items['node/add/'. $type_url_str] = array(
           'title' => drupal_ucfirst($types[$feature['node']]->name),
-          'access' => (($user->uid == 1) || user_access('create ' . $feature['node'])) && (hosting_feature($type) != HOSTING_FEATURE_DISABLED),
+          'access arguments' => (($user->uid == 1) || user_access('create ' . $feature['node'])) && (hosting_feature($type) != HOSTING_FEATURE_DISABLED),
         ); 
       }
     }
 
-  }
+  //}
   return $items;
 }
 
@@ -431,7 +464,7 @@ function _hosting_node_add($type = '') {
       if (function_exists($type->module .'_form') && user_access('create ' . $type->type) && (hosting_feature($type->type) !== HOSTING_FEATURE_DISABLED)) {
         $type_url_str = str_replace('_', '-', $type->type);
         $title = t('Add a new @s.', array('@s' => $type->name));
-        $out = '<dt>'. l(drupal_ucfirst($type->name), "node/add/$type_url_str", array('title' => $title)) .'</dt>';
+        $out = '<dt>'. l(drupal_ucfirst($type->name), "node/add/$type_url_str", array('attributes' => array('title' => $title))) .'</dt>';
         $out .= '<dd>'. filter_xss_admin($type->description) .'</dd>';
         $item[$type->name] = $out;
       }
@@ -593,13 +626,13 @@ function theme_hosting_queues_configure(
   return $output;
 }
 
-function hosting_queues_configure_submit($form_id, $values) {
+function hosting_queues_configure_submit($form, &$form_state) {
   foreach (hosting_get_queues() as $queue => $info) {
-    if ($values[$queue]) {
-      variable_set("hosting_queue_" . $queue . "_enabled", $values[$queue]['enabled']);
-      variable_set("hosting_queue_" . $queue . "_frequency", $values[$queue]['frequency']['ticks'] * $values[$queue]['frequency']['unit']);
+    if ($form_state['values'][$queue]) {
+      variable_set("hosting_queue_" . $queue . "_enabled", $form_state['values'][$queue]['enabled']);
+      variable_set("hosting_queue_" . $queue . "_frequency", $form_state['values'][$queue]['frequency']['ticks'] * $form_state['values'][$queue]['frequency']['unit']);
       if ($info['type'] == 'serial') {
-        variable_set("hosting_queue_" . $queue . "_items", $values[$queue]['frequency']['items']);
+        variable_set("hosting_queue_" . $queue . "_items", $form_state['values'][$queue]['frequency']['items']);
       }
 
     }
Index: hosting.wizard.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/hosting.wizard.inc,v
retrieving revision 1.31
diff -u -p -r1.31 hosting.wizard.inc
--- hosting.wizard.inc	13 May 2009 01:18:27 -0000	1.31
+++ hosting.wizard.inc	13 May 2009 13:09:15 -0000
@@ -74,15 +74,14 @@ function hosting_wizard_steps($step = nu
  * I'm not entirely sure the wizard is big enough to need it's own
  * module yet.
  */
-function hosting_wizard_menu($may_cache, &$items) {
-  $items[] = array(
-    'path' => 'hosting/wizard',
-    'title' => t('Hosting wizard'),
-    'description' => t('Configuration wizard'),
-    'callback' => 'drupal_get_form',
-    'callback arguments' => array('hosting_wizard_intro'),
+function hosting_wizard_menu(, &$items) {
+  $items['hosting/wizard'] = array(
+    'title' => 'Hosting wizard',
+    'description' => 'Configuration wizard',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('hosting_wizard_intro'),
     'type' => MENU_NORMAL_ITEM,
-    'access' => user_access('access hosting wizard'), 
+    'access arguments' => array('access hosting wizard'), 
   );
 
   if (!$may_cache && (sprintf("%s/%s", arg(0), arg(1)) == 'hosting/wizard')) {
@@ -95,17 +94,17 @@ function hosting_wizard_menu($may_cache,
         'path' => 'hosting/wizard/' . $key,
         'title' => $step['title'],
         'description' => $step['message'],
-        'callback' => 'drupal_get_form',
-        'callback arguments' => $form_id,
+        'page callback' => 'drupal_get_form',
+        'page arguments' => $form_id,
         'type' => ($step['type']) ? $step['type'] : MENU_LOCAL_TASK,
-        'access' => user_access('access hosting wizard'),
+        'access arguments' => array('access hosting wizard'),
         'weight' => $x++
       );
       if ($step['type'] == MENU_DEFAULT_LOCAL_TASK) {
         $parts = explode("/", $key);
         if (sizeof($parts) >= 2) {
           $parent = array_shift($parts);
-          $wizard_items[$parent]['callback arguments'] = $form_id;
+          $wizard_items[$parent]['page arguments'] = $form_id;
         }
       }
     }
@@ -180,7 +179,7 @@ function hosting_wizard_account() {
 /**
  * Ensure a valid user
  */
-function hosting_wizard_account_validate($form_id, $values, $form) {
+function hosting_wizard_account_validate($form, &$form_state) {
   global $user;
   _user_edit_validate($user->uid, $values);
 }
@@ -188,7 +187,7 @@ function hosting_wizard_account_validate
 /**
  * Save the user account, and update the default client node
  */
-function hosting_wizard_account_submit($form_id, $values) {
+function hosting_wizard_account_submit($form, &$form_state) {
   global $user;
   user_save($user, $values);
   $node = node_load(HOSTING_DEFAULT_CLIENT);
@@ -220,7 +219,8 @@ function hosting_wizard_provision() {
  * @todo pull changes in the form upstream
  */
 function hosting_wizard_provision_paths() {
-  $form = drupal_retrieve_form('web_server_node_form', node_load(HOSTING_OWN_WEB_SERVER));
+/* TODO drupal_retrieve_form() now accepts a form_state parameter. */
+  $form = drupal_retrieve_form('web_server_node_form', $form_state, node_load(HOSTING_OWN_WEB_SERVER));
   _hosting_wizard_cleanse_node_form($form);
 
   $own_link = _hosting_node_link(HOSTING_OWN_WEB_SERVER);
@@ -264,7 +264,7 @@ function hosting_wizard_provision_paths(
 /**
  * Save the changes to the default web server node
  */
-function hosting_wizard_provision_paths_submit($form_id, $values) {
+function hosting_wizard_provision_paths_submit($form, &$form_state) {
   $node = node_load(HOSTING_OWN_WEB_SERVER);
   $node->config_path = $values['config_path'];
   $node->restart_cmd = $values['restart_cmd'];
@@ -280,7 +280,8 @@ function hosting_wizard_provision_paths_
  * @todo pull changes in the form upstream
  */
 function hosting_wizard_provision_web() {
-  $form = drupal_retrieve_form('web_server_node_form', node_load(HOSTING_OWN_WEB_SERVER));
+/* TODO drupal_retrieve_form() now accepts a form_state parameter. */
+  $form = drupal_retrieve_form('web_server_node_form', $form_state, node_load(HOSTING_OWN_WEB_SERVER));
   _hosting_wizard_cleanse_node_form($form);
 
   $own_link = _hosting_node_link(HOSTING_OWN_WEB_SERVER);
@@ -314,7 +315,7 @@ function hosting_wizard_provision_web() 
   return hosting_wizard_form('provision/web', $form);
 }
 
-function hosting_wizard_provision_web_validate($form_id, $values) {
+function hosting_wizard_provision_web_validate($form, &$form_state) {
   $node = node_load(HOSTING_OWN_WEB_SERVER);
   $node->title = $values['title'];
   $node->ip_address = $values['ip_address'];
@@ -327,7 +328,7 @@ function hosting_wizard_provision_web_va
 /**
  * Save the changes to the default web server node
  */
-function hosting_wizard_provision_web_submit($form_id, $values) {
+function hosting_wizard_provision_web_submit($form, &$form_state) {
   $node = node_load(HOSTING_OWN_WEB_SERVER);
   $node->title = $values['title'];
   $node->ip_address = $values['ip_address'];
@@ -344,7 +345,8 @@ function hosting_wizard_provision_web_su
  * Perhaps those changes need to go in upstream?
  */
 function hosting_wizard_provision_db() {
-  $form = drupal_retrieve_form('db_server_node_form', node_load(HOSTING_OWN_DB_SERVER));
+/* TODO drupal_retrieve_form() now accepts a form_state parameter. */
+  $form = drupal_retrieve_form('db_server_node_form', $form_state, node_load(HOSTING_OWN_DB_SERVER));
   _hosting_wizard_cleanse_node_form($form);
 
   $own_link = _hosting_node_link(HOSTING_OWN_DB_SERVER);
@@ -379,7 +381,7 @@ function hosting_wizard_provision_db() {
 /**
  * Save the modified db_server
  */
-function hosting_wizard_provision_db_submit($form_id, $values) {
+function hosting_wizard_provision_db_submit($form, &$form_state) {
   $node = node_load(HOSTING_OWN_DB_SERVER);
   $node->title = $values['title'];
   $node->db_user = $values['db_user'];
@@ -420,7 +422,7 @@ function hosting_wizard_hosting_init() {
   return hosting_wizard_form('hosting', $form);
 }
 
-function hosting_wizard_hosting_init_validate() {
+function hosting_wizard_hosting_init_validate($form, &$form_state) {
   if (!variable_get('hosting_dispatch_last_run', false)) {
     drupal_goto('hosting/wizard/hosting/init');
   }
@@ -453,7 +455,7 @@ function hosting_wizard_hosting_verify()
   return hosting_wizard_form('hosting/verify', $form, $next);
 }
 
-function hosting_wizard_hosting_verify_validate() {
+function hosting_wizard_hosting_verify_validate($form, &$form_state) {
   $node = hosting_get_most_recent_task(HOSTING_OWN_PLATFORM, 'verify');
   if (!($node->task_status & DRUSH_SUCCESS)) {
     drupal_goto('/hosting/wizard/hosting/verify');
@@ -476,13 +478,14 @@ function hosting_wizard_hosting_import()
 }
 
 function hosting_wizard_hosting_features() {
-  $form = drupal_retrieve_form('hosting_features_form');
+/* TODO drupal_retrieve_form() now accepts a form_state parameter. */
+  $form = drupal_retrieve_form('hosting_features_form', $form_state);
   unset($form['buttons']);
   return hosting_wizard_form('hosting/features', $form);
 }
 
-function hosting_wizard_hosting_features_submit($form_id, $values) {
-  hosting_features_form_submit($form_id, $values);
+function hosting_wizard_hosting_features_submit($form, &$form_state) {
+  hosting_features_form_submit($form_state['values']['form_id'], $values);
 }
 
 /**
@@ -539,8 +542,8 @@ function hosting_wizard_form($step, $for
   drupal_add_css(drupal_get_path("module", "hosting") . '/hosting.wizard.js');
   // @todo: add a message to exit the wizard.
   hosting_wizard_set_title($step);
-  $form['#submit']['hosting_wizard_' . str_replace('/', '_', $step) . '_submit'] = array(); 
-  $form['#submit']['hosting_wizard_form_submit'] = array();
+  $form['#submit'][] = 'hosting_wizard_' . str_replace('/', '_', $step) . '_submit'; 
+  $form['#submit'][] = 'hosting_wizard_form_submit';
   $form['#prefix'] = '<div id="hosting-wizard-form">';
   $form['#suffix'] = '</div>';
   $form['step'] = array('#type' => 'value', '#value' => $step);
@@ -566,7 +569,7 @@ function hosting_wizard_form($step, $for
  *
  * This redirects the user to the next step in the wizard
  */
-function hosting_wizard_form_submit($form_id, $values) {
+function hosting_wizard_form_submit($form, &$form_state) {
   $values = (array) $values;
   variable_set('hosting_wizard_completed_' . $values['step'], mktime());
 
Index: hosting_help.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/hosting_help.inc,v
retrieving revision 1.28
diff -u -p -r1.28 hosting_help.inc
--- hosting_help.inc	22 Feb 2009 02:19:26 -0000	1.28
+++ hosting_help.inc	13 May 2009 13:09:15 -0000
@@ -83,8 +83,8 @@ function hosting_hosting_service() {
 /**
  * Implementation of hook_help()
  */
-function hosting_help($section) {
-  switch ($section) {
+function hosting_help($path, $arg) {
+  switch ($path) {
     case 'admin/help#hosting':
       $output .= t('<p>The Hostmaster system is a set of modules that provide an interface to the <a href="@hosting_help">Provisioning framework</a>.</p>', 
                   array('@hosting_help' => url('admin/help/provision')));
@@ -460,7 +460,7 @@ function hosting_elements() {
       HOSTING_STATUS_SUCCESS => t("You have met this requirement."),
       HOSTING_STATUS_WARNING => t("This requirement has a non critical error."),
       HOSTING_STATUS_ERROR => t("This requirement has a critical error. This system will not operate until it has been fixed")),
-    '#process' => array('hosting_requirement_process' => array()),
+    '#process' => array('hosting_requirement_process'),
   );
   return $type;
 }
Index: alias/hosting_alias.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/alias/hosting_alias.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_alias.info
--- alias/hosting_alias.info	30 Oct 2008 15:20:09 -0000	1.1
+++ alias/hosting_alias.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = Site aliases
 description = Maintain domain aliases for sites.
 package = Hosting
-dependencies = hosting_site
+dependencies[] = hosting_site
+
+core = 6.x
\ No newline at end of file
Index: alias/hosting_alias.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/alias/hosting_alias.install,v
retrieving revision 1.3
diff -u -p -r1.3 hosting_alias.install
--- alias/hosting_alias.install	24 Nov 2008 18:55:09 -0000	1.3
+++ alias/hosting_alias.install	13 May 2009 13:09:15 -0000
@@ -1,22 +1,51 @@
 <?php
 // $Id: hosting_alias.install,v 1.3 2008/11/24 18:55:09 adrian Exp $
+
+/**
+ * Implementation of hook_schema().
+ */
+function hosting_alias_schema() {
+  $schema['hosting_site_alias'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'alias' => array(
+        'type' => 'varchar',
+        'length' => 128,
+        'not null' => TRUE,
+      ),
+      'automatic' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'indexes' => array(
+      'vid, alias' => array('vid', 'alias'),
+    ),
+  );
+
+  return $schema;
+}
+
 function hosting_alias_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql' :
-    case 'mysqli' :
-      db_query("CREATE TABLE {hosting_site_alias} (
-        vid int NOT NULL DEFAULT '0',
-        nid int(10) unsigned NOT NULL DEFAULT '0',
-        alias varchar(128) NOT NULL,
-        automatic INT(1) NOT NULL DEFAULT '0',
-        KEY (vid, alias)
-      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-      break;
-  }
+  // Create tables.
+  drupal_install_schema('hosting_alias');
 }
 
 function hosting_alias_uninstall() {
-  db_query("DROP TABLE {hosting_site_alias}");
+  // Remove tables.
+  drupal_uninstall_schema('hosting_alias');
+
 }
 
 /**
Index: alias/hosting_alias.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/alias/hosting_alias.module,v
retrieving revision 1.9
diff -u -p -r1.9 hosting_alias.module
--- alias/hosting_alias.module	17 Apr 2009 20:51:24 -0000	1.9
+++ alias/hosting_alias.module	13 May 2009 13:09:15 -0000
@@ -6,20 +6,19 @@ define('HOSTING_ALIAS_AUTOMATIC', 1);
 /**
  * Implementation of hook_menu
  */
-function hosting_alias_menu($may_cache) {
-  $items[] = array(
-    'path' => 'admin/hosting/aliases',
-    'title' => t('Site aliases'),
-    'description' => t('Configure aliases for hosted sites'),
-    'callback' => 'drupal_get_form',
-    'callback arguments' => array('hosting_alias_settings'),
-    'access' => user_access('administer hosting aliases'),
+function hosting_alias_menu() {
+  $items['admin/hosting/aliases'] = array(
+    'title' => 'Site aliases',
+    'description' => 'Configure aliases for hosted sites',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('hosting_alias_settings'),
+    'access arguments' => array('administer hosting aliases'),
     'type' => MENU_LOCAL_TASK
   );
   return $items;
 }
 
-function hosting_alias_help($path) {
+function hosting_alias_help($path, $arg) {
   switch($path) {
     case 'admin/hosting/aliases' :
       $output = t('Site aliases allow you to let sites be available through multiple domain addresses.<br /> The most common use of this functionality is to provide automatic aliasing for www.mysite.com and mysite.com variants of the domain name<br /> ');
@@ -36,7 +35,7 @@ function hosting_alias_help($path) {
  * Add a textbox to site node forms with a newline
  * separated list of aliases to the site
  */
-function hosting_alias_form_alter($form_id, &$form) {
+function hosting_alias_form_alter(&$form, $form_state, $form_id) {
   if (user_access('create site aliases')) {
     if ($form_id == 'site_node_form') {
       $form['aliases'] = array(
Index: client/hosting_client.access.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/client/hosting_client.access.inc,v
retrieving revision 1.7
diff -u -p -r1.7 hosting_client.access.inc
--- client/hosting_client.access.inc	17 Apr 2009 03:03:31 -0000	1.7
+++ client/hosting_client.access.inc	13 May 2009 13:09:15 -0000
@@ -66,17 +66,17 @@ function hosting_client_user_form($edit,
   }
 }
 
-function hosting_client_user_form_validate($edit) {
-  if (array_key_exists('hosting_client', $edit)) {
-    if (!$client = hosting_get_client($edit['hosting_client'])) {
+function hosting_client_user_form_validate($form, &$form_state) {
+  if (array_key_exists('hosting_client', $form_state['values'])) {
+    if (!$client = hosting_get_client($form_state['values']['hosting_client'])) {
       form_set_error('hosting_client', 'Please fill in a valid client');
     }
   }
 }
 
-function hosting_client_user_form_submit($edit, $user) {
-  if (array_key_exists('hosting_client', $edit)) {
-    $client = hosting_get_client($edit['hosting_client']);
+function hosting_client_user_form_submit($form, &$form_state) {
+  if (array_key_exists('hosting_client', $form_state['values'])) {
+    $client = hosting_get_client($form_state['values']['hosting_client']);
     $query = db_query('UPDATE {hosting_client_user} SET client = %d WHERE user = %d', $client->nid, $user->uid);
     if (!db_affected_rows()) {
       $query = db_query('INSERT INTO {hosting_client_user} (client, user) VALUES (%d, %d)', $client->nid, $user->uid);
Index: client/hosting_client.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/client/hosting_client.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_client.info
--- client/hosting_client.info	2 Jun 2008 18:59:11 -0000	1.1
+++ client/hosting_client.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = Client
 description = Allow Hostmaster to configure clients.
 package = Hosting
-dependencies = hosting
+dependencies[] = hosting
+
+core = 6.x
\ No newline at end of file
Index: client/hosting_client.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/client/hosting_client.install,v
retrieving revision 1.8
diff -u -p -r1.8 hosting_client.install
--- client/hosting_client.install	17 Apr 2009 03:03:31 -0000	1.8
+++ client/hosting_client.install	13 May 2009 13:09:15 -0000
@@ -1,28 +1,68 @@
 <?php
 // $Id: hosting_client.install,v 1.8 2009/04/17 03:03:31 adrian Exp $
-function hosting_client_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql' :
-    case 'mysqli':
-      db_query("CREATE TABLE {hosting_client} (
-        vid int(10) unsigned NOT NULL default '0',
-        nid int(10) unsigned NOT NULL default '0',
-        name longtext,
-        organization longtext,
-        email varchar(255) NOT NULL default '',
-        PRIMARY KEY  (vid)
-      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-      db_query("CREATE UNIQUE INDEX hosting_client_email_idx ON hosting_client (email)");
 
-      db_query("CREATE TABLE {hosting_client_user} (
-         user int(10) unsigned NOT NULL default '0',
-         client int(10) unsigned NOT NULL default '0',
-         PRIMARY KEY (user)
-       ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-      db_query("INSERT INTO {hosting_client_user} VALUES (1, 1)");
-      break;
-   }
+/**
+ * Implementation of hook_schema().
+ */
+function hosting_client_schema() {
+  $schema['hosting_client'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'name' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'organization' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'email' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+    ),
+    'primary key' => array('vid'),
+  );
+
+  $schema['hosting_client_user'] = array(
+    'fields' => array(
+      'user' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'client' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('user'),
+  );
 
+  return $schema;
+}
+
+function hosting_client_install() {
+  // Create tables.
+  drupal_install_schema('hosting_client');
 }
 
 /**
Index: client/hosting_client.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/client/hosting_client.module,v
retrieving revision 1.35
diff -u -p -r1.35 hosting_client.module
--- client/hosting_client.module	7 May 2009 16:24:36 -0000	1.35
+++ client/hosting_client.module	13 May 2009 13:09:15 -0000
@@ -37,31 +37,31 @@ function hosting_client_perm() {
   return array('create client','view client', 'edit own client', 'delete own client', 'administer clients', 'administer client users');
 }
 
-function hosting_client_access($op, $node) {
+function hosting_client_access($op, $node, $account) {
   if (!hosting_feature('client')) {
     // multiple client support has been disabled for this site.
     return FALSE;
   }
 
-  if (user_access('administer clients')) {
+  if (user_access('administer clients', $account)) {
     return TRUE;
   }
   else {
-    global $user;
+
     switch ($op) {
       case 'create': 
-        return user_access('create client');
+        return user_access('create client', $account);
         break;
       case 'view':
-        return user_access('view client');
+        return user_access('view client', $account);
         break;
       case 'update':
-        if (user_access('edit own client') && $user->uid == $node->uid) {
+        if (user_access('edit own client', $account) && $account->uid == $node->uid) {
           return TRUE;
         }
         break;
       case 'delete':
-        if ((user_access('delete own client') && $user->uid == $node ->uid)) {
+        if ((user_access('delete own client', $account) && $account->uid == $node ->uid)) {
           return TRUE;
         }
         break;
@@ -224,13 +224,22 @@ function hosting_client_register_user($n
       '!uri' => $GLOBALS['base_url'], 
       '!uri_brief' => substr($base_url, strlen('http://')), 
       '!date' => format_date(time()), 
-      '!login_uri' => url('user', NULL, NULL, TRUE), 
-      '!edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE), 
+      '!login_uri' => url('user', array('absolute' => TRUE)), 
+      '!edit_uri' => url('user/'. $account->uid .'/edit', array('absolute' => TRUE)), 
       '!login_url' => user_pass_reset_url($user));
     // No e-mail verification is required, create new user account, and login user immediately.
     $subject = _hosting_client_mail_text('welcome_subject', $variables);
     $body = _hosting_client_mail_text('welcome_body', $variables);
-    drupal_mail('hosting-client-register-welcome', $to, $subject, $body);
+//    drupal_mail('hosting-client-register-welcome', $to, $subject, $body);
+    /* TODO Create a hook_mail($key, &$message, $params) function to generate
+    the message body when called by drupal_mail. */
+    $account = array(); // Set this as needed
+    $language = user_preferred_language($account);
+    $object = array(); // Replace this as needed
+    $context['subject'] = $subject;
+    $context['body'] = $body;
+    $params = array('account' => $account, 'object' => $object, 'context' => $context);
+    drupal_mail('hosting_client', 'hosting-client-register-welcome', $to, $language, $params);
   }
 }
 
@@ -343,50 +352,66 @@ function hosting_import_client($email, $
 /**
  * Implementation of hook_menu()
  */
-function hosting_client_menu($may_cache) {
-  if (!$may_cache) {
+function hosting_client_menu() {
+/* TODO
+   Non menu code that was placed in hook_menu under the '!$may_cache' block
+   so that it could be run during initialization, should now be moved to hook_init.
+   Previously we called hook_init twice, once early in the bootstrap process, second
+   just after the bootstrap has finished. The first instance is now called boot
+   instead of init.
+   
+   In Drupal 6, there are now two hooks that can be used by modules to execute code
+   at the beginning of a page request. hook_boot() replaces hook_boot() in Drupal 5
+   and runs on each page request, even for cached pages. hook_boot() now only runs
+   for non-cached pages and thus can be used for code that was previously placed in
+   hook_menu() with $may_cache = FALSE:
+   
+   Dynamic menu items under a '!$may_cache' block can often be simplified
+   to remove references to arg(n) and use of '%<function-name>' to check
+   conditions. See http://drupal.org/node/103114.
+   
+   The title and description arguments should not have strings wrapped in t(),
+   because translation of these happen in a later stage in the menu system.
+*/
+  //if (!$may_cache) {
     if (arg(0) == 'node' && is_numeric(arg(1))) {
       $node = node_load(arg(1));
       if ($node->type == 'client') {
         $site = new stdClass();
         $site->type = 'site';
         $site->client = arg(1);
-        $items[] = array(
-          'path' => 'node/'. $node->nid .'/site/add',
-          'title' => t('Add site'),
-          'description' => t('Add a site to the current client'),
-          'callback' => 'drupal_get_form',
-          'callback arguments' => array('site_node_form', $site),
-          'access' => user_access('create site'),
+        $items['node/'. $node->nid .'/site/add'] = array(
+          'title' => 'Add site',
+          'description' => 'Add a site to the current client',
+          'page callback' => 'drupal_get_form',
+          'page arguments' => array('site_node_form', $site),
+          'access arguments' => array('create site'),
           'type' => MENU_LOCAL_TASK,
           'weight' => 5,
         );
       }
     }
 
-    $items[] = array(
-      'path' => 'hosting_client/autocomplete', 
-      'title' => t('hosting client get client autocomplete'),
-      'callback' => 'hosting_client_autocomplete', 
-      'access' => TRUE, 
+    $items['hosting_client/autocomplete'] = array(
+      'title' => 'hosting client get client autocomplete',
+      'page callback' => 'hosting_client_autocomplete', 
+      'access arguments' => array('access content'), 
       'type' => MENU_CALLBACK
     );
 
-  }
-  else {
-    $items[] = array(
-      'path' => 'admin/hosting/client', 
-      'title' => t('Clients'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'hosting_client_configure', 
-      'access' => user_access('administer clients'),
+  //}
+  //else {
+    $items['admin/hosting/client'] = array(
+      'title' => 'Clients',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => 'hosting_client_configure', 
+      'access arguments' => array('administer clients'),
       'type' => MENU_LOCAL_TASK
     );
-  }
+  //}
   return $items;
 }
 
-
 function _hosting_client_mail_text($messageid, $variables = array()) {
   // Check if an admin setting overrides the default string.
   if ($admin_setting = variable_get('hosting_client_mail_'. $messageid, FALSE)) {
Index: cron/hosting_cron.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/cron/hosting_cron.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_cron.info
--- cron/hosting_cron.info	13 Feb 2008 00:25:35 -0000	1.1
+++ cron/hosting_cron.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,5 @@
 name = Hosting Cron
 description = Allow the hosting system to cron all the installed sites on a schedule.
 package = Hosting
-dependencies = hosting
\ No newline at end of file
+dependencies[] = hosting
+core = 6.x
\ No newline at end of file
Index: db_server/hosting_db_server.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/db_server/hosting_db_server.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_db_server.info
--- db_server/hosting_db_server.info	2 Jun 2008 20:40:17 -0000	1.1
+++ db_server/hosting_db_server.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = Database Server 
 description = Allow Hostmaster to configure database servers.
 package = Hosting
-dependencies = hosting
+dependencies[] = hosting
+
+core = 6.x
\ No newline at end of file
Index: db_server/hosting_db_server.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/db_server/hosting_db_server.install,v
retrieving revision 1.2
diff -u -p -r1.2 hosting_db_server.install
--- db_server/hosting_db_server.install	15 Oct 2008 06:49:25 -0000	1.2
+++ db_server/hosting_db_server.install	13 May 2009 13:09:15 -0000
@@ -1,18 +1,48 @@
 <?php
 // $Id: hosting_db_server.install,v 1.2 2008/10/15 06:49:25 adrian Exp $
 
+
+/**
+ * Implementation of hook_schema().
+ */
+function hosting_db_server_schema() {
+  $schema['hosting_db_server'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'db_type' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+      ),
+      'db_user' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+      ),
+      'db_passwd' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+      ),
+    ),
+    'primary key' => array('vid'),
+  );
+
+  return $schema;
+}
+
 function hosting_db_server_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      db_query("CREATE TABLE {hosting_db_server} (
-        vid int(10) unsigned NOT NULL default '0',
-        nid int(10) unsigned NOT NULL default '0',
-        db_type longtext NOT NULL, 
-        db_user longtext NOT NULL,
-        db_passwd longtext NOT NULL,
-        PRIMARY KEY  (vid)
-      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-      break;
-  }
+  // Create tables.
+  drupal_install_schema('hosting_db_server');
 }
Index: db_server/hosting_db_server.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/db_server/hosting_db_server.module,v
retrieving revision 1.27
diff -u -p -r1.27 hosting_db_server.module
--- db_server/hosting_db_server.module	13 May 2009 01:18:27 -0000	1.27
+++ db_server/hosting_db_server.module	13 May 2009 13:09:15 -0000
@@ -82,24 +82,24 @@ function hosting_db_server_perm() {
   return array('create database server','view database server', 'edit database server', 'delete database server');
 }
 
-function hosting_db_server_access($op, $node) {
-  global $user;
+function hosting_db_server_access($op, $node, $account) {
+
 
   switch($op) {
     case 'create':
-      return user_access('create database server');
+      return user_access('create database server', $account);
       break;
     case 'update':
-      return user_access('edit database server');
+      return user_access('edit database server', $account);
       break;
     case 'delete':
-      return user_access('delete database server');
+      return user_access('delete database server', $account);
       break;
     default:
       break;
   }
 
-//  return hosting_access($op, $node);
+//  return hosting_access($op, $node, $account);
 }
 
 /**
@@ -158,10 +158,17 @@ function hosting_db_server_form(&$node) 
  * Implementation of hook_validate().
   */
 function hosting_db_server_validate($node, &$form) {
+/* TODO Validation handlers can pass information to submit handlers
+   Previously, it was necessary to embed validated results in the $form_values 
+   to carry them over from validation to submission. Now, though, validation 
+   handlers can simply place them into $form_state. This keeps the new 
+   $form_state['values'] clean, and ensures that it always represents the data 
+   submitted by the web user. */
+
   if (!empty($node->db_passwd) && $node->nid) {
     $old = node_load($node->nid);
-    form_set_value($form['db_passwd']['pass1'], $old->db_passwd);
-    form_set_value($form['db_passwd']['pass2'], $old->db_passwd);
+    form_set_value($form['db_passwd']['pass1'], $old->db_passwd, $form);
+    form_set_value($form['db_passwd']['pass2'], $old->db_passwd, $form);
   }
 }
 
Index: dns_server/hosting_dns.admin.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/dns_server/hosting_dns.admin.inc,v
retrieving revision 1.3
diff -u -p -r1.3 hosting_dns.admin.inc
--- dns_server/hosting_dns.admin.inc	16 Apr 2009 01:46:52 -0000	1.3
+++ dns_server/hosting_dns.admin.inc	13 May 2009 13:09:15 -0000
@@ -1,104 +1,118 @@
 <?php
 // $Id: hosting_dns.admin.inc,v 1.3 2009/04/16 01:46:52 adrian Exp $
 
+/* TODO Remove $row argument from db_result() method
+   The $row argument of db_result() was removed from the database abstraction
+   layer in 6.x core, as it was a database dependent option. Developers need to
+   use other handling to replace the needs of this method. */
+
 // Admin configuration/UI hooks
 
 /**
  * Implementation of hook_menu().
  **/
-function hosting_dns_menu($may_cache) {
-  if (!$may_cache) {
+function hosting_dns_menu() {
+/* TODO
+   Non menu code that was placed in hook_menu under the '!$may_cache' block
+   so that it could be run during initialization, should now be moved to hook_init.
+   Previously we called hook_init twice, once early in the bootstrap process, second
+   just after the bootstrap has finished. The first instance is now called boot
+   instead of init.
+   
+   In Drupal 6, there are now two hooks that can be used by modules to execute code
+   at the beginning of a page request. hook_boot() replaces hook_boot() in Drupal 5
+   and runs on each page request, even for cached pages. hook_boot() now only runs
+   for non-cached pages and thus can be used for code that was previously placed in
+   hook_menu() with $may_cache = FALSE:
+   
+   Dynamic menu items under a '!$may_cache' block can often be simplified
+   to remove references to arg(n) and use of '%<function-name>' to check
+   conditions. See http://drupal.org/node/103114.
+   
+   The title and description arguments should not have strings wrapped in t(),
+   because translation of these happen in a later stage in the menu system.
+*/
+  //if (!$may_cache) {
 # provide engine-specific settings here, depending on the types of the DNS nodes in the system..
-    $items[] = array(
-      'path' => 'admin/hosting/dns',
-      'title' => t('DNS'),
-      'description' => t('Manually administer DNS zones and records'),
-      'callback' => 'hosting_dns_admin',
-      'access' => user_access('administer DNS provisioning'),
+    $items['admin/hosting/dns'] = array(
+      'title' => 'DNS',
+      'description' => 'Manually administer DNS zones and records',
+      'page callback' => 'hosting_dns_admin',
+      'access arguments' => array('administer DNS provisioning'),
       'type' => MENU_LOCAL_TASK
     );
-    $items[] = array(
-      'path' => 'admin/hosting/dns/list',
-      'title' => t('List Zones'),
+    $items['admin/hosting/dns/list'] = array(
+      'title' => 'List Zones',
       'type' => MENU_DEFAULT_LOCAL_TASK,
       'weight' => -1,
     );
-    $items[] = array(
-      'path' => 'admin/hosting/dns/configure',
-      'title' => t('Configure'),
+    $items['admin/hosting/dns/configure'] = array(
+      'title' => 'Configure',
       'type' => MENU_LOCAL_TASK,
-      'description' => t('Configure DNS Provisioning'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'hosting_dns_settings',
-      'access' => user_access('administer DNS provisioning'),
+      'description' => 'Configure DNS Provisioning',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => 'hosting_dns_settings',
+      'access arguments' => array('administer DNS provisioning'),
       'weight' => 10,
     );
 
 
-    $items[] = array(
-      'path' => 'admin/hosting/dns/add',
-      'title' => t('Add Zone'),
-      'description' => t('Add a new DNS zone (domain) to the system'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'hosting_dns_zone_form',
+    $items['admin/hosting/dns/add'] = array(
+      'title' => 'Add Zone',
+      'description' => 'Add a new DNS zone (domain) to the system',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => 'hosting_dns_zone_form',
       'type' => MENU_LOCAL_TASK,
     );
 
     $zid = arg(3);
-    $items[] = array(
-      'path' => 'admin/hosting/dns/'. $zid .'/edit',
-      'title' => t('Edit Zone'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_dns_zone_form', $zid),
+    $items['admin/hosting/dns/'. $zid .'/edit'] = array(
+      'title' => 'Edit Zone',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_dns_zone_form', $zid),
       'type' => MENU_CALLBACK,
     );
-    $items[] = array(
-      'path' => 'admin/hosting/dns/'. $zid .'/delete',
-      'title' => t('Delete Zone'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_dns_zone_delete_confirm', $zid),
+    $items['admin/hosting/dns/'. $zid .'/delete'] = array(
+      'title' => 'Delete Zone',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_dns_zone_delete_confirm', $zid),
       'type' => MENU_CALLBACK,
     );
 
     $rid = arg(5);
-    $items[] = array(
-      'path' => 'admin/hosting/dns/'. $zid .'/records',
-      'title' => t('Zone Records'),
-      'callback' => 'hosting_dns_records',
-      'callback arguments' => $zid,
-      'access' => user_access('access administration pages'),
+    $items['admin/hosting/dns/'. $zid .'/records'] = array(
+      'title' => 'Zone Records',
+      'page callback' => 'hosting_dns_records',
+      'page arguments' => $zid,
+      'access arguments' => array('access administration pages'),
       'type' => MENU_CALLBACK,
     );
-    $items[] = array(
-      'path' => 'admin/hosting/dns/'. $zid .'/records/list',
-      'title' => t('List Zone Records'),
+    $items['admin/hosting/dns/'. $zid .'/records/list'] = array(
+      'title' => 'List Zone Records',
       'type' => MENU_DEFAULT_LOCAL_TASK,
       'weight' => -10,
     );
-    $items[] = array(
-      'path' => 'admin/hosting/dns/' . $zid .'/records/add',
-      'title' => t('Add Zone Record'),
-      'description' => t('Add a new DNS zone record (subdomain) to the system'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_dns_record_form', $zid), 
+    $items['admin/hosting/dns/' . $zid .'/records/add'] = array(
+      'title' => 'Add Zone Record',
+      'description' => 'Add a new DNS zone record (subdomain) to the system',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_dns_record_form', $zid), 
       'type' => MENU_LOCAL_TASK,
     );
-    $items[] = array(
-      'path' => 'admin/hosting/dns/'. $zid .'/records/'. $rid . '/edit',
-      'title' => t('Edit Zone Record'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_dns_record_form', $zid, $rid),
+    $items['admin/hosting/dns/'. $zid .'/records/'. $rid . '/edit'] = array(
+      'title' => 'Edit Zone Record',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_dns_record_form', $zid, $rid),
       'type' => MENU_CALLBACK,
     );
 
-    $items[] = array(
-      'path' => 'admin/hosting/dns/'. $zid .'/records/'. $rid . '/delete',
-      'title' => t('Delete Zone Record'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_dns_record_delete_confirm', $zid, $rid),
+    $items['admin/hosting/dns/'. $zid .'/records/'. $rid . '/delete'] = array(
+      'title' => 'Delete Zone Record',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_dns_record_delete_confirm', $zid, $rid),
       'type' => MENU_CALLBACK,
     );
-  }
+  //}
   return $items;
 }
 
@@ -166,7 +180,7 @@ function hosting_dns_records($zid) {
   return $output;
 }
 
-function hosting_dns_zone_form($zid=0) {
+function hosting_dns_zone_form(&$form_state, $zid=0) {
   $fields = array('origin', 'ns1', 'ns2', 'mbox', 'serial', 'refresh', 'retry', 'expire', 'minimum', 
 'ttl', 'active', 'xfer');
   $titles = array(t('Domain Name'), t('Primary NS'), t('Secondary NS'), t('Admin Email'), t('Serial')
@@ -208,10 +222,9 @@ function hosting_dns_zone_form($zid=0) {
   return $form;
 }
 
+function hosting_dns_zone_form_validate($form, &$form_state) {
 
-function hosting_dns_zone_form_validate($form_id, $form_values) {
-
-  if (!$form_values['zid']) { # Create a new zone
+  if (!$form_state['values']['zid']) { # Create a new zone
     # Make sure it doesn't already exist
   }
 
@@ -219,16 +232,16 @@ function hosting_dns_zone_form_validate(
 
 }
 
-function hosting_dns_zone_form_submit($form_id, $form_values) {
+function hosting_dns_zone_form_submit($form, &$form_state) {
 # update db (soa table)
-  if ($form_values['zid']) { # Update an existing zone
-    hosting_dns_zone('update', $form_values);   
+  if ($form_state['values']['zid']) { # Update an existing zone
+    hosting_dns_zone('update', $form_state['values']);   
 # schedule task
   } else {                   # Create a new zone
-    hosting_dns_zone('add', $form_values);
+    hosting_dns_zone('add', $form_state['values']);
 # schedule task
   } 
-  return 'admin/hosting/dns';
+  $form_state['redirect'] = 'admin/hosting/dns';
 }
 
 function hosting_dns_zone_delete_confirm($zid) {
@@ -239,10 +252,10 @@ build/hosting_dns", "This action cannot 
   return $output;
 }
 
-function hosting_dns_zone_delete_confirm_submit($form_id, $form_values) {
+function hosting_dns_zone_delete_confirm_submit($form, &$form_state) {
 # remove zone from db (soa table)
 # schedule task to delete zone
-  #provision_dns_zone('delete', array('zid' => $form_values['zid']));
+  #provision_dns_zone('delete', array('zid' => $form_state['values']['zid']));
   return 'admin/hosting/dns';
 }
 
@@ -305,19 +318,19 @@ function hosting_dns_record_form($zid, $
   return $form;
 }
 
-function hosting_dns_record_form_validate($form_id, $form_values) {
+function hosting_dns_record_form_validate($form, &$form_state) {
   # TODO: validate the form values!
 }
 
-function hosting_dns_record_form_submit($form_id, $form_values) {
-  if ($form_values['rid']) {  # Update an existing zone
-    hosting_dns_rr('update', $form_values['zid'], $form_values);
+function hosting_dns_record_form_submit($form, &$form_state) {
+  if ($form_state['values']['rid']) {  # Update an existing zone
+    hosting_dns_rr('update', $form_state['values']['zid'], $form_state['values']);
 # schedule a task to commit update
   } else {
-    hosting_dns_rr('add', $form_values['zid'], $form_values);
+    hosting_dns_rr('add', $form_state['values']['zid'], $form_state['values']);
 # schedule a task to commit update
   }
-  return 'admin/hosting/dns/'. $form_values['zid'] .'/records';
+  return 'admin/hosting/dns/'. $form_state['values']['zid'] .'/records';
 }
 
 function hosting_dns_record_delete_confirm($zid, $rid) {
@@ -333,8 +346,8 @@ function hosting_dns_record_delete_confi
   return $output;
 }
 
-function hosting_dns_record_delete_confirm_submit($form_id, $form_values) {
+function hosting_dns_record_delete_confirm_submit($form, &$form_state) {
   # Schedule task to delete the record?
-  # hosting_dns_rr('delete', $form_values['zid'], array('rid' => $form_values['rid']));
-  return 'admin/hosting/dns/'. $form_values['zid'] .'/records';
+  # hosting_dns_rr('delete', $form_state['values']['zid'], array('rid' => $form_state['values']['rid']));
+  return 'admin/hosting/dns/'. $form_state['values']['zid'] .'/records';
 }
Index: dns_server/hosting_dns.api.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/dns_server/hosting_dns.api.inc,v
retrieving revision 1.4
diff -u -p -r1.4 hosting_dns.api.inc
--- dns_server/hosting_dns.api.inc	16 Apr 2009 01:46:52 -0000	1.4
+++ dns_server/hosting_dns.api.inc	13 May 2009 13:09:15 -0000
@@ -1,6 +1,11 @@
 <?php
 // $Id: hosting_dns.api.inc,v 1.4 2009/04/16 01:46:52 adrian Exp $
 
+/* TODO Remove $row argument from db_result() method
+   The $row argument of db_result() was removed from the database abstraction
+   layer in 6.x core, as it was a database dependent option. Developers need to
+   use other handling to replace the needs of this method. */
+
 /**
  * Query status of a DNS entry (zone or RR)
  *
Index: dns_server/hosting_dns.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/dns_server/hosting_dns.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_dns.info
--- dns_server/hosting_dns.info	14 Jan 2009 21:57:16 -0000	1.1
+++ dns_server/hosting_dns.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = DNS Server 
 description = Allow Hostmaster to configure DNS servers.
 package = Hosting
-dependencies = hosting
+dependencies[] = hosting
+
+core = 6.x
\ No newline at end of file
Index: dns_server/hosting_dns.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/dns_server/hosting_dns.module,v
retrieving revision 1.10
diff -u -p -r1.10 hosting_dns.module
--- dns_server/hosting_dns.module	16 Apr 2009 01:46:52 -0000	1.10
+++ dns_server/hosting_dns.module	13 May 2009 13:09:15 -0000
@@ -20,8 +20,8 @@ function hosting_dns_hosting_service() {
   return array("dns_server" => t("DNS Server"));
 }
 
-function hosting_dns_help($section) {
-  switch ($section) {
+function hosting_dns_help($path, $arg) {
+  switch ($path) {
     case 'admin/help/provision#requirements':
       $output .= _hosting_requirements('config_dns_path');
       $output .= _hosting_requirements('visudo_dns');
@@ -113,21 +113,21 @@ function hosting_dns_perm() {
 /**
  * Implementation of hook_access
  **/
-function hosting_dns_access($op, $node) {
-  global $user;
+function hosting_dns_access($op, $node, $account) {
+
 
   switch($op) {
     case 'create':
-      return user_access('create DNS server');
+      return user_access('create DNS server', $account);
       break;
     case 'view':
-      return user_access('view DNS server');
+      return user_access('view DNS server', $account);
       break;
     case 'update':
-      return user_access('edit DNS server');
+      return user_access('edit DNS server', $account);
       break;
     case 'delete':
-      return user_access('delete DNS server');
+      return user_access('delete DNS server', $account);
       break;
     default:
       break;
@@ -591,7 +591,7 @@ function hosting_dns_hosting_summary() {
  * hidden if only one DNS server is available.
  * Also adds a select field to site nodes to determine the primary DNS server for the site.
  **/
-function hosting_dns_form_alter($form_id, &$form) {
+function hosting_dns_form_alter(&$form, &$form_state, $form_id) {
   
   if ($form_id == 'platform_node_form') {
     $dns_servers = _hosting_get_dns_servers();
Index: itk/hosting_itk.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/itk/hosting_itk.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_itk.info
--- itk/hosting_itk.info	30 Nov 2008 16:56:42 -0000	1.1
+++ itk/hosting_itk.info	13 May 2009 13:09:15 -0000
@@ -1,5 +1,6 @@
 ; $Id: hosting_itk.info,v 1.1 2008/11/30 16:56:42 adrian Exp $
 name = Apache-ITK hosting frontend
 description = "Configures a Apache ITK backend with proper permissions."
-dependencies = hosting
-package = Hosting
\ No newline at end of file
+dependencies[] = hosting
+package = Hosting
+core = 6.x
\ No newline at end of file
Index: itk/hosting_itk.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/itk/hosting_itk.module,v
retrieving revision 1.4
diff -u -p -r1.4 hosting_itk.module
--- itk/hosting_itk.module	26 Feb 2009 18:48:17 -0000	1.4
+++ itk/hosting_itk.module	13 May 2009 13:09:15 -0000
@@ -50,7 +50,7 @@ function hosting_itk_nodeapi(&$node, $op
 //   }
 }
 
-function hosting_itk_form_alter($form_id, &$form) {
+function hosting_itk_form_alter(&$form, &$form_state, $form_id) {
 
   if ($form_id == 'web_server_node_form') { 
     $user = posix_getpwnam(HOSTING_DEFAULT_SCRIPT_USER);
Index: migrate/hosting_migrate.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/migrate/hosting_migrate.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_migrate.info
--- migrate/hosting_migrate.info	11 Feb 2009 19:26:58 -0000	1.1
+++ migrate/hosting_migrate.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = Site migration
 description = Migrate sites between platforms, performing upgrades when necessary.
 package = Hosting
-dependencies = hosting
+dependencies[] = hosting
+
+core = 6.x
\ No newline at end of file
Index: migrate/hosting_migrate.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/migrate/hosting_migrate.module,v
retrieving revision 1.13
diff -u -p -r1.13 hosting_migrate.module
--- migrate/hosting_migrate.module	29 Apr 2009 17:48:25 -0000	1.13
+++ migrate/hosting_migrate.module	13 May 2009 13:09:15 -0000
@@ -87,11 +87,11 @@ function theme_hosting_task_migrate_form
   return $output;
 }
 
-function hosting_task_migrate_form_validate($form_id, $form_values, $form, $site) {
-  if (!$form_values['parameters']['target_platform']) {
+function hosting_task_migrate_form_validate($form, &$form_state) {
+  if (!$form_state['values']['parameters']['target_platform']) {
     form_set_error('parameters][target_platform', t('You need to select a valid platform to migrate your site to.'));
   }
-  if ($form_values['parameters']['target_platform'] == $site->platform) {
+  if ($form_state['values']['parameters']['target_platform'] == $site->platform) {
     form_set_error('parameters][target_platform', t('You may not select your current platform to migrate your site to.'));
   }
 }
Index: package/hosting_package.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/package/hosting_package.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_package.info
--- package/hosting_package.info	2 Jun 2008 18:59:12 -0000	1.1
+++ package/hosting_package.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = Package management
 description = Allow Hostmaster to keep track which packages have been installed.
 package = Hosting
-dependencies = hosting
+dependencies[] = hosting
+
+core = 6.x
\ No newline at end of file
Index: package/hosting_package.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/package/hosting_package.install,v
retrieving revision 1.9
diff -u -p -r1.9 hosting_package.install
--- package/hosting_package.install	31 Mar 2009 18:58:17 -0000	1.9
+++ package/hosting_package.install	13 May 2009 13:09:15 -0000
@@ -1,35 +1,109 @@
 <?php
 // $Id: hosting_package.install,v 1.9 2009/03/31 18:58:17 adrian Exp $
+
+/**
+ * Implementation of hook_schema().
+ */
+function hosting_package_schema() {
+  $schema['hosting_package'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'package_type' => array(
+        'type' => 'varchar',
+        'length' => 16,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'short_name' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'description' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+        'default' => '',
+      ),
+    ),
+    'primary key' => array('vid'),
+  );
+
+  $schema['hosting_package_instance'] = array(
+    'fields' => array(
+      'iid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'rid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'package_id' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'filename' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'schema_version' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'version' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'status' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('iid'),
+  );
+
+  $schema['hosting_package_languages'] = array(
+    'fields' => array(
+      'iid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+      ),
+      'language' => array(
+        'type' => 'varchar',
+        'length' => 12,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+    ),
+  );
+
+  return $schema;
+}
+
 function hosting_package_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql' :
-    case 'mysqli' :
-      db_query("CREATE TABLE {hosting_package} (
-        vid int NOT NULL default '0',
-        nid int(10) unsigned NOT NULL default '0',
-        package_type varchar(16) NOT NULL default '',
-        short_name longtext NOT NULL default '',
-        description longtext NOT NULL default '',
-        PRIMARY KEY (vid)
-      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-
-      db_query("CREATE TABLE {hosting_package_instance} (
-        iid int NOT NULL DEFAULT '0',
-        rid int(11) NOT NULL default '0',
-        package_id int(11) NOT NULL default '0',
-        filename longtext NOT NULL DEFAULT '',
-        schema_version int(10) NOT NULL default '0',
-        version longtext NOT NULL default '',
-        status int(1) NOT NULL default '0',
-        PRIMARY KEY (iid)
-      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-
-      db_query("CREATE TABLE {hosting_package_languages} (
-        iid int NOT NULL,
-        language VARCHAR(12) NOT NULL DEFAULT ''
-      )  /*!40100 DEFAULT CHARACTER SET UTF8 */");
-      break;
-  }
+  // Create tables.
+  drupal_install_schema('hosting_package');
 }
 
 /**
Index: package/hosting_package.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/package/hosting_package.module,v
retrieving revision 1.36
diff -u -p -r1.36 hosting_package.module
--- package/hosting_package.module	17 Apr 2009 19:57:45 -0000	1.36
+++ package/hosting_package.module	13 May 2009 13:09:15 -0000
@@ -26,63 +26,80 @@ function hosting_package_node_info() {
   return $types;
 }
 
-function hosting_package_menu($may_cache) {
+function hosting_package_menu() {
   $items = array();
   
-  if (!$may_cache) {
+/* TODO
+   Non menu code that was placed in hook_menu under the '!$may_cache' block
+   so that it could be run during initialization, should now be moved to hook_init.
+   Previously we called hook_init twice, once early in the bootstrap process, second
+   just after the bootstrap has finished. The first instance is now called boot
+   instead of init.
+   
+   In Drupal 6, there are now two hooks that can be used by modules to execute code
+   at the beginning of a page request. hook_boot() replaces hook_boot() in Drupal 5
+   and runs on each page request, even for cached pages. hook_boot() now only runs
+   for non-cached pages and thus can be used for code that was previously placed in
+   hook_menu() with $may_cache = FALSE:
+   
+   Dynamic menu items under a '!$may_cache' block can often be simplified
+   to remove references to arg(n) and use of '%<function-name>' to check
+   conditions. See http://drupal.org/node/103114.
+   
+   The title and description arguments should not have strings wrapped in t(),
+   because translation of these happen in a later stage in the menu system.
+*/
+  //if (!$may_cache) {
     if ( arg(0) == 'node' && is_numeric(arg(1))) {
       $node = node_load(arg(1));
       if (in_array($node->type, array('site', 'platform', 'package'))) {
-        $items[] = array(
-          'path' => 'node/' . arg(1) . '/packages',
-          'title' => t('Packages'),
-          'description' => t('List of packages available for this platform'),
-          'callback' => 'hosting_package_list',
-          'callback arguments' => array(arg(1)),
+        $items['node/' . '%' . '/packages'] = array(
+          'title' => 'Packages',
+          'description' => 'List of packages available for this platform',
+          'page callback' => 'hosting_package_list',
+          'page arguments' => array(arg(1)),
           'type' => MENU_LOCAL_TASK,
-          'access' => user_access('view package'),
+          'access arguments' => array('view package'),
           'weight' => 1, 
         );
-        $items[] = array(
-          'path' => 'node/' . arg(1) . '/packages/all',
-          'title' => t('All packages'),
-          'description' => t('List of all packages'),
-          'callback' => 'hosting_package_list',
-          'callback arguments' => array(arg(1)),
+        $items['node/' . '%' . '/packages/all'] = array(
+          'title' => 'All packages',
+          'description' => 'List of all packages',
+          'page callback' => 'hosting_package_list',
+          'page arguments' => array(arg(1)),
           'type' => MENU_DEFAULT_LOCAL_TASK,
           'weight' => -1, 
         );
         foreach (_hosting_package_types() as $type => $description) {
-          $items[] = array(
-            'path' => 'node/' . arg(1) . '/packages/' . $type,
+          $items['node/' . '%' . '/packages/' . $type] = array(
             'title' => $description,
             'description' => $description,
-            'callback' => 'hosting_package_list',
-            'callback arguments' => array(arg(1), $type),
+            'page callback' => 'hosting_package_list',
+            'page arguments' => array(arg(1), $type),
             'type' => MENU_LOCAL_TASK,
             'weight' => $x++, 
           );           
         }
       }
      }
-  }
+  //}
   return $items;
 }
 
 
-function hosting_package_access($op, $node) {
+function hosting_package_access($op, $node, $account) {
   switch ($op) {
   case 'create':
-    return user_access('create package');
+    return user_access('create package', $account);
     break;
   case 'view':
-    return user_access('view package');
+    return user_access('view package', $account);
     break;
   case 'update':
-    return user_access('edit package');
+    return user_access('edit package', $account);
     break;
   case 'delete':
-    return user_access('delete package');
+    return user_access('delete package', $account);
     break;
   default:
     break;
Index: platform/hosting_platform.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/platform/hosting_platform.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_platform.info
--- platform/hosting_platform.info	2 Jun 2008 18:59:12 -0000	1.1
+++ platform/hosting_platform.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = Platforms
 description = Allow Hostmaster to keep track of multiple instances of Drupal.
 package = Hosting
-dependencies = hosting
+dependencies[] = hosting
+
+core = 6.x
\ No newline at end of file
Index: platform/hosting_platform.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/platform/hosting_platform.install,v
retrieving revision 1.3
diff -u -p -r1.3 hosting_platform.install
--- platform/hosting_platform.install	14 Nov 2008 15:39:14 -0000	1.3
+++ platform/hosting_platform.install	13 May 2009 13:09:15 -0000
@@ -1,21 +1,55 @@
 <?php
 // $Id: hosting_platform.install,v 1.3 2008/11/14 15:39:14 adrian Exp $
 
+
+/**
+ * Implementation of hook_schema().
+ */
+function hosting_platform_schema() {
+  $schema['hosting_platform'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'publish_path' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'web_server' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'release_id' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'verified' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('vid'),
+  );
+
+  return $schema;
+}
+
 function hosting_platform_install() {  
-  switch ($GLOBALS['db_type']) {
-    case 'mysql' :
-    case 'mysqli' :
-      db_query("CREATE TABLE {hosting_platform} (
-        vid int(10) unsigned NOT NULL default '0',
-        nid int(10) unsigned NOT NULL default '0',
-        publish_path longtext,
-        web_server int(11) NOT NULL default '0',
-        release_id int(11) NOT NULL default '0',
-        verified int(11) NOT NULL default '0',
-        PRIMARY KEY  (vid)
-      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-      break;
-   }
+  // Create tables.
+  drupal_install_schema('hosting_platform');
 }
 
 /**
Index: platform/hosting_platform.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/platform/hosting_platform.module,v
retrieving revision 1.51
diff -u -p -r1.51 hosting_platform.module
--- platform/hosting_platform.module	7 Apr 2009 00:29:53 -0000	1.51
+++ platform/hosting_platform.module	13 May 2009 13:09:15 -0000
@@ -45,20 +45,20 @@ function hosting_platform_perm() {
   return array('create platform', 'view platform', 'edit platform', 'delete platform');
 }
 
-function hosting_platform_access($op, $node) {
+function hosting_platform_access($op, $node, $account) {
   if (!hosting_feature('platform')) {
     return FALSE;
   }
 
   switch ($op) {
     case 'create':
-      return user_access('create platform');
+      return user_access('create platform', $account);
       break;
     case 'update':
-      return user_access('edit platform');
+      return user_access('edit platform', $account);
       break;
     case 'delete':
-      return user_access('delete platform');
+      return user_access('delete platform', $account);
       break;
   }  
 }
Index: signup/hosting_signup.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/signup/hosting_signup.info,v
retrieving revision 1.2
diff -u -p -r1.2 hosting_signup.info
--- signup/hosting_signup.info	7 Nov 2008 10:19:24 -0000	1.2
+++ signup/hosting_signup.info	13 May 2009 13:09:15 -0000
@@ -1,3 +1,5 @@
 name = Signup form
 description = A simple signup form that allows users to sign up for a new site.
 package = Hosting
+
+core = 6.x
\ No newline at end of file
Index: signup/hosting_signup.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/signup/hosting_signup.module,v
retrieving revision 1.16
diff -u -p -r1.16 hosting_signup.module
--- signup/hosting_signup.module	4 May 2009 16:44:31 -0000	1.16
+++ signup/hosting_signup.module	13 May 2009 13:09:15 -0000
@@ -1,5 +1,13 @@
 <?php
 // $Id: hosting_signup.module,v 1.16 2009/05/04 16:44:31 anarcat Exp $
+/* TODO Automatically add Drupal.settings.basePath
+   In Drupal 5, you would have to add the base path to Drupal.settings yourself
+   if you needed it (it's needed for just about every AHAH/AJAX enabled module
+   if you did it right). Now in Drupal 6, it's added automatically. You can always
+   find it at Drupal.settings.basePath (actually, as soon as drupal_add_js() is
+   called at least once, so this is similar to the way we automatically add
+   drupal.js and jquery.js. */
+
 /**
  * @file Provides a signup form that can be run on remote sites
  */
@@ -31,53 +39,68 @@ function hosting_signup_xmlrpc() {
 /**
  * Implementation of hook_menu
  */
-function hosting_signup_menu($may_cache) {
+function hosting_signup_menu() {
 
-  if (!$may_cache) {
+/* TODO
+   Non menu code that was placed in hook_menu under the '!$may_cache' block
+   so that it could be run during initialization, should now be moved to hook_init.
+   Previously we called hook_init twice, once early in the bootstrap process, second
+   just after the bootstrap has finished. The first instance is now called boot
+   instead of init.
+   
+   In Drupal 6, there are now two hooks that can be used by modules to execute code
+   at the beginning of a page request. hook_boot() replaces hook_boot() in Drupal 5
+   and runs on each page request, even for cached pages. hook_boot() now only runs
+   for non-cached pages and thus can be used for code that was previously placed in
+   hook_menu() with $may_cache = FALSE:
+   
+   Dynamic menu items under a '!$may_cache' block can often be simplified
+   to remove references to arg(n) and use of '%<function-name>' to check
+   conditions. See http://drupal.org/node/103114.
+   
+   The title and description arguments should not have strings wrapped in t(),
+   because translation of these happen in a later stage in the menu system.
+*/
+  //if (!$may_cache) {
     global $user;
 
-    $items[] = array(
-      'path' => 'hosting/signup',
-      'title' => t('Sign up for a site'),
-      'description' => t('Create your own hosted site'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_signup_form'),
-      'access' => ($user->uid == 0) && user_access('access hosting signup form'),
+    $items['hosting/signup'] = array(
+      'title' => 'Sign up for a site',
+      'description' => 'Create your own hosted site',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_signup_form'),
+      'access arguments' => ($user->uid == 0) && user_access('access hosting signup form'),
     );
-  }
-  else {
-    $items[] = array(
-      'path' => 'admin/hosting/signup',
-      'title' => t('Signup form'),
-      'description' => t('Configure the behaviour of the simplified hosting signup form'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_signup_settings'),
-      'access' => user_access('administer hosting signup form'),
+  //}
+  //else {
+    $items['admin/hosting/signup'] = array(
+      'title' => 'Signup form',
+      'description' => 'Configure the behaviour of the simplified hosting signup form',
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('hosting_signup_settings'),
+      'access arguments' => array('administer hosting signup form'),
       'type' => MENU_LOCAL_TASK,
     );
-    $items[] = array(
-      'path' => 'hosting/signup/get_form',
-      'title' => t('Sign up for a site'),
-      'description' => t('Create your own hosted site'),
-      'callback' => 'hosting_signup_get_form',
+    $items['hosting/signup/get_form'] = array(
+      'title' => 'Sign up for a site',
+      'description' => 'Create your own hosted site',
+      'page callback' => 'hosting_signup_get_form',
       'type' => MENU_CALLBACK,
-      'access' => TRUE
+      'access arguments' => array('access content')
     );
 
-    $items[] = array(
-      'path' => 'hosting/signup/form_populate',
-      'callback' =>'_hosting_signup_form_populate',
+    $items['hosting/signup/form_populate'] = array(
+      'page callback' =>'_hosting_signup_form_populate',
       'type' => MENU_CALLBACK,
-      'access' => TRUE,
+      'access arguments' => array('access content'),
     );
 
-    $items[] = array(
-      'path' => 'hosting/signup/thanks',
-      'callback' =>'hosting_signup_thanks',
+    $items['hosting/signup/thanks'] = array(
+      'page callback' =>'hosting_signup_thanks',
       'type' => MENU_CALLBACK,
-      'access' => TRUE,
+      'access arguments' => array('access content'),
     );
-  }
+  //}
 
   return $items; 
 }
@@ -190,7 +213,8 @@ function hosting_signup_get_form($server
      );
   }
   else {
-    $form = drupal_retrieve_form('_hosting_signup_form');
+/* TODO drupal_retrieve_form() now accepts a form_state parameter. */
+    $form = drupal_retrieve_form('_hosting_signup_form', $form_state);
     unset($form['#token']);
   }
   return $form; 
@@ -204,7 +228,7 @@ function hosting_signup_get_form($server
  *
  * Sets any errors that are returned from the remote site on the local site.
  */
-function hosting_signup_form_validate($form_id, $values) {
+function hosting_signup_form_validate($form, &$form_state) {
   $key = variable_get('hosting_signup_server_key', '');
   $values['form_id'] =  '_hosting_signup_form';
 
@@ -242,13 +266,14 @@ function hosting_signup_validate_form($s
  *
  * Redirects to the thank you page on success.
  */ 
-function hosting_signup_form_submit($form_id, $values) {
+function hosting_signup_form_submit($form, &$form_state) {
+  //@TODO must be broken
   $key = variable_get('hosting_signup_server_key', '');
-  $values['form_id'] =  '_hosting_signup_form';
+  $form_state['values']['form_id'] =  '_hosting_signup_form';
 
-  $return = xmlrpc(_hosting_signup_get_url(), 'hosting_signup.submitForm', $key, $values);
+  $form_state['redirect'] = xmlrpc(_hosting_signup_get_url(), 'hosting_signup.submitForm', $key, $form_state['values']);
   if (isset($return['site']['nid']) && isset($return['site']['nid'])) {
-    $path = sprintf("hosting/signup/thanks/%s/%s/%s", $return['site']['title'], $return['client']['email'], $return['client']['client_name']);
+    $path = sprintf("hosting/signup/thanks/%s/%s/%s", $return['site']['title'], $return['client']['email'], $form_state['redirect'] = ['client']['client_name']);
     drupal_goto($path);
   }
 }
@@ -320,13 +345,13 @@ function _hosting_signup_form() {
  * does. It sets any form errors into the hosting_signup_singleton
  * so they can be propogated to the local site.
  */
-function _hosting_signup_form_validate($form_id, $values) {
-  $client = (object) $values;
+function _hosting_signup_form_validate($form, &$form_state) {
+  $client = (object) $form_state['values'];
   $client->type = 'client';
   $client->title = '';
   node_validate($client);
 
-  $site = (object) $values;
+  $site = (object) $form_state['values'];
   $site->type = 'site';
   node_validate($site);
   hosting_signup_singleton(form_get_errors());
@@ -338,14 +363,14 @@ function _hosting_signup_form_validate($
  * Generates the nodes and saves them into hosting_signup_singleton,
  * so the local submission function can re-act to them.
  */
-function _hosting_signup_form_submit($form_id, $values) {
-  $client = (object) $values;
+function _hosting_signup_form_submit($form, &$form_state) {
+  $client = (object) $form_state['values'];
   $client->type = 'client';
   $client->title = '';
   $client->status = 1;
   node_save($client, 'submit');
 
-  $site = (object) $values;
+  $site = (object) $form_state['values'];
   $site->type = 'site';
   $site->status = 1;
   $site->client = $client->nid;
Index: site/hosting_site.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/site/hosting_site.info,v
retrieving revision 1.2
diff -u -p -r1.2 hosting_site.info
--- site/hosting_site.info	12 Jun 2008 03:24:45 -0000	1.2
+++ site/hosting_site.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,5 @@
 name = Sites
 description = Allow hostmaster manage hosted sites.
 package = Hosting
-dependencies = hosting 
+dependencies[] = hosting
+core = 6.x
Index: site/hosting_site.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/site/hosting_site.install,v
retrieving revision 1.6
diff -u -p -r1.6 hosting_site.install
--- site/hosting_site.install	3 Apr 2009 16:30:33 -0000	1.6
+++ site/hosting_site.install	13 May 2009 13:09:15 -0000
@@ -1,35 +1,111 @@
 <?php
 // $Id: hosting_site.install,v 1.6 2009/04/03 16:30:33 adrian Exp $
 
+
+/**
+ * Implementation of hook_schema().
+ */
+function hosting_site_schema() {
+  $schema['hosting_site'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'client' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'db_server' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'platform' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'profile' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'language' => array(
+        'type' => 'varchar',
+        'length' => 10,
+        'not null' => TRUE,
+        'default' => 'en',
+      ),
+      'last_cron' => array(
+        'type' => 'int',
+        'not null' => FALSE,
+      ),
+      'verified' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'status' => array(
+        'type' => 'int',
+        'size' => 'tiny',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('vid'),
+  );
+
+  $schema['hosting_site_backups'] = array(
+    'fields' => array(
+      'bid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+      ),
+      'site' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'web_server' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'description' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'filename' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'timestamp' => array(
+        'type' => 'int',
+        'not null' => FALSE,
+      ),
+    ),
+    'primary key' => array('bid'),
+  );
+
+  return $schema;
+}
+
 function hosting_site_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql' :
-    case 'mysqli' :
-      db_query("CREATE TABLE {hosting_site} (
-        vid int(10) unsigned NOT NULL default '0',
-        nid int(10) unsigned NOT NULL default '0',
-        client int(11) NOT NULL default '0',
-        db_server int(11) NOT NULL default '0',
-        platform int(11) NOT NULL default '0',
-        profile int(11) NOT NULL default '0',
-        language VARCHAR(10) NOT NULL default 'en',
-        last_cron int(10) default NULL,
-        verified int(10) NOT NULL default '0',
-        status tinyint NOT NULL default '0',
-        PRIMARY KEY  (vid)
-      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-
-      db_query("CREATE TABLE {hosting_site_backups} (
-        bid int(10) unsigned NOT NULL,
-        site int(10) NOT NULL default '0',
-        web_server int(10) NOT NULL default '0',
-        description longtext,
-        filename longtext,
-        timestamp int(11) default NULL,
-        PRIMARY KEY  (bid)    
-        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-      break;
-   }
+  // Create tables.
+  drupal_install_schema('hosting_site');
 }
 
 /**
Index: site/hosting_site.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/site/hosting_site.module,v
retrieving revision 1.100
diff -u -p -r1.100 hosting_site.module
--- site/hosting_site.module	9 May 2009 16:31:00 -0000	1.100
+++ site/hosting_site.module	13 May 2009 13:09:15 -0000
@@ -83,16 +83,16 @@ function hosting_site_perm() {
 /**
  * Implementation of hook_access
  */
-function hosting_site_access($op, $node) {
+function hosting_site_access($op, $node, $account) {
   switch ($op) {
     case 'create':
-      return user_access('create site');
+      return user_access('create site', $account);
       break;
     case 'update':
-      return user_access('edit site');
+      return user_access('edit site', $account);
       break;
     case 'delete':
-      return user_access('delete site');
+      return user_access('delete site', $account);
       break;
     default:
       break;
@@ -344,8 +344,15 @@ function hosting_site_validate(&$node) {
 
 }
 
-function hosting_site_submit(&$node) {
-  $node->title = strtolower($node->title); // domain names are case-insensitive
+/**
+ * Implementation of hook_nodeapi().
+ */
+function hosting_site_nodeapi(&$node, $op, $teaser, $page) {
+  switch($op) {
+    case 'submit':
+      $node->title = strtolower($node->title); // domain names are case-insensitive
+      break;
+  }
 }
 
 function hosting_site_insert(&$node) {
@@ -386,7 +393,6 @@ function hosting_site_load($node) {
   return $additions;
 }
 
-
 function hosting_nodeapi_site_delete_revision(&$node) {
   db_query('DELETE FROM {hosting_site} WHERE vid = %d', $node->vid);
 }
@@ -536,7 +542,7 @@ function hosting_site_backup_list($site)
 /**
  * Hide the delete button on site nodes
  */
-function hosting_site_form_alter($form_id, &$form) {
+function hosting_site_form_alter(&$form, &$form_state, $form_id) {
   // Remove delete button from site edit form
   if ($form_id == 'site_node_form') {
     $form['delete']['#type'] = 'hidden';
@@ -657,21 +663,21 @@ function hosting_sites() {
     '!link' => $create_site_link));
 }
 
-function hosting_site_menu($may_cache = false) {
-  $items[] = array(
-    'path' => 'hosting/sites',
-    'title' => t('Hosted sites'),
-    'description' => t('Display a list of sites'),
-    'callback' => 'hosting_sites',
+function hosting_site_menu() {
+  $items = array();
+
+  $items['hosting/sites'] = array(
+    'title' => 'Hosted sites',
+    'description' => 'Display a list of sites',
+    'page callback' => 'hosting_sites',
     'type' => MENU_CALLBACK,
-    'access' => user_access('create site') 
+    'access arguments' => array('create site') 
   );
 
-  $items[] = array(
-    'path' => 'hosting/hosting_site_form_populate',
-    'callback' =>'_hosting_site_form_populate',
+  $items['hosting/hosting_site_form_populate'] = array(
+    'page callback' =>'_hosting_site_form_populate',
     'type' => MENU_CALLBACK,
-    'access' => TRUE,
+    'access arguments' => array('access content'),
   );
 
   return $items;
@@ -727,11 +733,13 @@ function _hosting_site_form_language($pr
 function _hosting_site_form_populate($element, $value, $value2 = null) {
   $form[$element] = call_user_func('_hosting_site_form_'. $element, $value, $value2);
 
+  $form_state = array();
+
   print drupal_to_js(
     array(
       'status' => 'TRUE',
       'type' => $form[$element]['#type'],
-      'data' => drupal_render(form_builder('hosting-site-form', $form)),
+      'data' => drupal_render(form_builder('hosting-site-form', $form), $form_state),
     )
   );
   exit();
Index: stats/hosting_stats.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/stats/hosting_stats.info,v
retrieving revision 1.3
diff -u -p -r1.3 hosting_stats.info
--- stats/hosting_stats.info	6 Nov 2008 19:09:10 -0000	1.3
+++ stats/hosting_stats.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = Hosting Statistics
 description = Allow the hosting system to maintain statistics of hosted sites.
 package = Hosting
-dependencies = hosting
+dependencies[] = hosting
+
+core = 6.x
\ No newline at end of file
Index: task/hosting_task.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/task/hosting_task.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_task.info
--- task/hosting_task.info	19 Jun 2008 21:17:31 -0000	1.1
+++ task/hosting_task.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,5 @@
 name = Hosting tasks
 description = Allow Hostmaster to keep track of tasks that have been processed on the servers.
 package = Hosting
-dependencies = hosting 
+dependencies[] = hosting
+core = 6.x
Index: task/hosting_task.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/task/hosting_task.install,v
retrieving revision 1.5
diff -u -p -r1.5 hosting_task.install
--- task/hosting_task.install	1 Apr 2009 13:25:45 -0000	1.5
+++ task/hosting_task.install	13 May 2009 13:09:15 -0000
@@ -1,48 +1,143 @@
 <?php
 // $Id: hosting_task.install,v 1.5 2009/04/01 13:25:45 adrian Exp $
 
+
+/**
+ * Implementation of hook_schema().
+ */
+function hosting_task_schema() {
+  $schema['hosting_task'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'task_type' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'rid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'task_status' => array(
+        'type' => 'int',
+        'not null' => FALSE,
+      ),
+      'executed' => array(
+        'type' => 'int',
+        'not null' => FALSE,
+      ),
+    ),
+    'primary key' => array('vid'),
+  );
+
+  $schema['hosting_task_arguments'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'name' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'value' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+    ),
+  );
+
+  $schema['hosting_task_log'] = array(
+    'fields' => array(
+      'lid' => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+      ),
+      'vid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'type' => array(
+        'type' => 'varchar',
+        'length' => 16,
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'message' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+      ),
+      'error' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+        'default' => '',
+      ),
+      'timestamp' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'indexes' => array(
+      'type' => array('type'),
+    ),
+    'primary key' => array('lid'),
+  );
+
+  $schema['hosting_task_queue'] = array(
+    'fields' => array(
+      'nid' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'timestamp' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'status' => array(
+        'type' => 'int',
+        'size' => 'tiny',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('nid'),
+  );
+
+  return $schema;
+}
+
 function hosting_task_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql' :
-    case 'mysqli' :
-    db_query("CREATE TABLE {hosting_task} (
-      vid int(10) unsigned NOT NULL default '0',
-      nid int(10) unsigned NOT NULL default '0',
-      task_type longtext,
-      rid int(11) NOT NULL default '0',
-      task_status int(11) default NULL,
-      executed int(11) default NULL,
-    PRIMARY KEY  (vid)
-    ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-
-    db_query("CREATE TABLE {hosting_task_arguments} (
-      vid int(10) unsigned NOT NULL default '0',
-      nid int(10) unsigned NOT NULL default '0',
-      name longtext,
-      value longtext
-    ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-
-    # Logging table for backend task calls
-    db_query("CREATE TABLE {hosting_task_log} (
-      lid int NOT NULL auto_increment,
-      vid int NOT NULL default '0',
-      type varchar(16) NOT NULL default '',
-      message longtext NOT NULL,
-      error longtext NOT NULL default '',
-      timestamp int NOT NULL default '0',
-      PRIMARY KEY (lid),
-      KEY (type)
-    ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-
-    # Task queue
-    db_query("CREATE TABLE {hosting_task_queue} (
-      nid int NOT NULL default '0',
-      timestamp int NOT NULL default '0',
-      status tinyint unsigned NOT NULL default 0,
-      PRIMARY KEY (nid)
-    ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-    break;
-  }
+  // Create tables.
+  drupal_install_schema('hosting_task');
 }
 
 /**
Index: task/hosting_task.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/task/hosting_task.module,v
retrieving revision 1.61
diff -u -p -r1.61 hosting_task.module
--- task/hosting_task.module	29 Apr 2009 17:47:58 -0000	1.61
+++ task/hosting_task.module	13 May 2009 13:09:15 -0000
@@ -6,26 +6,45 @@
 /**
  * Implementation of hook_menu().
  */
-function hosting_task_menu($may_cache) {
+function hosting_task_menu() {
   $items = array();
   
-  if (!$may_cache) {
+/* TODO
+   Non menu code that was placed in hook_menu under the '!$may_cache' block
+   so that it could be run during initialization, should now be moved to hook_init.
+   Previously we called hook_init twice, once early in the bootstrap process, second
+   just after the bootstrap has finished. The first instance is now called boot
+   instead of init.
+   
+   In Drupal 6, there are now two hooks that can be used by modules to execute code
+   at the beginning of a page request. hook_boot() replaces hook_boot() in Drupal 5
+   and runs on each page request, even for cached pages. hook_boot() now only runs
+   for non-cached pages and thus can be used for code that was previously placed in
+   hook_menu() with $may_cache = FALSE:
+   
+   Dynamic menu items under a '!$may_cache' block can often be simplified
+   to remove references to arg(n) and use of '%<function-name>' to check
+   conditions. See http://drupal.org/node/103114.
+   
+   The title and description arguments should not have strings wrapped in t(),
+   because translation of these happen in a later stage in the menu system.
+*/
+  //if (!$may_cache) {
     if ( arg(0) == 'node' && is_numeric(arg(1))) {
       $node = node_load(arg(1));
       foreach (hosting_available_tasks($node) as $type => $task) {
-          $items[] = array(
-            'path' => 'node/' . arg(1) . '/task_' . $type,
+          $items['node/' . '%' . '/task_' . $type] = array(
             'title' => $task['title'],
             'description' => $task['description'],
-            'callback' => 'drupal_get_form',
-            'callback arguments' => array('hosting_task_confirm_form', $node, $type),
-            'access' => user_access('create ' .$type. ' task'),
+            'page callback' => 'drupal_get_form',
+            'page arguments' => array('hosting_task_confirm_form', $node, $type),
+            'access arguments' => array('create ' .$type. ' task'),
             'type' => MENU_LOCAL_TASK,
             'weight' => ($task['weight']) ? $task['weight'] : 0, 
           );
         }
      }
-  }
+  //}
   return $items;
 }
 
@@ -41,8 +60,8 @@ function hosting_task_node_info() {
   return $types;
 }
 
-function hosting_task_access($op, $node) {
-  if(user_access('administer tasks')) {
+function hosting_task_access($op, $node, $account) {
+  if(user_access('administer tasks', $account)) {
     return TRUE;
   }
 }
@@ -120,7 +139,9 @@ function hosting_task_confirm_form(&$nod
   }
   $func = $func . '_validate';
   if (function_exists($func)) {
-    $form['#validate'][$func] = array($node, $task);
+    $form['#validate'][] = $func;
+    $form['#$func_param_1'] = $node,
+    $form['#$func_param_2'] = $task,
   }
   $question = t("Are you sure you want to @task @object?", array('@task' => $task, '@object' => $node->title));
   return confirm_form($form, $question, 'node/' . $node->nid, '', $tasks[$task]['title']);
@@ -147,9 +168,9 @@ function hosting_task_restore_form($node
 }
 
 
-function hosting_task_confirm_form_submit($form_id, $values) {
+function hosting_task_confirm_form_submit($form, &$form_state) {
   hosting_add_task($values['nid'], $values['task'], $values['parameters']);
-  return 'node/' . $values['nid'];
+  $form_state['redirect'] = 'node/' . $values['nid'];
 }
 
 function hosting_task_set_title(&$node) {
@@ -280,8 +301,8 @@ function hosting_task_retry_form($nid) {
   return $form;
 }
 
-function hosting_task_retry_form_submit($form_id, $edit) {
-  hosting_task_retry($edit['task']);
+function hosting_task_retry_form_submit($form, &$form_state) {
+  hosting_task_retry($form_state['values']['task']);
 }
 
 /**
Index: web_server/hosting_web_server.info
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/web_server/hosting_web_server.info,v
retrieving revision 1.1
diff -u -p -r1.1 hosting_web_server.info
--- web_server/hosting_web_server.info	2 Jun 2008 18:59:12 -0000	1.1
+++ web_server/hosting_web_server.info	13 May 2009 13:09:15 -0000
@@ -1,4 +1,6 @@
 name = Web Server 
 description = Allow hostmaster to configure web servers.
 package = Hosting
-dependencies = hosting
+dependencies[] = hosting
+
+core = 6.x
\ No newline at end of file
Index: web_server/hosting_web_server.install
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/web_server/hosting_web_server.install,v
retrieving revision 1.3
diff -u -p -r1.3 hosting_web_server.install
--- web_server/hosting_web_server.install	17 Feb 2009 15:46:43 -0000	1.3
+++ web_server/hosting_web_server.install	13 May 2009 13:09:15 -0000
@@ -1,24 +1,70 @@
 <?php
 // $Id: hosting_web_server.install,v 1.3 2009/02/17 15:46:43 adrian Exp $
 
+
+/**
+ * Implementation of hook_schema().
+ */
+function hosting_web_server_schema() {
+  $schema['hosting_web_server'] = array(
+    'fields' => array(
+      'vid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'nid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'ip_address' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'script_user' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'web_group' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'config_path' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'backup_path' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'restart_cmd' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+      'drush_path' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => FALSE,
+      ),
+    ),
+    'primary key' => array('vid'),
+  );
+
+  return $schema;
+}
+
 function hosting_web_server_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql' :
-    case 'mysqli' :
-      db_query("CREATE TABLE {hosting_web_server} (
-        vid int(10) unsigned NOT NULL default '0',
-        nid int(10) unsigned NOT NULL default '0',
-        ip_address longtext,
-        script_user longtext,
-        web_group longtext,
-        config_path longtext,
-        backup_path longtext,
-        restart_cmd longtext,
-        drush_path longtext,
-        PRIMARY KEY  (vid)
-      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-      break;
-  }
+  // Create tables.
+  drupal_install_schema('hosting_web_server');
 }
 
 /**
Index: web_server/hosting_web_server.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/web_server/hosting_web_server.module,v
retrieving revision 1.32
diff -u -p -r1.32 hosting_web_server.module
--- web_server/hosting_web_server.module	9 May 2009 16:46:03 -0000	1.32
+++ web_server/hosting_web_server.module	13 May 2009 13:09:15 -0000
@@ -10,8 +10,8 @@ function hosting_web_server_hosting_serv
 /**
  * Implementation of hook_help().
  */
-function hosting_web_server_help($section) {
-  switch ($section) {
+function hosting_web_server_help($path, $arg) {
+  switch ($path) {
     case 'admin/help/provision#requirements':
       $output .= _hosting_requirements('drush_path');
       $output .= _hosting_requirements('config_path');
@@ -128,22 +128,22 @@ function hosting_web_server_perm() {
   return array('create web server', 'view web server', 'edit web server', 'delete web server');
 }
 
-function hosting_web_server_access($op, $node) {
+function hosting_web_server_access($op, $node, $account) {
   if (!hosting_feature('web_server')) {
     return FALSE;
   }
   switch ($op) {
     case 'create':
-      return user_access('create web server');
+      return user_access('create web server', $account);
       break;
     case 'view':
-      return user_access('view web server');
+      return user_access('view web server', $account);
       break;
     case 'update':
-      return user_access('edit web server');
+      return user_access('edit web server', $account);
       break;
     case 'delete':
-      return user_access('delete web server');
+      return user_access('delete web server', $account);
       break;
     default:
       break;
@@ -265,6 +265,13 @@ function hosting_web_server_form(&$node)
  * Implementation of hook_validate().
   */
 function hosting_web_server_validate(&$node, &$form) {
+/* TODO Validation handlers can pass information to submit handlers
+   Previously, it was necessary to embed validated results in the $form_values 
+   to carry them over from validation to submission. Now, though, validation 
+   handlers can simply place them into $form_state. This keeps the new 
+   $form_state['values'] clean, and ensures that it always represents the data 
+   submitted by the web user. */
+
   if ($node->script_user == 'root') {
     form_set_error('script_user', t('For security reasons, you should not run drush commands as the root user. Please choose a different system account name.'));
   }
@@ -275,7 +282,7 @@ function hosting_web_server_validate(&$n
     $ip = gethostbyname($node->title);
     // setup IP only if resolution succeeded
     if ($ip != $node->title) {
-      form_set_value($form['ip_address'], $ip);
+      form_set_value($form['ip_address'], $ip, $form_state);
       $node->ip_address = $ip;
       drupal_set_message(t('Initialized the webserver IP to %ip based on hostname %name', array('%ip' => $ip, '%name' => $node->title)), 'message');
     } else {
