delete.provision.inc

  1. 7.x-3.x dns/delete.provision.inc
  2. 7.x-3.x platform/delete.provision.inc
  3. 7.x-3.x db/delete.provision.inc
  4. 7.x-3.x http/delete.provision.inc

Functions

File

http/delete.provision.inc
View source
  1. <?php
  2. function drush_http_provision_delete() {
  3. if (d()->type === 'site') {
  4. d()->service('http')->delete_config('site')
  5. ->succeed('Deleted platform configuration file', 'success')
  6. ->fail('Failed to delete platform configuration file', 'DRUSH_PERM_ERROR');
  7. }
  8. if (d()->type === 'platform') {
  9. if (!drush_get_option('force', FALSE) && drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_ROOT) && provision_drupal_find_sites()) {
  10. drush_set_error(dt('Existing sites were found on this platform. These sites will need to be deleted before this platform can be deleted.'));
  11. }
  12. else {
  13. d()->service('http')->delete_config('platform')
  14. ->succeed('Deleted platform configuration file', 'success')
  15. ->fail('Failed to delete platform configuration file', 'DRUSH_PERM_ERROR');
  16. }
  17. }
  18. d()->service('http')->parse_configs();
  19. }