$gui->warning_msg = $args->id == 0 ? lang_get('testcase_does_not_exists') : lang_get('prefix_does_not_exists'); } // TICKET 5265: test case search displays only the first version of all test cases $args->tcversion_id = testcase::ALL_VERSIONS; } if ($args->id > 0) { if ($get_path_info || $args->show_path) { $gui->path_info = $item_mgr->tree_manager->get_full_path_verbose($args->id); } $platform_mgr = new tlPlatform($db, $args->tproject_id); $gui->platforms = $platform_mgr->getAllAsMap(); $gui->direct_link = $item_mgr->buildDirectWebLink($_SESSION['basehref'], $args->id); } $gui->id = $args->id; $identity->version_id = $args->tcversion_id; $item_mgr->show($smarty, $gui, $identity, $grants); break; default: tLog('Argument "edit" has invalid value: ' . $args->feature, 'ERROR'); trigger_error($_SESSION['currentUser']->login . '> Argument "edit" has invalid value.', E_USER_ERROR); break; } /** * * */ function initializeEnv($dbHandler) { $args = init_args($dbHandler); $gui = new stdClass(); $grant2check = array('mgt_modify_tc', 'mgt_view_req', 'testplan_planning', 'mgt_modify_product', 'testproject_edit_executed_testcases', 'testproject_delete_executed_testcases');