Example #1
0
$date_format_cfg = config_get('date_format');
$op = new stdClass();
$op->user_feedback = '';
$op->buttonCfg = new stdClass();
$op->buttonCfg->name = "";
$op->buttonCfg->value = "";
$smarty = new TLSmarty();
$tplan_mgr = new testplan($db);
$build_mgr = new build_mgr($db);
$args = init_args($_REQUEST, $_SESSION, $date_format_cfg);
$gui = new stdClass();
$gui->tplan_id = $args->tplan_id;
$gui->main_descr = lang_get('title_build_2') . config_get('gui_title_separator_2') . lang_get('test_plan') . config_get('gui_title_separator_1') . $args->tplan_name;
$of = web_editor('notes', $_SESSION['basehref'], $editorCfg);
$of->Value = getItemTemplateContents('build_template', $of->InstanceName, $args->notes);
$gui->cfields = $build_mgr->html_custom_field_inputs($args->build_id, $args->testprojectID, 'design', '', $_REQUEST);
$op = new stdClass();
$op->operation_descr = '';
$op->user_feedback = '';
$op->buttonCfg = '';
$op->status_ok = 1;
switch ($args->do_action) {
    case 'edit':
        $op = edit($args, $build_mgr, $date_format_cfg);
        $gui->closed_on_date = $args->closed_on_date;
        $of->Value = $op->notes;
        break;
    case 'create':
        $op = create($args);
        $gui->closed_on_date = $args->closed_on_date;
        break;