You are here

function deploy_plan_get_status in Deploy - Content Staging 7.2

Same name and namespace in other branches
  1. 7.3 deploy.module \deploy_plan_get_status()

Helper function to recieve the status of a plan.

1 call to deploy_plan_get_status()
deploy_ui_overview_page in modules/deploy_ui/deploy_ui.pages.inc
Page callback for the overview page.

File

./deploy.module, line 211
Deploy module functions.

Code

function deploy_plan_get_status($name) {
  $query = db_select('deploy_deployments', 'dd');
  $query
    ->join('deploy_log', 'dl', 'dd.lid = dl.lid');
  $status = $query
    ->fields('dl', array(
    'status',
  ))
    ->condition('dd.plan_name', $name)
    ->orderBy('dl.timestamp', 'DESC')
    ->range(0, 1)
    ->execute()
    ->fetchField();
  return $status;
}