You are here

function hosting_task_cancel in Hostmaster (Aegir) 6

1 string reference to 'hosting_task_cancel'
hosting_task_menu in modules/hosting/task/hosting_task.module
Implementation of hook_menu().

File

modules/hosting/task/hosting_task.module, line 80
Web server node type is defined here.

Code

function hosting_task_cancel($node) {
  if ($node->type == 'task') {
    if ($node->task_status == 0) {
      $ref = node_load($node->rid);
      hosting_add_task($node->rid, $node->task_type, array(), HOSTING_TASK_ERROR);

      // Log the cancellation
      hosting_task_log($node->vid, 'error', t("Task was cancelled."));
      drupal_goto('node/' . $node->rid);
    }
  }
  drupal_access_denied();
}