You are here

function deploy_add_to_plan in Deploy - Content Staging 5

Same name and namespace in other branches
  1. 6 deploy.module \deploy_add_to_plan()

add data to a deployment plan

3 calls to deploy_add_to_plan()
content_copy_deploy_add_form_submit in content_copy_deploy/content_copy_deploy.module
deploy content type form submit callback
system_settings_deploy_form_submit in system_settings_deploy/system_settings_deploy.module
submit handler for systems settings forms that have deployment enabled
views_deploy_add_form_submit in views_deploy/views_deploy.module
deploy view form submit callback

File

./deploy.module, line 571

Code

function deploy_add_to_plan($pid, $module, $description, $data) {
  global $user;
  $iid = db_next_id('{deploy_plan_items}_iid');
  $result = db_query("insert into {deploy_plan_items} (iid, pid, uid, ts, module, description, data) values (%d, %d, %d, %d, '%s', '%s', '%s')", $iid, $pid, $user->uid, time(), $module, $description, $data);
  if (!$result) {
    drupal_set_message(t("An error occured."));
  }
  else {
    drupal_set_message("{$description} successfully added to plan");
  }
}