if ($name_ok && $c_data['container_name'] == "") { $msg = $l18n['warning_empty_testsuite_name']; $name_ok = 0; } } switch ($action) { case 'fileUpload': switch ($level) { case 'testsuite': fileUploadManagement($db, $args->testsuiteID, $args->fileTitle, $tsuite_mgr->getAttachmentTableName()); $gui = initializeGui($tsuite_mgr, $args->testsuiteID, $args, $l18n); $gui->refreshTree = 0; $tsuite_mgr->show($smarty, $gui, $template_dir, $args->testsuiteID, null, null); break; case 'testproject': fileUploadManagement($db, $args->tprojectID, $args->fileTitle, $tproject_mgr->getAttachmentTableName()); $gui = initializeGui($tproject_mgr, $args->tprojectID, $args, $l18n); $gui->refreshTree = 0; $tproject_mgr->show($smarty, $gui, $template_dir, $args->tprojectID, null, null); break; } break; case 'deleteFile': deleteAttachment($db, $args->file_id); switch ($level) { case 'testsuite': $gui = initializeGui($tsuite_mgr, $args->testsuiteID, $args, $l18n); $gui->refreshTree = 0; $tsuite_mgr->show($smarty, $gui, $template_dir, $args->testsuiteID, null, null); break; case 'testproject':
exit; } $gui = initializeGui($db, $args, $editorCfg, $tproject_mgr); $of = web_editor('notes', $_SESSION['basehref'], $editorCfg); $of->Value = getItemTemplateContents('testplan_template', $of->InstanceName, $args->notes); // Checks on testplan name, and testplan name<=>testplan id if ($args->do_action == "do_create" || $args->do_action == "do_update") { $gui->testplan_name = $args->testplan_name; $name_exists = $tproject_mgr->check_tplan_name_existence($args->tproject_id, $args->testplan_name); $name_id_rel_ok = isset($gui->tplans[$args->tplan_id]) && $gui->tplans[$args->tplan_id]['name'] == $args->testplan_name; } // interface changes to be able to do not loose CF values if some problem arise on User Interface $gui->cfields = $tplan_mgr->html_table_of_custom_field_inputs($args->tplan_id, $args->tproject_id, 'design', '', $_REQUEST); switch ($args->do_action) { case 'fileUpload': fileUploadManagement($db, $args->tplan_id, $args->fileTitle, $tplan_mgr->getAttachmentTableName()); getItemData($tplan_mgr, $gui, $of, $args->tplan_id, true); break; case 'deleteFile': deleteAttachment($db, $args->file_id); getItemData($tplan_mgr, $gui, $of, $args->tplan_id, true); break; case 'edit': getItemData($tplan_mgr, $gui, $of, $args->tplan_id); break; case 'do_delete': $tplanInfo = $tplan_mgr->get_by_id($args->tplan_id); if ($tplanInfo) { $tplan_mgr->delete($args->tplan_id); logAuditEvent(TLS("audit_testplan_deleted", $args->tproject_name, $tplanInfo['name']), "DELETE", $args->tplan_id, "testplan"); }
/** * */ function fileUpload(&$argsObj, $request) { fileUploadManagement($this->db, $argsObj->req_id, $argsObj->fileTitle, $this->reqMgr->getAttachmentTableName()); return $this->initGuiObjForAttachmentOperations($argsObj); }