Index: client/hosting_client.access.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/client/hosting_client.access.inc,v
retrieving revision 1.13
diff -u -p -r1.13 hosting_client.access.inc
--- client/hosting_client.access.inc	24 May 2009 19:43:53 -0000	1.13
+++ client/hosting_client.access.inc	15 Oct 2009 15:17:18 -0000
@@ -32,7 +32,7 @@ function hosting_client_user($op, &$edit
     break;
 
   case 'delete':
-    db_query('DELETE FROM {hosting_client_user} WHERE user = %d', $user->uid);
+    db_query('DELETE FROM {hosting_client_user} WHERE uid = %d', $user->uid);
   }
 }
 
@@ -112,12 +112,12 @@ function hosting_client_user_form_valida
 function hosting_client_user_form_submit($edit, $user) {
   if (array_key_exists('clients', $edit)) {
     foreach ($edit['clients'] as $client) {
-      $query = db_query('DELETE FROM {hosting_client_user} WHERE user = %d AND client = %d', $user->uid, $client);
+      $query = db_query('DELETE FROM {hosting_client_user} WHERE uid = %d AND client = %d', $user->uid, $client);
     }
   }
   if (array_key_exists('hosting_client', $edit) && $edit['hosting_client']) {
     $client = hosting_get_client($edit['hosting_client']);
-    $query = db_query('INSERT INTO {hosting_client_user} (client, user, contact_type) VALUES (%d, %d, "%s")', $client->nid, $user->uid, '');
+    $query = db_query('INSERT INTO {hosting_client_user} (client, uid, contact_type) VALUES (%d, %d, "%s")', $client->nid, $user->uid, '');
   }
 }
 
