From f887495f884a750c9f6102ddb9b207e99b518f99 Mon Sep 17 00:00:00 2001 From: Jon Pugh Date: Thu, 23 Jun 2016 00:05:40 -0400 Subject: [PATCH 1/4] Trigger "verify" task instead of "install" task when site is created. --- site/hosting_site.nodeapi.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/hosting_site.nodeapi.inc b/site/hosting_site.nodeapi.inc index aade293..b7f9112 100644 --- a/site/hosting_site.nodeapi.inc +++ b/site/hosting_site.nodeapi.inc @@ -214,7 +214,7 @@ function hosting_site_node_insert($node) { hosting_add_task($node->nid, 'import'); } else { - hosting_add_task($node->nid, 'install'); + hosting_add_task($node->nid, 'verify'); } } } From 7cc339dedfed69d4356ac7cc44773c488aafc07f Mon Sep 17 00:00:00 2001 From: Jon Pugh Date: Mon, 11 Jul 2016 09:51:47 -0400 Subject: [PATCH 2/4] Unhide the install task, for now. We will have to conditionally hide it later. --- site/hosting_site.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/hosting_site.module b/site/hosting_site.module index 3f24000..81095ff 100644 --- a/site/hosting_site.module +++ b/site/hosting_site.module @@ -332,7 +332,7 @@ function hosting_site_hosting_tasks() { $tasks['site']['install'] = array( 'title' => t('Install'), 'description' => t('Install a site'), - 'hidden' => TRUE, +// 'hidden' => TRUE, 'provision_save' => TRUE, ); From 4597c5aa12dd1d3255659764863a721eb04e196b Mon Sep 17 00:00:00 2001 From: Jon Pugh Date: Mon, 11 Jul 2016 10:37:27 -0400 Subject: [PATCH 3/4] If site status is not explicity disabled or deleted, set to enabled. --- site/hosting_site.drush.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/site/hosting_site.drush.inc b/site/hosting_site.drush.inc index 88dc891..f2fe65d 100644 --- a/site/hosting_site.drush.inc +++ b/site/hosting_site.drush.inc @@ -245,6 +245,12 @@ function hosting_site_post_hosting_verify_task($task, $data) { if ($data['context']['cron_key']) { $task->ref->cron_key = $data['context']['cron_key']; } + + // If site status is not explicity disabled or deleted, set to enabled. + if ($task->ref->site_status != HOSTING_SITE_DISABLED && $task->ref->site_status != HOSTING_SITE_DELETED) { + $task->ref->site_status = HOSTING_SITE_ENABLED; + } + node_save($task->ref); $context = $data['context']; From 5d8134aac4ae965c64594ef3dedc3198e84024f1 Mon Sep 17 00:00:00 2001 From: Jon Pugh Date: Sat, 20 Aug 2016 10:31:19 -0400 Subject: [PATCH 4/4] Issue #2754069: Run a verify instead of an install task when a site is created --- site/hosting_site.nodeapi.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/hosting_site.nodeapi.inc b/site/hosting_site.nodeapi.inc index f7dc81f..89b1931 100644 --- a/site/hosting_site.nodeapi.inc +++ b/site/hosting_site.nodeapi.inc @@ -279,7 +279,7 @@ function hosting_site_node_insert($node) { hosting_add_task($node->nid, 'import'); } else { - hosting_add_task($node->nid, 'install'); + hosting_add_task($node->nid, 'verify'); } } }