? .hosting.module.swp
? db_server/.hosting_db_server.module.swp
? package/.hosting_package.module.swp
? site/.hosting_site_form.js.swp
? task/.hosting_task.module.swp
Index: hosting.features.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/hosting.features.inc,v
retrieving revision 1.3
diff -u -r1.3 hosting.features.inc
--- hosting.features.inc	30 Nov 2008 22:06:13 -0000	1.3
+++ hosting.features.inc	27 May 2009 05:01:20 -0000
@@ -1,5 +1,6 @@
 <?php
 // $Id: hosting.features.inc,v 1.3 2008/11/30 22:06:13 adrian Exp $
+
 /**
  * @file Hosting features
  *
@@ -56,11 +57,12 @@
 
   }
   $form['experimental'] = $experimental;
-
+  $form['#submit'][] = 'hosting_features_form_submit';
   return system_settings_form($form);
 }
 
-function hosting_features_form_submit($form_id, $values) {
+function hosting_features_form_submit($form, &$form_state) {
+  $values = $form_state['values'];
   $features = hosting_get_features(TRUE);
   foreach ($features  as $feature => $info) {
     $value = $values[$feature];
@@ -114,11 +116,11 @@
     foreach ($hooks as $func) {
       $features = array_merge($features, $func());
     }
-    cache_set('hosting_features', 'cache', serialize($features));
+    cache_set('hosting_features', $features);
     return $features;
   }
   else {
-    return unserialize($cache->data);
+    return $cache->data;
   }
 }
 
@@ -129,7 +131,7 @@
     $features = hosting_get_features($refresh);
     foreach ($features as $feature => $info) {
       if ($info['node']) {
-        $types[] = $info['node'];
+        $types[$feature] = $info['node'];
       }
     }
   }
Index: hosting.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/hosting.info,v
retrieving revision 1.10
diff -u -r1.10 hosting.info
--- hosting.info	17 Feb 2009 15:46:42 -0000	1.10
+++ hosting.info	27 May 2009 05:01:20 -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-contrib/contributions/modules/hosting/hosting.module,v
retrieving revision 1.102
diff -u -r1.102 hosting.module
--- hosting.module	13 May 2009 18:17:13 -0000	1.102
+++ hosting.module	27 May 2009 05:01:21 -0000
@@ -1,5 +1,26 @@
 <?php
 // $Id: hosting.module,v 1.102 2009/05/13 18:17:13 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,113 +33,100 @@
  */
 
 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) {
- 
-    $items[] = array(
-      'path' => 'hosting/disabled',
-      'title' => t('Site disabled'),
-      'callback' => 'hosting_disabled_site',
-      'access' => TRUE,
-      'type' => MENU_CALLBACK
-    );
 
- 
-    $items[] = array(
-      'path' => 'hosting/maintenance',
-      'title' => t('Site maintenance'),
-      'callback' => 'hosting_site_maintenance',
-      'access' => TRUE,
-      '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',
-      'type' => MENU_CALLBACK
-    );
+  $items['hosting/disabled'] = array(
+    'title' => 'Site disabled',
+    'page callback' => 'hosting_disabled_site',
+    'access arguments' => array('access content'),
+    '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'),
-      'type' => MENU_NORMAL_ITEM
-    );
+  $items['hosting/maintenance'] = array(
+    'title' => 'Site maintenance',
+    'page callback' => 'hosting_site_maintenance',
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK
+  );
 
-    $items[] = array(
-      'path' => 'admin/hosting/features',
-      'title' => t('Features'),
-      'description' => t('Configure the exposed functionality of the Hosting system'),
-      'weight' => -100,
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('hosting_features_form'),
-      'type' => MENU_DEFAULT_LOCAL_TASK,
-      'access' => user_access('administer hosting features'),
-    );
+  
+  $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/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'),
-      'type' => MENU_LOCAL_TASK,
-      'access' => user_access('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'),
-      'type' => MENU_ITEM_GROUPING,
-      'weight' => 1);
-   
-    // Queue page & task lists
-    
-    $items[] = array(
-       'path' => 'hosting/queues',
-       'callback' => 'hosting_queues',
-       'type' => MENU_CALLBACK,
-       'access' => user_access('access task logs')
-      );
-    // Disable unsupported features.
-    $features = hosting_get_features();
-    $types = node_get_types();
-    foreach ($features as $type => $feature) {
-      if (isset($feature['node'])) {
-        $type_url_str = str_replace('_', '-', $feature['node']);
-        
-        $items[] = array(
-          'path' => 'node/add/'. $type_url_str,
-          'title' => drupal_ucfirst($types[$feature['node']]->name),
-          'access' => (($user->uid == 1) || user_access('create ' . $feature['node'])) && (hosting_feature($type) != HOSTING_FEATURE_DISABLED),
-        ); 
-      }
-    }
 