@@ -225,7 +225,7 @@ function hosting_client_node_access_reco
  */
 function hosting_get_client_from_user($uid) {
   $clients = array();
-  if ($results = db_query("SELECT client, contact_type FROM {hosting_client_user} WHERE user=%d", $uid)) {
+  if ($results = db_query("SELECT client, contact_type FROM {hosting_client_user} WHERE uid=%d", $uid)) {
     while ($result = db_fetch_array($results)) {
       $clients[$result['client']] = explode(',', $result['contact_type']);
     }
Index: client/hosting_client.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/client/hosting_client.install,v
retrieving revision 1.12
diff -u -p -r1.12 hosting_client.install
--- client/hosting_client.install	24 Jun 2009 15:47:55 -0000	1.12
+++ client/hosting_client.install	15 Oct 2009 15:17:18 -0000
@@ -41,7 +41,7 @@ function hosting_client_schema() {
 
   $schema['hosting_client_user'] = array(
     'fields' => array(
-      'user' => array(
+      'uid' => array(
         'type' => 'int',
         'unsigned' => TRUE,
         'not null' => TRUE,
@@ -59,7 +59,7 @@ function hosting_client_schema() {
         'not null' => TRUE,
       ),
     ),
-    'primary key' => array('user', 'client'),
+    'primary key' => array('uid', 'client'),
   );
 
   return $schema;
@@ -169,3 +169,19 @@ function hosting_client_update_7() {
   return array();
 }
 
+/**
+ *
+ */
+function hosting_client_update_6001() {
+  global $db_type;
+  $ret = array();
+
+  switch($db_type) {
+    case 'mysql':
+    case 'mysqli':
+      db_change_field($ret, 'hosting_client_user', 'user', 'uid', array('type' => 'int', 'not null' => TRUE, 'unsigned' => TRUE, 'default' => 0), array('primary key' => array('uid client')));
+      break;
+  }
+
+  return $ret;
+}
Index: client/hosting_client.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/client/hosting_client.module,v
retrieving revision 1.54
diff -u -p -r1.54 hosting_client.module
--- client/hosting_client.module	9 Oct 2009 04:43:36 -0000	1.54
+++ client/hosting_client.module	15 Oct 2009 15:17:19 -0000
@@ -66,7 +66,7 @@ function hosting_client_access($op, $nod
         return user_access('create client', $account);
         break;
       case 'view':
-        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));
+        return user_access('view client', $account) && db_fetch_array(db_query("SELECT uid FROM {hosting_client_user} WHERE uid=%d and client=%d", $user->uid, $node->nid));
       case 'update':
         if (user_access('edit own client', $account) && $account->uid == $node->uid) {
           return TRUE;
@@ -149,7 +149,7 @@ function hosting_client_form(&$node) {
 
   if ($node->nid) {
     // this should probably be factored out in a common function
-    $q = db_query("SELECT u.uid, u.name FROM {hosting_client_user} h INNER JOIN {users} u ON u.uid = h.user WHERE h.client = %d", $node->nid);
+    $q = db_query("SELECT u.uid, u.name FROM {hosting_client_user} h INNER JOIN {users} u ON u.uid = h.uid WHERE h.client = %d", $node->nid);
     while ($result = db_fetch_array($q)) {
       $form['user_edit']['name'][$result['uid']] = array('#type' => 'markup', '#value' => l($result['name'], 'user/' . $result['uid']));
       $users[$result['uid']] = '';
@@ -244,7 +244,7 @@ function hosting_client_insert($node) {
   }
   if ($node->new_user) {
     $user = user_load(array('name' => $node->new_user));
-    db_query('INSERT INTO {hosting_client_user} (client, user, contact_type) VALUES (%d, %d, "%s")', $node->nid, $user->uid, '');
+    db_query('INSERT INTO {hosting_client_user} (client, uid, contact_type) VALUES (%d, %d, "%s")', $node->nid, $user->uid, '');
   }
 }
 
@@ -316,12 +316,12 @@ function hosting_client_update($node) {
   hosting_client_set_title($node);  
   if ($node->users) {
     foreach ($node->users as $user) {
-      db_query('DELETE FROM {hosting_client_user} WHERE user = %d AND client = %d', $user, $node->nid);
+      db_query('DELETE FROM {hosting_client_user} WHERE uid = %d AND client = %d', $user, $node->nid);
     }
   }
   if ($node->new_user) {
     $user = user_load(array('name' => $node->new_user));
-    db_query('INSERT INTO {hosting_client_user} (client, user, contact_type) VALUES (%d, %d, "%s")', $node->nid, $user->uid, '');
+    db_query('INSERT INTO {hosting_client_user} (client, uid, contact_type) VALUES (%d, %d, "%s")', $node->nid, $user->uid, '');
   }
 }
 
@@ -382,7 +382,7 @@ function hosting_client_view($node, $tea
     );
 
     // this should probably be factored out in a common function
-    $q = db_query("SELECT u.uid, u.name FROM {hosting_client_user} h INNER JOIN {users} u ON u.uid = h.user WHERE h.client = %d", $node->nid);
+    $q = db_query("SELECT u.uid, u.name FROM {hosting_client_user} h INNER JOIN {users} u ON u.uid = h.uid WHERE h.client = %d", $node->nid);
     while ($result = db_fetch_array($q)) {
       if (user_access('view users') || ($result['uid'] == $GLOBALS['user']->uid)) {
         $rows[] = array(l($result['name'], 'user/' . $result['uid']));
Index: package/hosting_package.instance.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/package/hosting_package.instance.inc,v
retrieving revision 1.8
diff -u -p -r1.8 hosting_package.instance.inc
--- package/hosting_package.instance.inc	28 Sep 2009 15:32:02 -0000	1.8
+++ package/hosting_package.instance.inc	15 Oct 2009 15:17:19 -0000
@@ -81,7 +81,7 @@ function hosting_package_instance_create
    db_query("INSERT INTO {hosting_package_instance} (
       rid, package_id, filename,
       schema_version, version, version_code, status)
-      VALUES (%d, %d, '%s', %d, %f, '%s', %d)", 
+      VALUES (%d, %d, '%s', %d, '%s', %d, %d)", 
       $instance->rid, $instance->package_id, $instance->filename, 
       $instance->schema_version, $instance->version, $instance->version_code, $instance->status);
    $instance->iid = db_last_insert_id('hosting_package_instance', 'iid');
Index: package/hosting_package.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/package/hosting_package.module,v
retrieving revision 1.41
diff -u -p -r1.41 hosting_package.module
--- package/hosting_package.module	9 Oct 2009 15:25:23 -0000	1.41
+++ package/hosting_package.module	15 Oct 2009 15:17:20 -0000
@@ -339,7 +339,7 @@ function hosting_package_list($ref, $typ
     $args[] = $type;
   }
 
-  $sql = "SELECT h.nid as 'package', i.status, h.short_name, i.version, h.package_type, i.status FROM {hosting_package} h
+  $sql = "SELECT h.nid, i.status, h.short_name, i.version, h.package_type, i.status FROM {hosting_package} h
     LEFT JOIN {hosting_package_instance} i ON i.package_id=h.nid WHERE i.rid=%d" . $cond;
   $sql .= tablesort_sql($header);
   // @TODO hide deleted sites
@@ -354,7 +354,7 @@ function hosting_package_list($ref, $typ
     $row_class = ($package->status == 1) ? 'hosting-success' : 'hosting-info';
     $row = array();
     $row[] =  array('data' => ($package->status) ? t('Enabled') : t('Available') , 'class'=> 'hosting-status');
-    $row[] =  ($view_package_perm) ? l(filter_xss($package->short_name), 'node/' . $package->package) : $package->short_name;
+    $row[] =  ($view_package_perm) ? l(filter_xss($package->short_name), 'node/' . $package->nid) : $package->short_name;
     $row[] =  $package->version;
     $row[] = filter_xss($package->package_type);
     $rows[] = array('data' => $row, 'class' => $row_class);
Index: site/hosting_site.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/site/hosting_site.install,v
retrieving revision 1.13
diff -u -p -r1.13 hosting_site.install
--- site/hosting_site.install	26 Sep 2009 00:22:11 -0000	1.13
+++ site/hosting_site.install	15 Oct 2009 15:17:20 -0000
@@ -66,13 +66,15 @@ function hosting_site_schema() {
         'not null' => TRUE,
         'default' => 0,
       ),
-      'ssl' => array(
+      'ssl_toggle' => array(
         'type' => 'int',
         'not null' => TRUE,
+        'default' => 0,
       ),
       'ssl_redirect' => array(
         'type' => 'int',
         'not null' => TRUE,
+        'default' => 0,
       ),
     ),
     'primary key' => array('vid'),
@@ -233,3 +235,17 @@ function hosting_site_update_6003() {
   return $ret;
 }
 
+// remove sql incompatibility in frontend
+function hosting_site_update_6004() {
+  global $db_type;
+  $ret = array();
+
+  switch($db_type) {
+    case 'mysql':
+    case 'mysqli':
+      db_change_field($ret, 'hosting_site', '`ssl`', 'ssl_toggle', array('type' => 'int', 'not null' => TRUE, 'default' => 0));
+      break;
+  }
+
+  return $ret;
+}
Index: site/hosting_site.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/site/hosting_site.module,v
retrieving revision 1.133
diff -u -p -r1.133 hosting_site.module
--- site/hosting_site.module	10 Oct 2009 05:54:28 -0000	1.133
+++ site/hosting_site.module	15 Oct 2009 15:17:21 -0000
@@ -446,7 +446,7 @@ function hosting_site_insert(&$node) {
   $node->client = $client->nid;
   $node->site_language = ($node->site_language) ? $node->site_language : 'en';
 
-  db_query("INSERT INTO {hosting_site} (vid, nid, client, db_server, platform, profile, language, last_cron, status, verified, port, `ssl`, ssl_redirect) VALUES (%d, %d, %d, %d, %d, %d, '%s', %d, %d, %d, %d, %d, %d)",
+  db_query("INSERT INTO {hosting_site} (vid, nid, client, db_server, platform, profile, language, last_cron, status, verified, port, ssl_toggle, ssl_redirect) VALUES (%d, %d, %d, %d, %d, %d, '%s', %d, %d, %d, %d, %d, %d)",
            $node->vid, $node->nid, $node->client, $node->db_server, $node->platform, $node->profile, $node->site_language, $node->last_cron, $node->site_status, $node->verified, $node->port, $node->ssl, $node->ssl_redirect);
   if ((!$node->old_vid)) {
     if ($node->import) {
@@ -485,7 +485,7 @@ function hosting_site_update(&$node) {
   else {
     $client = hosting_get_client($node->client);
     $node->client = $client->nid;
-    db_query("UPDATE {hosting_site} SET client = %d, db_server = %d, platform = %d, last_cron = %d, status = %d, profile = %d, language = '%s', verified = %d, port = %d, `ssl` = %d, ssl_redirect = %d WHERE vid=%d",
+    db_query("UPDATE {hosting_site} SET client = %d, db_server = %d, platform = %d, last_cron = %d, status = %d, profile = %d, language = '%s', verified = %d, port = %d, ssl_toggle = %d, ssl_redirect = %d WHERE vid=%d",
              $node->client, $node->db_server, $node->platform, $node->last_cron, $node->site_status, $node->profile, $node->site_language, $node->verified, $node->port, $node->ssl, $node->ssl_redirect, $node->vid);
   }
   if (!$node->no_verify) {
@@ -497,7 +497,8 @@ function hosting_site_update(&$node) {
  * Implementation of hook_load().
  */
 function hosting_site_load($node) {
-  $additions = db_fetch_object(db_query('SELECT  client, db_server, platform, profile, language as site_language, last_cron, status AS site_status, verified, port, `ssl`, ssl_redirect FROM {hosting_site} WHERE vid = %d', $node->vid));
+  $additions = db_fetch_object(db_query('SELECT  client, db_server, platform, profile, language as site_language, last_cron, status AS site_status, verified, port, ssl_toggle, ssl_redirect FROM {hosting_site} WHERE vid = %d', $node->vid));
+  $additions->ssl = $additions->ssl_toggle; // a bit messy
   return $additions;
 }
 
