Index: platform/hosting_platform.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/platform/hosting_platform.drush.inc,v
retrieving revision 1.3
diff -u -r1.3 hosting_platform.drush.inc
--- platform/hosting_platform.drush.inc	20 May 2009 21:24:28 -0000	1.3
+++ platform/hosting_platform.drush.inc	9 Jul 2009 19:15:18 -0000
@@ -5,6 +5,7 @@
   $task =& drush_get_context('HOSTING_TASK');
   if ($task->ref->type == 'site') {
     $node = node_load($task->ref->platform);
+    $task->options['site_port'] = $task->ref->port;
   }
   elseif ($task->ref->type == 'platform') {
     $node = $task->ref;
Index: site/hosting_site.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/site/hosting_site.install,v
retrieving revision 1.8
diff -u -r1.8 hosting_site.install
--- site/hosting_site.install	28 May 2009 05:54:43 -0000	1.8
+++ site/hosting_site.install	9 Jul 2009 19:15:19 -0000
@@ -61,6 +61,11 @@
         'not null' => TRUE,
         'default' => 0,
       ),
+      'port' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
     ),
     'primary key' => array('vid'),
   );
@@ -188,3 +193,10 @@
 
   return $ret;
 }
+
+function hosting_site_update_6() {
+  $ret = array();
+  $ret[] = update_sql("ALTER TABLE {hosting_site} ADD COLUMN port int(10) NOT NULL default '0'");
+  db_query("UPDATE {hosting_site} SET port=80");
+  return $ret;
+}
Index: site/hosting_site.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/site/hosting_site.module,v
retrieving revision 1.107
diff -u -r1.107 hosting_site.module
--- site/hosting_site.module	28 May 2009 05:54:43 -0000	1.107
+++ site/hosting_site.module	9 Jul 2009 19:15:19 -0000
@@ -208,6 +208,13 @@
       '#default_value' => $node->title,
       '#weight' => -5
     );
+    
+    $form['port'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Port'),
+      '#required' => TRUE,
+      '#default_value' => 80
+     );
   }
   else {
     $form['info']['title'] = array(
@@ -218,6 +225,13 @@
     );
 
     $form['title'] = array('#type' => 'hidden', '#value' => $node->title);
+    
+    $form['info']['port'] = array(
+      '#type' => 'item',
+      '#title' => t('Port'),
+      '#value' => $node->port,
+     );
+    $form['port'] = array('#type' => 'hidden', '#value' => $node->port);
   }
 
 
@@ -352,6 +366,11 @@
   if (!_hosting_valid_fqdn($url)) {
     form_set_error('title', t("You have not specified a valid url for this site."));
   }
+  
+  if ($node->port<1) {
+    form_set_error('title', t("You have not specified a valid port for this site."));
+  }
+  
   # TODO: maybe we should allow creation of sites that conflict with HOSTING_SITE_DISABLED (which would then need to be renamed before being re-enabled)
   if (hosting_site_exists($url, $node->nid)) {
     form_set_error('title', t("The domain name you have specified is not unique."));
@@ -390,8 +409,8 @@
   $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) VALUES (%d, %d, %d, %d, %d, %d, '%s', %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);
+  db_query("INSERT INTO {hosting_site} (vid, nid, client, db_server, platform, profile, language, last_cron, status, verified, port) VALUES (%d, %d, %d, %d, %d, %d, '%s', %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);
   if ((!$node->old_vid)) {
     if ($node->import) {
       hosting_add_task($node->nid, 'import');
@@ -410,8 +429,8 @@
   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 WHERE vid=%d",
-              $node->client, $node->db_server, $node->platform, $node->last_cron, $node->site_status, $node->profile, $node->site_language, $node->verified, $node->vid);
+    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 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->vid);
   }
   if (!$node->no_verify) {
     hosting_add_task($node->nid, 'verify');
@@ -419,7 +438,7 @@
 }
 
 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 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 FROM {hosting_site} WHERE vid = %d', $node->vid));
   return $additions;
 }
 
@@ -443,9 +462,19 @@
   hosting_set_breadcrumb($node);
   $node->content['info']['#prefix'] = '<div id="hosting-site-info">';
   if ($node->site_status == HOSTING_SITE_ENABLED) {
+    switch($node->port) {
+      case 80:
+      $theurl = 'http://' . $node->title;
+      break;
+      case 443:
+      $theurl = 'https://' . $node->title;
+      break;
+      default:
+      $theurl = 'http://' . $node->title . ':' . $node->port;
+    }
     $node->content['info']['link'] = array(
       '#value' => l(t('Go to site'),
-      'http://' . $node->title),
+      $theurl),
       '#weight' => -10
     );
   }
@@ -464,6 +493,12 @@
     '#title' => t('Verified'),
     '#value' => hosting_format_interval($node->verified),
   );
+  
+  $node->content['info']['port'] = array(
+    '#type' => 'item',
+    '#title' => t('Port'),
+    '#value' => $node->port,
+  );
 
   $node->content['info']['platform'] = array(
     '#type' => 'item',
