* * @filesource tcEdit.php * @package TestLink * @author TestLink community * @copyright 2007-2012, TestLink community * @link http://www.teamst.org/index.php * * @internal revisions * @since 2.0 * **/ require_once "../../config.inc.php"; require_once "common.php"; require_once "opt_transfer.php"; require_once "web_editor.php"; $cfg = getCfg(); testlinkInitPage($db); $optionTransferName = 'ot'; $tcase_mgr = new testcase($db); $tproject_mgr = new testproject($db); $tree_mgr = new tree($db); $tsuite_mgr = new testsuite($db); $args = init_args($db, $cfg, $tproject_mgr); require_once require_web_editor($cfg->webEditorCfg['type']); $commandMgr = new testcaseCommands($db, $_SESSION['currentUser'], $args->tproject_id); $commandMgr->setTemplateCfg(templateConfiguration()); $testCaseEditorKeys = array('summary' => 'summary', 'preconditions' => 'preconditions'); $oWebEditor = createWebEditors($args->basehref, $cfg->webEditorCfg, $testCaseEditorKeys); $sqlResult = ""; $init_inputs = true; $show_newTC_form = 0;
<?php header("Content-Type: text/html; charset=UTF-8"); define('APP_DIR', __DIR__); //include ('balance.php'); include 'config.php'; include 'models/functions.php'; include 'message.php'; define('PASSWORD_SALT', 'p2n4v3j'); define('_SEECRET', 1); $link = mysqli_connect(getCfg('db_host'), getCfg('db_login'), getCfg('db_password'), getCfg('db_name')) or die("Не могу подключиться к серверу БД(1)"); mysqli_set_charset($link, 'utf8'); date_default_timezone_set('Europe/Moscow');
testlinkInitPage($db); $templateCfg = templateConfiguration(); $args = init_args(); checkRights($db, $_SESSION['currentUser'], $args); $labels = getLabels(); $tplan_mgr = new testPlanUrgency($db); list($tproject_info, $tplan_info) = getAncestorsInfo($db, $tplan_mgr, $args->tproject_id, $args->tplan_id); $gui = initializeGui($args, $tplan_mgr, $tproject_info, $tplan_info); if (is_null($args->doReport) || is_null($args->build_id)) { $smarty = new TLSmarty(); $smarty->assign('gui', $gui); $smarty->display($templateCfg->template_dir . $templateCfg->default_template); exit; // Not needed just to remember that execution will not continue } $cfg = getCfg($gui); $not_run_label = lang_get($cfg['results']['status_label']['not_run']); $i18n = array(lang_get($cfg['results']['status_label']['failed']) => PHPExcel_Style_Color::COLOR_RED, lang_get($cfg['results']['status_label']['passed']) => PHPExcel_Style_Color::COLOR_GREEN); $testCaseCfg = config_get('testcase_cfg'); $testCasePrefix = $tproject_info['prefix'] . $testCaseCfg->glue_character; $re = new results($db, $tplan_mgr, $tproject_info, $tplan_info, ALL_TEST_SUITES, ALL_BUILDS, ALL_PLATFORMS); // Get Results on map with access key = test case's parent test suite id $executionsMap = $re->getSuiteList(); // lastResultMap provides list of all test cases in plan - data set includes title and suite names $lastResultMap = $re->getMapOfLastResult(); $gui->matrix = array(); if ($lastResultMap != null) { $versionTag = $labels['tcversion_indicator']; $priorityCache = null; foreach ($lastResultMap as $suiteId => $tsuite) { foreach ($tsuite as $testCaseId => $platformSet) {
$op = doDelete($args, $tprojectMgr, $args->contextTprojectID); $status_ok = $op->status_ok; $gui->user_feedback = $op->msg; $gui->reloadType = $op->reloadType; $gui->contextTprojectID = $op->contextTprojectID; break; case 'toggleActive': case 'togglePublic': $status_ok = true; $gui->user_feedback = ''; $method = $args->doAction; $tprojectMgr->{$method}($gui->contextTprojectID); break; } if ($doRender) { $cmdMgr->renderGui($args, $gui, $op, $templateCfg, getCfg()); exit; } $smarty = new TLSmarty(); if (!$status_ok) { $args->doAction = "ErrorOnAction"; } switch ($args->doAction) { case "doCreate": case "doDelete": case "doUpdate": case "toggleActive": case "togglePublic": $gui->tprojects = $tprojectMgr->get_accessible_for_user($args->userID, 'array_of_map'); // Context Need to be updated using first test project on set $gui->contextTprojectID = $gui->tprojects[0]['id'];