You are here

function deploy_create_plan in Deploy - Content Staging 6

Create a new deployment plan.

Parameters

$name: A unique name for the plan

$description: An optional description

Return value

int The new plan's unique ID, or 0 on failure.

4 calls to deploy_create_plan()
comment_deploy_operations_add_now_form_submit in modules/comment_deploy/comment_deploy.pages.inc
Submit handler for comment_deploy_operations_add_now_form().
deploy_plan_form_submit in ./deploy.plans.admin.inc
Submit callback for deploy_plan_form().
node_deploy_operations_create_plan in modules/node_deploy/node_deploy.pages.inc
Helper function that creates a deployment plan.
taxonomy_vocabulary_deploy_add_form_submit in modules/taxonomy_deploy/taxonomy_deploy.pages.inc
Submit handler for taxonomy_vocabulary_deploy_add_form().

File

./deploy.module, line 633
Deployment API which enables modules to deploy items between servers.

Code

function deploy_create_plan($name, $description = '', $internal = 0) {
  $pid = 0;
  if (!deploy_plan_exists($name)) {
    db_query("INSERT INTO {deploy_plan} (name, description, internal) VALUES ('%s', '%s', %d)", $name, $description, $internal);
    $pid = db_last_insert_id('deploy_plan', 'pid');
  }
  return $pid;
}