You are here

function hosting_task_status in Hosting 7.4

Same name and namespace in other branches
  1. 5 task/hosting_task.module \hosting_task_status()
  2. 6.2 task/hosting_task.module \hosting_task_status()
  3. 7.3 task/hosting_task.module \hosting_task_status()

Return the status of the task matching the specification.

1 call to hosting_task_status()
hosting_task_status_output in task/hosting_task.module
Return the status of a task in human-readable form.

File

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

Code

function hosting_task_status($filter_by, $filter_value, $type = 'install') {
  $query = db_select('node', 'n');
  $query
    ->join('hosting_task', 't', 'n.vid = t.vid');
  $query
    ->fields('t', array(
    'task_status',
  ))
    ->condition('n.type', 'task')
    ->condition('t.task_type', $type);
  if ($filter_by && $filter_value) {
    $query
      ->condition('t.' . $filter_by, $filter_value);
  }
  $query
    ->orderBy('t.vid', 'DESC');
  return $query
    ->execute()
    ->fetchField();
}