You are here

function hosting_site_post_hosting_backup_delete_task in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 site/hosting_site.drush.inc \hosting_site_post_hosting_backup_delete_task()
  2. 7.3 site/hosting_site.drush.inc \hosting_site_post_hosting_backup_delete_task()

Implements the hosting_post_backup_delete hook

File

site/hosting_site.drush.inc, line 374
Drush hooks for the Hosting site module.

Code

function hosting_site_post_hosting_backup_delete_task($task, $data) {
  if ($task->ref->type == 'site') {
    foreach ($task->task_args as $bid => $filename) {
      if ($filename !== '0') {
        hosting_site_delete_backup($bid);
      }
    }
  }
}