-  } else {
-    drupal_add_css(drupal_get_path('module', 'hosting') . '/hosting.css');
-  }
+  $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['admin/hosting/features'] = array(
+    'title' => 'Features',
+    'description' => 'Configure the exposed functionality of the Hosting system',
+    'weight' => -100,
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('hosting_features_form'),
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'access arguments' => array('administer hosting features'),
+  );
+
+  $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 arguments' => array('administer hosting queues'),
+  );
+
+  
+  $items['hosting/queues'] = array(
+     'page callback' => 'hosting_queues',
+     'type' => MENU_CALLBACK,
+     'access arguments' => array('access task logs')
+   );
+
   return $items;
 }
 
+function hosting_menu_alter(&$items) {
+  $items['node/add']['page callback'] = '_hosting_node_add';
+
+  $types = hosting_feature_node_types(TRUE);
+  foreach ($types as $feature => $type) {
+    $path = sprintf('node/add/%s', str_replace('_', '-', $type));
+    $items[$path]['access callback'] = 'hosting_menu_access';
+    $items[$path]['access arguments'] = array($type, $feature);
+  }
+  
+  // These node types should remain hidden, and provide no user interface.
+  unset($items['node/add/package']);
+  unset($items['node/add/task']);
+}
+
+function hosting_menu_access($type, $feature) {
+  global $user;
+  return  (($user->uid == 1) || user_access('create ' . $type)) && (hosting_feature($feature) != HOSTING_FEATURE_DISABLED);
+}
+
 function hosting_disabled_site($url) {
   drupal_set_breadcrumb(array());
   return t("!url has been disabled by the site administrators", array('!url' => $url));
@@ -184,6 +192,9 @@
   define('HOSTING_DEFAULT_BACKUP_PATH', HOSTING_DEFAULT_PARENT_PATH . '/backups');
   define('HOSTING_DEFAULT_CONFIG_PATH', HOSTING_DEFAULT_PARENT_PATH .'/config');
   define('HOSTING_DEFAULT_VHOST_PATH', HOSTING_DEFAULT_CONFIG_PATH .'/vhost.d');
+ 
+  // moved from hook_menu()
+  drupal_add_css(drupal_get_path('module', 'hosting') . '/hosting.css');
 }
 
 
@@ -273,10 +284,6 @@
         $disp[] = $title . ": " . $info[$key]; 
       }
       $output .= theme('item_list', $disp, $info['name']);
-      /* to print all stats of the queue... */
-      #$lambda = create_function('$k,$v', 'return "$k: $v";');
-      #$output .= theme('item_list', array_map($lambda, array_keys($info), $info), $info['name']);
-    
     }
     return $output;
   }
@@ -432,7 +439,7 @@
       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;
       }
@@ -594,13 +601,13 @@
   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-contrib/contributions/modules/hosting/hosting.wizard.inc,v
