Пример #1
0
 *
 * @internal revisions
 */
require_once "../../config.inc.php";
require_once "common.php";
require_once "web_editor.php";
$editorCfg = getWebEditorCfg('design');
require_once require_web_editor($editorCfg['type']);
testlinkInitPage($db);
$tree_mgr = new tree($db);
$tproject_mgr = new testproject($db);
$tsuite_mgr = new testsuite($db);
$tcase_mgr = new testcase($db);
$assign_gui = true;
$refreshTree = false;
list($args, $gui) = initializeEnv($db, $tree_mgr);
$keywordSet = array('testproject' => $tproject_mgr->get_keywords_map($args->tproject_id), 'testsuite' => null);
if ($args->action == 'edit_testsuite') {
    $keywordSet['testsuite'] = $tsuite_mgr->get_keywords_map($args->testsuiteID, " ORDER BY keyword ASC ");
}
$gui_cfg = config_get('gui');
$tpl = null;
$smarty = new TLSmarty();
$smarty->tlTemplateCfg = templateConfiguration();
$smarty->assign('editorType', $editorCfg['type']);
switch ($args->action) {
    case 'edit_testsuite':
    case 'new_testsuite':
        renderTestSuiteForManagement($smarty, $args, $gui, $tsuite_mgr, $keywordSet);
        exit;
        break;
Пример #2
0
 *
 *  2. Search option on Navigation Bar.
 *     In this Use Case, user can try to search for test cases that DO NOT BELONG
 *     to current setted Test Project.
 *     System try to get Test Project analising user provided data (test case identification)
 *
 *  @internal revision
 *  @since 1.9.15
 */
require_once '../../config.inc.php';
require_once 'common.php';
testlinkInitPage($db);
$smarty = new TLSmarty();
$smarty->tlTemplateCfg = $templateCfg = templateConfiguration();
$cfg = array('testcase' => config_get('testcase_cfg'), 'testcase_reorder_by' => config_get('testcase_reorder_by'), 'spec' => config_get('spec_cfg'));
list($args, $gui, $grants) = initializeEnv($db);
// User right at test project level has to be done
// Because this script can be called requesting an item that CAN BELONG
// to a test project DIFFERENT that value present on SESSION,
// we need to use requested item to get its right Test Project
// We will start with Test Cases ONLY
switch ($args->feature) {
    case 'testproject':
    case 'testsuite':
        $item_mgr = new $args->feature($db);
        $gui->id = $args->id;
        if ($args->feature == 'testproject') {
            $gui->id = $args->id = $args->tproject_id;
            $item_mgr->show($smarty, $gui, $templateCfg->template_dir, $args->id);
        } else {
            $gui->direct_link = $item_mgr->buildDirectWebLink($_SESSION['basehref'], $args->id, $args->tproject_id);
Пример #3
0
 * @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 "web_editor.php";
require_once "form_api.php";
$editorCfg = getWebEditorCfg('testproject');
require_once require_web_editor($editorCfg['type']);
testlinkInitPage($db);
$templateCfg = templateConfiguration();
list($tprojectMgr, $args, $gui, $ui) = initializeEnv($db);
$gui->editorType = $editorCfg['type'];
checkRights($db, $_SESSION['currentUser'], $args);
// is failed script execution will be aborted
$cmdMgr = new projectCommands($db, $_SESSION['currentUser']);
$cmdMgr->setTemplateCfg(templateConfiguration());
$of = web_editor('notes', $_SESSION['basehref'], $editorCfg);
$status_ok = 1;
$template = null;
$doRender = false;
switch ($pfn = $args->doAction) {
    case 'create':
        $op = $cmdMgr->{$pfn}($args, $gui);
        $doRender = true;
        break;
    case 'edit':