You are here

function hosting_task_cancel in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 task/hosting_task.module \hosting_task_cancel()
  2. 7.3 task/hosting_task.module \hosting_task_cancel()
1 string reference to 'hosting_task_cancel'
hosting_task_menu in task/hosting_task.module
Implementation of hook_menu().

File

task/hosting_task.module, line 88
Web server node type is defined here.

Code

function hosting_task_cancel($node) {
  if ($node->type == 'task') {
    if ($node->task_status == HOSTING_TASK_QUEUED) {
      $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();
}