You are here

function deploy_plan_get_status in Deploy - Content Staging 7.3

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

Helper function to recieve the status of a plan.

1 call to deploy_plan_get_status()
deploy_ui_plan::view_page in modules/deploy_ui/plugins/export_ui/deploy_ui_plan.class.php
Renders the view deployment plan page.

File

./deploy.module, line 374
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;
}