Index: hosting.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/hosting.module,v
retrieving revision 1.107
diff -u -p -r1.107 hosting.module
--- hosting.module	20 Aug 2009 14:03:02 -0000	1.107
+++ hosting.module	23 Aug 2009 13:31:34 -0000
@@ -356,6 +356,10 @@ function hosting_format_interval($ts) {
   if ($ts==mktime()) { 
     return t('Now');
   }
+  if ($ts == -1) {
+    // If -1, a task has been attempted but has failed
+    return t('Last verification failed.');
+  }
   if (!$ts) {
     //Treats EPOCH as never
     return t('Never');
Index: platform/hosting_platform.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/platform/hosting_platform.module,v
retrieving revision 1.56
diff -u -p -r1.56 hosting_platform.module
--- platform/hosting_platform.module	13 Jul 2009 09:19:14 -0000	1.56
+++ platform/hosting_platform.module	23 Aug 2009 13:31:34 -0000
@@ -76,6 +76,18 @@ function _hosting_get_platforms() {
 }
 
 /**
+ * Small helper function to check if platform is valid.
+*/
+function _hosting_platform_is_valid($platform) {
+  $return = array();
+  $result = db_query("SELECT verified FROM {hosting_platform} WHERE nid='$platform' AND verified > 0");
+  while($server = db_fetch_object($result)) {
+    $return[$server->nid] = $server->platform;
+  }
+  return $return;
+}
+
+/**
  * Implementation of hook_form().
  */
 function hosting_platform_form(&$node) {
Index: site/hosting_site.drush.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/site/hosting_site.drush.inc,v
retrieving revision 1.6
diff -u -p -r1.6 hosting_site.drush.inc
--- site/hosting_site.drush.inc	28 May 2009 05:54:43 -0000	1.6
+++ site/hosting_site.drush.inc	23 Aug 2009 13:31:34 -0000
@@ -135,7 +135,12 @@ function hosting_site_post_hosting_verif
 function hosting_site_hosting_verify_task_rollback($task, $data) {
   if ($task->ref->type == 'site') {
     $task->ref->no_verify = TRUE;
-    $task->ref->verified = 0;
+    $task->ref->verified = -1;
+    node_save($task->ref);
+  }
+  if ($task->ref->type == 'platform') {
+    $task->ref->no_verify = TRUE;
+    $task->ref->verified = -1;
     node_save($task->ref);
   }
 }
Index: site/hosting_site.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/hosting/site/hosting_site.module,v
retrieving revision 1.109
diff -u -p -r1.109 hosting_site.module
--- site/hosting_site.module	20 Jul 2009 15:13:57 -0000	1.109
+++ site/hosting_site.module	23 Aug 2009 13:31:34 -0000
@@ -358,6 +358,7 @@ function hosting_site_form($node) {
 function hosting_site_validate($node, &$form) {
   global $user;
   $url = strtolower($node->title); // domain names are case-insensitive
+  $valid_platform = _hosting_platform_is_valid($node->platform);
   if (!_hosting_valid_fqdn($url)) {
     form_set_error('title', t("You have not specified a valid url for this site."));
   }
@@ -374,6 +375,9 @@ function hosting_site_validate($node, &$
       form_set_error('client', t('Access denied to client @client', array('@client' => $client->title)));
     }
   }
+  if (empty($valid_platform)) {
+    form_set_error('title', t('You cannot create a new site on this platform because the platform is not verified.'));
+  }
   if (!array_key_exists($node->profile, hosting_get_profiles($node->platform))) {
     form_set_error('profile', t('Please fill in a valid profile'));
   }