retrieving revision 1.32
diff -u -r1.32 hosting.wizard.inc
--- hosting.wizard.inc	20 May 2009 20:59:19 -0000	1.32
+++ hosting.wizard.inc	27 May 2009 05:01:22 -0000
@@ -74,18 +74,17 @@
  * 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['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')) {
+  if (sprintf("%s/%s", arg(0), arg(1)) == 'hosting/wizard') {
     hosting_wizard_dummy_theme_block();
     $steps = hosting_wizard_steps();
     $x = 1;
@@ -95,17 +94,17 @@
         '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' => array($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 @@
 /**
  * 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 @@
 /**
  * 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 @@
  * @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 @@
 /**
  * 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 @@
  * @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 @@
   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 @@
 /**
  * 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 @@
  * 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 @@
 /**
  * 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 @@
   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 @@
   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 == HOSTING_TASK_SUCCESS)) {
     drupal_goto('/hosting/wizard/hosting/verify');
@@ -476,13 +478,14 @@
 }
 
 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 @@
   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 @@
  *
  * 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-contrib/contributions/modules/hosting/hosting_help.inc,v
retrieving revision 1.28
diff -u -r1.28 hosting_help.inc
--- hosting_help.inc	22 Feb 2009 02:19:26 -0000	1.28
+++ hosting_help.inc	27 May 2009 05:01:23 -0000
@@ -83,8 +83,8 @@
 /**
  * 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 @@
       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-contrib/contributions/modules/hosting/alias/hosting_alias.info,v
retrieving revision 1.1
diff -u -r1.1 hosting_alias.info
--- alias/hosting_alias.info	30 Oct 2008 15:20:09 -0000	1.1
+++ alias/hosting_alias.info	27 May 2009 05:01:23 -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-contrib/contributions/modules/hosting/alias/hosting_alias.install,v
retrieving revision 1.3
diff -u -r1.3 hosting_alias.install
--- alias/hosting_alias.install	24 Nov 2008 18:55:09 -0000	1.3
+++ alias/hosting_alias.install	27 May 2009 05:01:23 -0000
@@ -1,22 +1,52 @@
 <?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' => array('vid'),
+      'alias' => array('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-contrib/contributions/modules/hosting/alias/hosting_alias.module,v
retrieving revision 1.9
diff -u -r1.9 hosting_alias.module
--- alias/hosting_alias.module	17 Apr 2009 20:51:24 -0000	1.9
+++ alias/hosting_alias.module	27 May 2009 05:01:23 -0000
@@ -6,20 +6,19 @@
 /**
  * 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 @@
  * 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.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/client/hosting_client.info,v
retrieving revision 1.1
diff -u -r1.1 hosting_client.info
--- client/hosting_client.info	2 Jun 2008 18:59:11 -0000	1.1
+++ client/hosting_client.info	27 May 2009 05:01:23 -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-contrib/contributions/modules/hosting/client/hosting_client.install,v
retrieving revision 1.10
diff -u -r1.10 hosting_client.install
--- client/hosting_client.install	14 May 2009 04:12:52 -0000	1.10
+++ client/hosting_client.install	27 May 2009 05:01:24 -0000
@@ -1,29 +1,73 @@
 <?php
 // $Id: hosting_client.install,v 1.10 2009/05/14 04:12:52 anarcat 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',
-         contact_type longtext NOT NULL,
-         PRIMARY KEY (user, client)
-       ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
-      db_query("INSERT INTO {hosting_client_user} VALUES (1, 1, 'admin')");
-      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,
+      ),
+      'contact_type' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE,
+      ),
+    ),
+    '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-contrib/contributions/modules/hosting/client/hosting_client.module,v
retrieving revision 1.44
diff -u -r1.44 hosting_client.module
--- client/hosting_client.module	24 May 2009 20:14:52 -0000	1.44
+++ client/hosting_client.module	27 May 2009 05:01:24 -0000
@@ -37,30 +37,30 @@
   return array('create client','view client', 'edit own client', 'delete own client', 'administer clients', 'edit 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') && db_fetch_array(db_query("SELECT user FROM {hosting_client_user} WHERE user=%d and client=%d", $user->uid, $node->nid));
+        return user_access('view client', $account) && db_fetch_array(db_query("SELECT user FROM {hosting_client_user} WHERE user=%d and client=%d", $user->uid, $node->nid));
       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;
@@ -266,13 +266,22 @@
       '!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);
   }
 }
 
@@ -414,49 +423,48 @@
 /**
  * Implementation of hook_menu()
  */
-function hosting_client_menu($may_cache) {
-  if (!$may_cache) {
+function hosting_client_menu() {
+/* TODO
+
     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, 
-      'type' => MENU_CALLBACK
-    );
+*/
+  $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') && hosting_feature('client'),
-      'type' => MENU_LOCAL_TASK
-    );
-  }
+  $items['admin/hosting/client'] = array(
+    'title' => 'Clients',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => 'hosting_client_configure', 
+    'access callback' => '_hosting_client_configure_access',
+    'type' => MENU_LOCAL_TASK
+  );
   return $items;
 }
 
+function _hosting_client_configure_access() {
+  return user_access('administer clients') && hosting_feature('client');
+}
 
 function _hosting_client_mail_text($messageid, $variables = array()) {
   // Check if an admin setting overrides the default string.
Index: cron/hosting_cron.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/cron/hosting_cron.info,v
retrieving revision 1.1
diff -u -r1.1 hosting_cron.info
--- cron/hosting_cron.info	13 Feb 2008 00:25:35 -0000	1.1
+++ cron/hosting_cron.info	27 May 2009 05:01:24 -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-contrib/contributions/modules/hosting/db_server/hosting_db_server.info,v
retrieving revision 1.1
diff -u -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	27 May 2009 05:01:24 -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-contrib/contributions/modules/hosting/db_server/hosting_db_server.install,v
retrieving revision 1.2
diff -u -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	27 May 2009 05:01:24 -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-contrib/contributions/modules/hosting/db_server/hosting_db_server.module,v
retrieving revision 1.31
diff -u -r1.31 hosting_db_server.module
--- db_server/hosting_db_server.module	18 May 2009 01:08:21 -0000	1.31
+++ db_server/hosting_db_server.module	27 May 2009 05:01:25 -0000
@@ -82,24 +82,24 @@
   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);
 }
 
 /**
@@ -155,16 +155,19 @@
 }
 
 /**
- * Implementation of hook_submit().
-  */
-function hosting_db_server_submit(&$node) {
-  if (empty($node->db_passwd) && $node->nid) {
-    $old = node_load($node->nid);
-    $node->db_passwd = $old->db_passwd;
+ * Implementation hook_nodeapi().
+ */
+function hosting_db_server_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
+  switch ($op) {
+    case 'presave':
+      if (empty($node->db_passwd) && $node->nid) {
+        $old = node_load($node->nid);
+        $node->db_passwd = $old->db_passwd;
+      }
+      break;
   }
 }
 
-
 /**
  * Implementation of hook_insert().
  */
Index: migrate/hosting_migrate.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/migrate/hosting_migrate.info,v
retrieving revision 1.1
diff -u -r1.1 hosting_migrate.info
--- migrate/hosting_migrate.info	11 Feb 2009 19:26:58 -0000	1.1
+++ migrate/hosting_migrate.info	27 May 2009 05:01:25 -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-contrib/contributions/modules/hosting/migrate/hosting_migrate.module,v
retrieving revision 1.13
diff -u -r1.13 hosting_migrate.module
--- migrate/hosting_migrate.module	29 Apr 2009 17:48:25 -0000	1.13
+++ migrate/hosting_migrate.module	27 May 2009 05:01:25 -0000
@@ -87,11 +87,11 @@
   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-contrib/contributions/modules/hosting/package/hosting_package.info,v
retrieving revision 1.1
diff -u -r1.1 hosting_package.info
--- package/hosting_package.info	2 Jun 2008 18:59:12 -0000	1.1
+++ package/hosting_package.info	27 May 2009 05:01:25 -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-contrib/contributions/modules/hosting/package/hosting_package.install,v
retrieving revision 1.9
diff -u -r1.9 hosting_package.install
--- package/hosting_package.install	31 Mar 2009 18:58:17 -0000	1.9
+++ package/hosting_package.install	27 May 2009 05:01:25 -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-contrib/contributions/modules/hosting/package/hosting_package.module,v
retrieving revision 1.36
diff -u -r1.36 hosting_package.module
--- package/hosting_package.module	17 Apr 2009 19:57:45 -0000	1.36
+++ package/hosting_package.module	27 May 2009 05:01:26 -0000
@@ -26,63 +26,68 @@
   return $types;
 }
 
-function hosting_package_menu($may_cache) {
+function hosting_package_menu() {
   $items = array();
-  
-  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)),
-          'type' => MENU_LOCAL_TASK,
-          'access' => user_access('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)),
-          'type' => MENU_DEFAULT_LOCAL_TASK,
-          'weight' => -1, 
-        );
-        foreach (_hosting_package_types() as $type => $description) {
-          $items[] = array(
-            'path' => 'node/' . arg(1) . '/packages/' . $type,
-            'title' => $description,
-            'description' => $description,
-            'callback' => 'hosting_package_list',
-            'callback arguments' => array(arg(1), $type),
-            'type' => MENU_LOCAL_TASK,
-            'weight' => $x++, 
-          );           
-        }
-      }
-     }
+
+
+ 
+  $items['node/%hosting_package_node/packages'] = array(
+    'title' => 'Packages',
+    'description' => 'List of packages available for this platform',
+    'page callback' => 'hosting_package_list',
+    'page arguments' => array(1),
+    'type' => MENU_LOCAL_TASK,
+    'access arguments' => array('view package'),
+    'weight' => 1, 
+  );
+  $items['node/%hosting_package_node/packages/all'] = array(
+    'title' => 'All packages',
+    'description' => 'List of all packages',
+    'page callback' => 'hosting_package_list',
+    'page arguments' => array(1),
+    'access arguments' => array('view package'),
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'weight' => -1, 
+  );
+  foreach (_hosting_package_types() as $type => $description) {
+    $items['node/%hosting_package_node/packages/' . $type] = array(
+      'title' => $description,
+      'description' => $description,
+      'page callback' => 'hosting_package_list',
+      'page arguments' => array(1, $type),
+      'access arguments' => array('view package'),
+      'type' => MENU_LOCAL_TASK,
+      'weight' => $x++, 
+    );           
   }
   return $items;
 }
 
