You are here

function hosting_get_most_recent_task in Hosting 6.2

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

Retrieve the latest task related to the specified platform, of a specific type

This is used for documenting issues with verification.

2 calls to hosting_get_most_recent_task()
drush_hosting_task_validate in ./task.hosting.inc
Validate hook for the hosting-task Drush command.
hosting_add_task in task/hosting_task.module
Helper function to generate new task node

File

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

Code

function hosting_get_most_recent_task($rid, $type) {
  $nid = db_result(db_query("SELECT t.nid FROM {hosting_task} t INNER JOIN {node} n ON n.vid = t.vid WHERE task_type='%s' and t.rid=%d ORDER BY t.vid DESC limit 1", $type, $rid));
  if ($nid) {
    return node_load($nid);
  }
  return false;
}