You are here

function hosting_get_most_recent_task in Hosting 5

Same name and namespace in other branches
  1. 6.2 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.

3 calls to hosting_get_most_recent_task()
hosting_wizard_hosting_verify in ./hosting.wizard.inc
hosting_wizard_hosting_verify_validate in ./hosting.wizard.inc
_hosting_platform_requirements in ./hosting_help.inc

File

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

Code

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