delete.provision.inc 563 Bytes
Newer Older
1 2
<?php

3
function drush_http_provision_delete() {
drumm's avatar
drumm committed
4
  if (d()->type === 'site') {
5
    d()->service('http')->delete_config('site');
6
  }
drumm's avatar
drumm committed
7
  if (d()->type === 'platform') {
8
    if (!drush_get_option('force', FALSE) && drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_ROOT) && provision_drupal_find_sites()) {
9 10 11
      drush_set_error(dt('Existing sites were found on this platform. These sites will need to be deleted before this platform can be deleted.'));
    }
    else {
12
      d()->service('http')->delete_config('platform');
13 14
    }
  }
15
  d()->service('http')->parse_configs();
16
}