+function hosting_package_node_load($arg) {
+ if (!is_numeric($arg)) {
+    return FALSE;
+  }
+  if ($node = node_load($arg)) {
+    if (in_array($node->type, array('site', 'platform'))) {
+      return $node;
+    }
+  }
+  return FALSE;
+}
 
-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;
@@ -260,7 +265,7 @@
 
 function _hosting_language_name($language) {
   include_once './includes/locale.inc';
-  $locales = _locale_get_iso639_list();
+  $locales = _locale_get_predefined_list();
   return $locales[$language][0] . (isset($locales[$language][1]) ? ' '. t('(@language)', array('@language' => $locales[$language][1])) : '');
 }
 
@@ -319,17 +324,15 @@
  * @TODO Add ability to filter by additional fields
  * @TODO Add paging.
  */
-function hosting_package_list($rid, $type = null) {
-  $ref = node_load($rid);
+function hosting_package_list($ref, $type = null) {
   drupal_set_title(t('Packages on @reference', array('@reference' => $ref->title)));
-
   $header = array(
     array('data' => t('Status'), 'field' => 'status', 'sort' => 'DESC'),
     array('data' => t('Package'), 'field' => 'short_name'),
     array('data' => t('Release'), 'field' => 'version'),
     array('data' => t('Package type'), 'field' => 'package_type'),
     );
-  $args[] = $rid;
+  $args[] = $ref->nid;
 
   if (!is_null($type)) {
     $cond = " AND n.package_type = '%s'";
@@ -339,12 +342,11 @@
   $sql = "SELECT n.nid as 'package', i.status, n.short_name, i.version, n.package_type, i.status FROM {hosting_package} n
     LEFT JOIN {hosting_package_instance} i ON i.package_id=n.nid WHERE i.rid=%d" . $cond;
   $sql .= tablesort_sql($header);
-
   // @TODO hide deleted sites
   $result = pager_query(db_rewrite_sql($sql), 25, 2, null, $args);
   $view_package_perm = user_access('view package');
 
-  if (!db_num_rows($result)) {
+  if (!$result) {
     return t('No packages are associated with @reference', array('@reference' => $ref->title));
   }
   $rows = array();
@@ -357,7 +359,7 @@
     $row[] = filter_xss($package->package_type);
     $rows[] = array('data' => $row, 'class' => $row_class);
   }
-  
+
   return theme('table',  $header, $rows, array('class' => 'hosting-table')) . theme('pager', null, 25, 2);
 }
 
Index: platform/hosting_platform.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/platform/hosting_platform.info,v
retrieving revision 1.1
diff -u -r1.1 hosting_platform.info
--- platform/hosting_platform.info	2 Jun 2008 18:59:12 -0000	1.1
+++ platform/hosting_platform.info	27 May 2009 05:01:26 -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-contrib/contributions/modules/hosting/platform/hosting_platform.install,v
retrieving revision 1.3
diff -u -r1.3 hosting_platform.install
--- platform/hosting_platform.install	14 Nov 2008 15:39:14 -0000	1.3
+++ platform/hosting_platform.install	27 May 2009 05:01:26 -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-contrib/contributions/modules/hosting/platform/hosting_platform.module,v
retrieving revision 1.51
diff -u -r1.51 hosting_platform.module
--- platform/hosting_platform.module	7 Apr 2009 00:29:53 -0000	1.51
+++ platform/hosting_platform.module	27 May 2009 05:01:26 -0000
@@ -18,9 +18,9 @@
 /**
  * Implementation of hook_hosting_tasks
  */
-function hosting_platform_hosting_tasks($node) {
+function hosting_platform_hosting_tasks($type) {
   $options = array();
-  if (($node->type == 'platform') & !hosting_task_outstanding($node->nid, 'verify')) {
+  if ($type == 'platform') {
     $options['verify'] = array(
       'title' => t('Verify'),
       'description' => t('Verify that the platform is correctly installed and working.'),
@@ -45,20 +45,20 @@
   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-contrib/contributions/modules/hosting/signup/hosting_signup.info,v
retrieving revision 1.2
diff -u -r1.2 hosting_signup.info
--- signup/hosting_signup.info	7 Nov 2008 10:19:24 -0000	1.2
+++ signup/hosting_signup.info	27 May 2009 05:01:26 -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-contrib/contributions/modules/hosting/signup/hosting_signup.module,v
retrieving revision 1.16
diff -u -r1.16 hosting_signup.module
--- signup/hosting_signup.module	4 May 2009 16:44:31 -0000	1.16
+++ signup/hosting_signup.module	27 May 2009 05:01:27 -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 @@
 /**
  * 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 @@
      );
   }
   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 @@
  *
  * 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,11 +266,12 @@
  *
  * 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']);
     drupal_goto($path);
@@ -320,13 +345,13 @@
  * 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 @@
  * 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-contrib/contributions/modules/hosting/site/hosting_site.info,v
retrieving revision 1.2
diff -u -r1.2 hosting_site.info
--- site/hosting_site.info	12 Jun 2008 03:24:45 -0000	1.2
+++ site/hosting_site.info	27 May 2009 05:01:27 -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-contrib/contributions/modules/hosting/site/hosting_site.install,v
retrieving revision 1.6
diff -u -r1.6 hosting_site.install
--- site/hosting_site.install	3 Apr 2009 16:30:33 -0000	1.6
+++ site/hosting_site.install	27 May 2009 05:01:27 -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-contrib/contributions/modules/hosting/site/hosting_site.module,v
retrieving revision 1.104
diff -u -r1.104 hosting_site.module
--- site/hosting_site.module	20 May 2009 19:36:24 -0000	1.104
+++ site/hosting_site.module	27 May 2009 05:01:28 -0000
@@ -22,53 +22,46 @@
 /**
  * implementation of hook_hosting_tasks
  */
-function hosting_site_hosting_tasks($node) {
+function hosting_site_hosting_tasks($type, $task = null) {
   $options = array();
-  if ($node->type == 'site') {
-    if (hosting_task_outstanding($node->nid, 'delete') || ($node->site_status ==  HOSTING_SITE_DELETED)) {
-      return $options;
-    }
-    if (hosting_task_outstanding($node->nid, 'enable') || ($node->site_status == HOSTING_SITE_ENABLED)) {
-      $options['backup'] = array(
-        'title' => t('Backup'),
-        'description' => t('Generate a backup of this site that can be restored to at any time'),
-        'weight' => 7
-       );
-
-      $options['restore'] = array(
-        'title' => t('Restore'),
-        'description' => t('Restore this site to a previous backup. A new backup will be created before this is attempted.'),
-        'weight' => 7,
-      );
-
-      $options['verify'] = array(
-        'title' => t('Verify'),
-        'description' => t('Confirm that the site has been correctly installed and regenerate all configuration files to match the hosting front end.'),
-        'weight' =>  9,
-      );
+  if ($type == 'site') {
+    $options['backup'] = array(
+      'title' => t('Backup'),
+      'description' => t('Generate a backup of this site that can be restored to at any time'),
+      'weight' => 7
+     );
 
-      $options['disable'] = array(
-        'title' =>  t('Disable'),
-        'description' =>  t('Disabling this site will stop it from being accessible.
-             It can be enabled again later.'),     
-        'weight' =>  4,
-      );     
-    }
-    else {
-      $options['enable'] = array(
-        'title' => t('Enable'),
-        'description' => t('Enabling this site will allow it to be accesible again.
-             It may be disabled again if needed.'),
-        'weight' =>  4,     
-      );
-      $options['delete'] = array(
-        'title' => t('Delete'),
-        'description' => t('Deleting this site will completely remove it from the hosting system,
-            but will keep the last backup available. This process can not be undone.
-            Are you really sure you want to delete this site?'),
-        'weight' => 10,
-      );
-    }
+    $options['restore'] = array(
+      'title' => t('Restore'),
+      'description' => t('Restore this site to a previous backup. A new backup will be created before this is attempted.'),
+      'weight' => 7,
+    );
+
+    $options['verify'] = array(
+      'title' => t('Verify'),
+      'description' => t('Confirm that the site has been correctly installed and regenerate all configuration files to match the hosting front end.'),
+      'weight' =>  9,
+    );
+
+    $options['disable'] = array(
+      'title' =>  t('Disable'),
+      'description' =>  t('Disabling this site will stop it from being accessible.
+           It can be enabled again later.'),     
+      'weight' =>  4,
+    );     
+    $options['enable'] = array(
+      'title' => t('Enable'),
+      'description' => t('Enabling this site will allow it to be accesible again.
+           It may be disabled again if needed.'),
+      'weight' =>  4,     
+    );
+    $options['delete'] = array(
+      'title' => t('Delete'),
+      'description' => t('Deleting this site will completely remove it from the hosting system,
+          but will keep the last backup available. This process can not be undone.
+          Are you really sure you want to delete this site?'),
+      'weight' => 10,
+    );
   }
   return $options;
 }
@@ -83,16 +76,16 @@
 /**
  * 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;
@@ -374,8 +367,15 @@
 
 }
 
-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) {
@@ -416,7 +416,6 @@
   return $additions;
 }
 
-
 function hosting_nodeapi_site_delete_revision(&$node) {
   db_query('DELETE FROM {hosting_site} WHERE vid = %d', $node->vid);
 }
@@ -566,7 +565,7 @@
 /**
  * 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';
@@ -636,13 +635,13 @@
     $header[] = array('data' => t('Platform'), 'field' => 'platform');
   }
 
-  $sql = "SELECT n.nid, n.title, n.created, s.status as site_status, profile, language, platform, verified FROM {node} n left join {hosting_site} s ON n.vid=s.vid WHERE type='%s' AND s.status != -2 " . $cond;
+  $sql = "SELECT n.nid, n.title, n.created, s.status as site_status, profile, s.language, platform, verified FROM {node} n left join {hosting_site} s ON n.vid=s.vid WHERE type='%s' AND s.status != -2 " . $cond;
   $sql .= tablesort_sql($header);
 
   // @TODO hide deleted sites
   $result = pager_query(db_rewrite_sql($sql), 25, 1, null, $args);
 
-  if (!db_num_rows($result)) {
+  if (!$result) {
     return null;
   }
   $rows = array();
@@ -687,21 +686,21 @@
     '!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;
@@ -758,11 +757,13 @@
   $form[$element] = call_user_func('_hosting_site_form_'. $element, $value, $value2);
 
   $GLOBALS['devel_shutdown'] = FALSE;
+  $form_state = array();
+  $built = form_builder('hosting-site-form', $form, $form_state);
   print drupal_to_js(
     array(
       'status' => 'TRUE',
       'type' => $form[$element]['#type'],
-      'data' => drupal_render(form_builder('hosting-site-form', $form)),
+      'data' => drupal_render($built),
     )
   );
   exit();
Index: task/hosting_task.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/task/hosting_task.info,v
retrieving revision 1.1
diff -u -r1.1 hosting_task.info
--- task/hosting_task.info	19 Jun 2008 21:17:31 -0000	1.1
+++ task/hosting_task.info	27 May 2009 05:01:28 -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-contrib/contributions/modules/hosting/task/hosting_task.install,v
retrieving revision 1.5
diff -u -r1.5 hosting_task.install
--- task/hosting_task.install	1 Apr 2009 13:25:45 -0000	1.5
+++ task/hosting_task.install	27 May 2009 05:01:28 -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-contrib/contributions/modules/hosting/task/hosting_task.module,v
retrieving revision 1.63
diff -u -r1.63 hosting_task.module
--- task/hosting_task.module	20 May 2009 21:24:29 -0000	1.63
+++ task/hosting_task.module	27 May 2009 05:01:29 -0000
@@ -6,29 +6,58 @@
 /**
  * Implementation of hook_menu().
  */
-function hosting_task_menu($may_cache) {
+function hosting_task_menu() {
   $items = array();
-  
-  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,
-            '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'),
-            'type' => MENU_LOCAL_TASK,
-            'weight' => ($task['weight']) ? $task['weight'] : 0, 
-          );
-        }
+  foreach (node_get_types() as $node_type) {
+    $type = $node_type->type;
+    foreach (hosting_available_tasks($type) as $task => $info) {
+      $path = sprintf("node/%%hosting_task_%s/%s_%s", $type, $type, $task);
+      $items[$path] = array(
+         'title' => $info['title'],
+         'description' => $info['description'],
+         'page callback' => 'drupal_get_form',
+         'page arguments' => array('hosting_task_confirm_form', 1, $task),
+         'access callback' => 'hosting_task_menu_access',
+         'access arguments' => array(1, $task),
+         'type' => MENU_LOCAL_TASK,
+         'weight' => ($info['weight']) ? $info['weight'] : 0, 
+       );
      }
   }
   return $items;
 }
 
+function hosting_task_menu_access($node, $task) {
+  if (user_access("create " . $task . " node")) {
+    return TRUE;
+  }
+  return FALSE;
+}
+
+function hosting_task_site_load($arg) {
+ if (!is_numeric($arg)) {
+    return FALSE;
+  }
+  if ($node = node_load($arg)) {
+    if ($node->type == 'site') {
+      return $node;
+    }
+  }
+  return FALSE;
+}
+
+function hosting_task_platform_load($arg) {
+ if (!is_numeric($arg)) {
+    return FALSE;
+  }
+  if ($node = node_load($arg)) {
+    if ($node->type == 'platform') {
+      return $node;
+    }
+  }
+  return FALSE;
+}
+
 function hosting_task_node_info() {
   #management
   $types["task"] =  array(
@@ -41,8 +70,8 @@
   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;
   }
 }
@@ -108,8 +137,8 @@
 /**
  * Implementation of hook_form().
  */
-function hosting_task_confirm_form(&$node, $task) {
-  $tasks = hosting_available_tasks($node);
+function hosting_task_confirm_form($form_state, &$node, $task) {
+  $tasks = hosting_available_tasks($node->type);
   $form['help'] = array('#value' => $tasks[$task]['description']); 
   $form['nid'] = array('#type' => 'value', '#value' => $node->nid);
   $form['task'] = array('#type' => 'value', '#value' => $task); 
@@ -120,7 +149,9 @@
   }
   $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 +178,10 @@
 }
 
 
-function hosting_task_confirm_form_submit($form_id, $values) {
+function hosting_task_confirm_form_submit($form, &$form_state) {
+  $values = $form_state['values'];
   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) {
@@ -258,7 +290,7 @@
 function hosting_task_load($node) {
   $additions = db_fetch_object(db_query('SELECT task_type, executed, task_status, rid, q.status as queued FROM {hosting_task} t LEFT JOIN {hosting_task_queue} q ON t.nid=q.nid WHERE vid = %d', $node->vid));
   $result = db_query("SELECT name, value FROM {hosting_task_arguments} WHERE vid=%d", $node->vid);
-  if (db_num_rows($result)) {
+  if ($result) {
     while ($arg = db_fetch_object($result)) {
       $additions->task_args[$arg->name] = $arg->value;
     }
@@ -280,8 +312,8 @@
   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']);
 }
 
 /**
@@ -364,7 +396,7 @@
  */ 
 function _hosting_task_log_table($vid) {
   $result = db_query("SELECT * FROM {hosting_task_log} WHERE vid=%d", $vid);
-  if (db_num_rows($result)) {
+  if ($result) {
     $header = array('data' => 'Log message');
     while ($entry = db_fetch_object($result)) {
       if (strlen($entry->message) > 300) {
Index: web_server/hosting_web_server.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/web_server/hosting_web_server.info,v
retrieving revision 1.1
diff -u -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	27 May 2009 05:01:29 -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-contrib/contributions/modules/hosting/web_server/hosting_web_server.install,v
retrieving revision 1.3
diff -u -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	27 May 2009 05:01:30 -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-contrib/contributions/modules/hosting/web_server/hosting_web_server.module,v
retrieving revision 1.33
diff -u -r1.33 hosting_web_server.module
--- web_server/hosting_web_server.module	14 May 2009 05:14:03 -0000	1.33
+++ web_server/hosting_web_server.module	27 May 2009 05:01:41 -0000
@@ -10,8 +10,8 @@
 /**
  * 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 @@
   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;
@@ -261,37 +261,44 @@
   return $form;
 }
 
-/**
- * Implementation of hook_validate().
-  */
-function hosting_web_server_validate(&$node, &$form) {
-  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.'));
-  }
+function hosting_nodeapi_web_server_presave(&$node) {
+
   if (!$node->ip_address) {
-    if (!_hosting_valid_fqdn($node->title)) {
-      form_set_error('title', t('Invalid valid domain name. Either choose a proper domain name or hardcode the IP address of the webserver.'));
-    }
     $ip = gethostbyname($node->title);
+
     // setup IP only if resolution succeeded
     if ($ip != $node->title) {
-      form_set_value($form['ip_address'], $ip);
       $node->ip_address = $ip; // required to fool the ip check below
       drupal_set_message(t('Initialized the webserver IP to %ip based on hostname %name', array('%ip' => $ip, '%name' => $node->title)), 'message');
     } else {
       form_set_error('title', t('Could not resolve IP address of webserver %name. Either set the web server name to a FQDN (Fully Qualified Domain Name) or hardcode the IP here.', array('%name' => $node->title)));
     }
   }
-  if (!_hosting_valid_ip($node->ip_address)) {
-    form_set_error('ip_address', t('Invalid IP address'));
-  }
 
 }
 
 /**
+ * Implementation of hook_validate().
+  */
+function hosting_web_server_validate(&$node, &$form) {
+  if (!_hosting_valid_fqdn($node->title)) {
+    form_set_error('title', t('Invalid valid domain name. Either choose a proper domain name or hardcode the IP address of the webserver.'));
+  }
+  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.'));
+  }
+  if ($node->ip_address) {
+    if (!_hosting_valid_ip($node->ip_address)) {
+      form_set_error('ip_address', t('Invalid IP address'));
+    }
+  }
+}
+
+/**
  * Implementation of hook_insert().
  */
 function hosting_web_server_insert($node) {
+  print_r($form);
   db_query("INSERT INTO {hosting_web_server} (vid, nid, ip_address, script_user, web_group, config_path, backup_path, restart_cmd, drush_path) 
       VALUES (%d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s')", 
         $node->vid, $node->nid, $node->ip_address, $node->script_user, $node->web_group, $node->config_path, $node->backup_path, $node->restart_cmd, $node->drush_path);
@@ -342,6 +349,8 @@
 }
 
 /**
+ *
+/**
  * Implementation of hook_view().
  */
 function hosting_web_server_view($node, $teaser = FALSE, $page = FALSE) {
