• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP testproject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中testproject的典型用法代码示例。如果您正苦于以下问题:PHP testproject类的具体用法?PHP testproject怎么用?PHP testproject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了testproject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, $argsObj)
{
    $tproject_mgr = new testproject($dbHandler);
    $itemMgr = new requirement_spec_mgr($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->itemCfg = config_get('req_spec_cfg');
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = $argsObj->hasRight($dbHandler, "mgt_modify_req", $argsObj->tproject_id);
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->glueChar = config_get('testcase_cfg')->glue_character;
    $gui->pieceSep = config_get('gui_title_separator_1');
    $gui->item_id = $argsObj->item_id;
    $info = $itemMgr->getRevisionByID($gui->item_id, array('decode_user' => true));
    $gui->item = $info;
    $gui->cfields = $itemMgr->html_table_of_custom_field_values(null, $gui->item_id, $argsObj->tproject_id);
    $gui->show_title = false;
    $gui->main_descr = lang_get('req_spec') . $gui->pieceSep . $gui->item['name'];
    $gui->showContextInfo = $argsObj->showContextInfo;
    if ($gui->showContextInfo) {
        $gui->parent_descr = lang_get('req_spec_short') . $gui->pieceSep . $gui->item['name'];
    }
    $gui->itemSpecStatus = null;
    $gui->itemTypeDomain = init_labels($gui->itemCfg->type_labels);
    return $gui;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:31,代码来源:reqSpecViewRevision.php


示例2: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, &$argsObj)
{
    $req_spec_mgr = new requirement_spec_mgr($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->req_spec_cfg = config_get('req_spec_cfg');
    $gui->req_cfg = config_get('req_cfg');
    // 20100810 - asimon - BUGID 3317: disabled total count of requirements by default
    $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req");
    $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
    $gui->req_spec_id = $argsObj->req_spec_id;
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->name = $gui->req_spec['title'];
    $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title'];
    $gui->refresh_tree = 'no';
    $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($argsObj->req_spec_id, $argsObj->tproject_id);
    $gui->attachments = getAttachmentInfosFrom($req_spec_mgr, $argsObj->req_spec_id);
    $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id);
    $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels);
    /* contribution BUGID 2999, show direct link */
    $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']);
    return $gui;
}
开发者ID:tamtrong,项目名称:testlink,代码行数:31,代码来源:reqSpecView.php


示例3: init_args

/**
 * init_args
 *
 */
function init_args(&$dbHandler)
{
    $reqTitleSize = config_get('field_size')->requirement_title;
    $iParams = array("requirement_id" => array(tlInputParameter::INT_N), "req_version_id" => array(tlInputParameter::INT_N), "req_spec_id" => array(tlInputParameter::INT_N), "req_title" => array(tlInputParameter::STRING_N, 0, $reqTitleSize), "req_id_cbox" => array(tlInputParameter::ARRAY_INT), "reqDocId" => array(tlInputParameter::STRING_N, 0, 64), "reqStatus" => array(tlInputParameter::STRING_N, 0, 1), "reqType" => array(tlInputParameter::STRING_N, 0, 1), "containerID" => array(tlInputParameter::INT_N), "scope" => array(tlInputParameter::STRING_N), "countReq" => array(tlInputParameter::INT_N), "expected_coverage" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 20), "itemSet" => array(tlInputParameter::ARRAY_INT), "testcase_count" => array(tlInputParameter::ARRAY_INT), "copy_testcase_assignment" => array(tlInputParameter::CB_BOOL), "relation_id" => array(tlInputParameter::INT_N), "relation_source_req_id" => array(tlInputParameter::INT_N), "relation_type" => array(tlInputParameter::STRING_N), "relation_destination_req_doc_id" => array(tlInputParameter::STRING_N, 0, 64), "relation_destination_testproject_id" => array(tlInputParameter::INT_N), "save_rev" => array(tlInputParameter::INT_N), "do_save" => array(tlInputParameter::INT_N), "log_message" => array(tlInputParameter::STRING_N), "tcaseIdentity" => array(tlInputParameter::STRING_N), "file_id" => array(tlInputParameter::INT_N), "fileTitle" => array(tlInputParameter::STRING_N, 0, 100));
    $args = new stdClass();
    R_PARAMS($iParams, $args);
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $args->req_id = $args->requirement_id;
    $args->title = $args->req_title;
    $args->arrReqIds = $args->req_id_cbox;
    $args->basehref = $_SESSION['basehref'];
    $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
    if ($args->tproject_id <= 0) {
        throw new Exception(__FILE__ . '::' . __FUNCTION__ . " Test project ID can not be <= 0 ");
    }
    $mgr = new testproject($dbHandler);
    $info = $mgr->get_by_id($args->tproject_id);
    if (is_null($info)) {
        throw new Exception(__FILE__ . '::' . __FUNCTION__ . " Unable to get test project data ");
    }
    $args->tproject_name = $info['name'];
    $args->tcasePrefix = $info['prefix'];
    $args->user_id = isset($_SESSION['userID']) ? $_SESSION['userID'] : 0;
    if (!is_numeric($args->expected_coverage)) {
        $args->expected_coverage = 0;
    }
    $args->refreshTree = isset($_SESSION['setting_refresh_tree_on_action']) ? $_SESSION['setting_refresh_tree_on_action'] : 0;
    $args->stay_here = isset($_REQUEST['stay_here']) ? 1 : 0;
    return $args;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:34,代码来源:reqEdit.php


示例4: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, &$argsObj)
{
    $req_spec_mgr = new requirement_spec_mgr($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->refreshTree = $argsObj->refreshTree;
    $gui->req_spec_cfg = config_get('req_spec_cfg');
    $gui->req_cfg = config_get('req_cfg');
    $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = $argsObj->user->hasRight($dbHandler, "mgt_modify_req", $argsObj->tproject_id);
    $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
    $gui->revCount = $req_spec_mgr->getRevisionsCount($argsObj->req_spec_id);
    $gui->req_spec_id = $argsObj->req_spec_id;
    $gui->parentID = $argsObj->req_spec_id;
    $gui->req_spec_revision_id = $gui->req_spec['revision_id'];
    $gui->name = $gui->req_spec['title'];
    $gui->tproject_id = $argsObj->tproject_id;
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title'];
    $gui->refresh_tree = 'no';
    $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($argsObj->req_spec_id, $gui->req_spec_revision_id, $argsObj->tproject_id);
    $gui->attachments = $req_spec_mgr->getAttachmentInfos($argsObj->req_spec_id);
    $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id);
    $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels);
    $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']);
    $gui->actions = initializeActions($gui);
    return $gui;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:35,代码来源:reqSpecView.php


示例5: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, $argsObj)
{
    $tproject_mgr = new testproject($dbHandler);
    $req_mgr = new requirement_mgr($dbHandler);
    $commandMgr = new reqCommands($db);
    $gui = $commandMgr->initGuiBean();
    $gui->req_cfg = config_get('req_cfg');
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req");
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->glueChar = config_get('testcase_cfg')->glue_character;
    $gui->pieceSep = config_get('gui_title_separator_1');
    $gui->req_id = $argsObj->req_id;
    $gui->req_versions = $req_mgr->get_by_id($gui->req_id);
    $gui->req = current($gui->req_versions);
    $gui->req_coverage = $req_mgr->get_coverage($gui->req_id);
    // This seems weird but is done to adapt template than can display multiple
    // requirements. This logic has been borrowed from test case versions management
    $gui->current_version[0] = array($gui->req);
    // BUGID 2877 - Custom Fields linked to Requirement Versions
    $gui->cfields_current_version[0] = $req_mgr->html_table_of_custom_field_values($gui->req_id, $gui->req['version_id'], $argsObj->tproject_id);
    // Now CF for other Versions
    $gui->other_versions[0] = null;
    $gui->cfields_other_versions[] = null;
    if (count($gui->req_versions) > 1) {
        $gui->other_versions[0] = array_slice($gui->req_versions, 1);
        $loop2do = count($gui->other_versions[0]);
        for ($qdx = 0; $qdx < $loop2do; $qdx++) {
            $target_version = $gui->other_versions[0][$qdx]['version_id'];
            $gui->cfields_other_versions[0][$qdx] = $req_mgr->html_table_of_custom_field_values($gui->req_id, $target_version, $argsObj->tproject_id);
        }
    }
    $gui->show_title = false;
    $gui->main_descr = lang_get('req') . $gui->pieceSep . $gui->req['title'];
    $gui->showReqSpecTitle = $argsObj->showReqSpecTitle;
    if ($gui->showReqSpecTitle) {
        $gui->parent_descr = lang_get('req_spec_short') . $gui->pieceSep . $gui->req['req_spec_title'];
    }
    // BUGID 2877 - Custom Fields linked to Requirement Versions
    // $gui->cfields = array();
    // $gui->cfields[] = $req_mgr->html_table_of_custom_field_values($gui->req_id,$argsObj->tproject_id);
    $gui->attachments[$gui->req_id] = getAttachmentInfosFrom($req_mgr, $gui->req_id);
    $gui->attachmentTableName = $req_mgr->getAttachmentTableName();
    $gui->reqStatus = init_labels($gui->req_cfg->status_labels);
    $gui->reqTypeDomain = init_labels($gui->req_cfg->type_labels);
    // added req relations for BUGID 1748
    $gui->req_relations = FALSE;
    $gui->req_relation_select = FALSE;
    $gui->testproject_select = FALSE;
    $gui->req_add_result_msg = isset($argsObj->relation_add_result_msg) ? $argsObj->relation_add_result_msg : "";
    if ($gui->req_cfg->relations->enable) {
        $gui->req_relations = $req_mgr->get_relations($gui->req_id);
        $gui->req_relation_select = $req_mgr->init_relation_type_select();
        if ($gui->req_cfg->relations->interproject_linking) {
            $gui->testproject_select = initTestprojectSelect($db, $argsObj, $tproject_mgr);
        }
    }
    return $gui;
}
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:64,代码来源:reqView.php


示例6: initGuiBean

 /**
  * 
  *
  */
 function initGuiBean(&$argsObj, $mandatory = null)
 {
     $obj = new stdClass();
     $prop2scan = array('tproject_id' => 'Test project id can not be <= 0', 'tsuiteID' => 'Test suite id can not be <= 0');
     if (!is_null($mandatory)) {
         foreach ($mandatory as $key) {
             $p2check[$key] = $prop2scan[$key];
         }
     } else {
         $p2check =& $prop2scan;
     }
     foreach ($p2check as $prop => $msg) {
         if (($obj->{$prop} = intval($argsObj->{$prop})) <= 0) {
             throw new Exception(__METHOD__ . ':' . $msg);
         }
     }
     $tprojectMgr = new testproject($this->db);
     $dummy = $tprojectMgr->get_by_id($obj->tproject_id);
     $obj->testPriorityEnabled = $dummy['opt']->testPriorityEnabled;
     $obj->automationEnabled = $dummy['opt']->automationEnabled;
     $this->keywordSet = array('testproject' => $tprojectMgr->get_keywords_map($argsObj->tproject_id), 'testcase' => null);
     $obj->template_dir = $this->templateCfg->template_dir;
     $obj->action = '';
     $obj->attachments = null;
     $obj->cleanUpWebEditor = false;
     $obj->direct_link = null;
     $obj->execution_types = $this->execution_types;
     $obj->grants = $this->grants;
     $obj->has_been_executed = false;
     $obj->initWebEditorFromTemplate = false;
     $obj->viewerArgs = null;
     $obj->path_info = null;
     $obj->main_descr = '';
     $obj->name = '';
     $obj->sqlResult = '';
     $obj->step_id = -1;
     $obj->step_set = '';
     $obj->steps = '';
     $obj->tableColspan = 5;
     $obj->tcase_id = property_exists($argsObj, 'tcase_id') ? intval($argsObj->tcase_id) : -1;
     $p2check = array('goback_url' => '', 'show_mode' => 'show', 'refreshTree' => !tlTreeMenu::REFRESH_GUI);
     foreach ($p2check as $prop => $value) {
         if (property_exists($argsObj, $prop) && !is_null($argsObj->{$prop})) {
             $obj->{$prop} = $argsObj->{$prop};
         } else {
             $obj->{$prop} = $value;
         }
     }
     // need to check where is used -> on cancel button on tcStepEdit.tpl
     $obj->loadOnCancelURL = "archiveData.php?tproject_id={$obj->tproject_id}&edit=testcase" . "&show_mode={$obj->show_mode}&id=%s&version_id=%s";
     // Used on tcStepEdit.tpl to creare goback_url URL parameter
     $obj->goBackAction = $_SESSION['basehref'] . "lib/testcases/" . $obj->loadOnCancelURL;
     $obj->keywordsViewHREF = "lib/keywords/keywordsView.php?tproject_id={$obj->tproject_id} " . ' target="mainframe" class="bold" ' . ' title="' . lang_get('menu_manage_keywords') . '"';
     return $obj;
 }
开发者ID:moraesmv,项目名称:testlink-code,代码行数:59,代码来源:testcaseCommands.class.php


示例7: initializeGui

function initializeGui(&$dbHandler, $args)
{
    $gui = new stdClass();
    $tplan_mgr = new testplan($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $gui_open = config_get('gui_separator_open');
    $gui_close = config_get('gui_separator_close');
    $gui->str_option_any = $gui_open . lang_get('any') . $gui_close;
    $gui->str_option_none = $gui_open . lang_get('nobody') . $gui_close;
    $gui->tplan_id = $args->tplan_id;
    $gui->tproject_id = $args->tproject_id;
    $tplan_info = $tplan_mgr->get_by_id($gui->tplan_id);
    $gui->tplan_name = $tplan_info['name'];
    $tproject_info = $tproject_mgr->get_by_id($gui->tproject_id);
    $gui->tproject_name = $tproject_info['name'];
    $re = new results($dbHandler, $tplan_mgr, $tproject_info, $tplan_info);
    $gui->assigned_users = new stdClass();
    $gui->keywords = new stdClass();
    $gui->builds = new stdClass();
    $gui->testsuites = new stdClass();
    // 20090107 - franciscom
    // Show only users that are able to execute test cases ?
    // What happens if a user that has loose right to execute, but
    // before loosing this right has been assigned some tests, or have executed it?
    //
    // $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, ADD_BLANK_OPTION);
    // $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER,
    // 	                                                   array(TL_USER_ANYBODY => $gui->str_option_any,
    //                                                            TL_USER_NOBODY => $gui->str_option_none) );
    //
    $gui->assigned_users->items = getUsersForHtmlOptions($dbHandler, ALL_USERS_FILTER, array(TL_USER_ANYBODY => $gui->str_option_any));
    $gui->assigned_users->qty = count($gui->assigned_users->items);
    // BUGID 2012 - franciscom
    $gui->keywords->items[0] = $gui->str_option_any;
    if (!is_null($tplan_keywords_map = $tplan_mgr->get_keywords_map($gui->tplan_id))) {
        $gui->keywords->items += $tplan_keywords_map;
    }
    $gui->builds->items = $tplan_mgr->get_builds($gui->tplan_id, testplan::ACTIVE_BUILDS);
    $gui->testsuites->items = $re->getTopLevelSuites();
    $gui->keywords->qty = count($gui->keywords->items);
    $gui->builds->qty = count($gui->builds->items);
    $gui->testsuites->qty = count($gui->testsuites->items);
    $gui->status_code_label = get_status_for_reports_html_options();
    $gui->report_type = $args->format;
    $reports_cfg = config_get('reportsCfg');
    $startDate = time() - $reports_cfg->start_date_offset;
    $gui->selected_start_date = $startDate;
    $gui->selected_start_time = $reports_cfg->start_time;
    $gui->selected_end_date = null;
    $gui->selected_end_time = null;
    return $gui;
}
开发者ID:tamtrong,项目名称:testlink,代码行数:52,代码来源:resultsMoreBuildsGUI.php


示例8: init_args

function init_args(&$dbHandler, $dateFormat)
{
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $args = new stdClass();
    // BUGID 3716
    $args->target_date_original = isset($_REQUEST['target_date']) ? $_REQUEST['target_date'] : null;
    $args->start_date_original = isset($_REQUEST['start_date']) ? $_REQUEST['start_date'] : null;
    // convert target date to iso format to write to db
    if (isset($_REQUEST['target_date']) && $_REQUEST['target_date'] != '') {
        $date_array = split_localized_date($_REQUEST['target_date'], $dateFormat);
        if ($date_array != null) {
            // set date in iso format
            $args->target_date = $date_array['year'] . "-" . $date_array['month'] . "-" . $date_array['day'];
        }
    }
    // convert start date to iso format to write to db
    if (isset($_REQUEST['start_date']) && $_REQUEST['start_date'] != '') {
        $date_array = split_localized_date($_REQUEST['start_date'], $dateFormat);
        if ($date_array != null) {
            // set date in iso format
            $args->start_date = $date_array['year'] . "-" . $date_array['month'] . "-" . $date_array['day'];
        }
    }
    $key2loop = array('low_priority_tcases', 'medium_priority_tcases', 'high_priority_tcases');
    foreach ($key2loop as $key) {
        $args->{$key} = isset($_REQUEST[$key]) ? intval($_REQUEST[$key]) : 0;
    }
    $args->id = isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
    $args->name = isset($_REQUEST['milestone_name']) ? $_REQUEST['milestone_name'] : null;
    $args->doAction = isset($_REQUEST['doAction']) ? $_REQUEST['doAction'] : null;
    $args->basehref = $_SESSION['basehref'];
    $treeMgr = new tree($dbHandler);
    $tprojectMgr = new testproject($dbHandler);
    $args->tproject_options = new stdClass();
    $args->tproject_options->testPriorityEnabled = 0;
    $args->tproject_name = '';
    $args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
    if ($args->tproject_id > 0) {
        $info = $tprojectMgr->get_by_id($args->tproject_id);
        $args->tproject_name = $info['name'];
        $args->tproject_options = $info['opt'];
    }
    $args->tplan_name = '';
    $args->tplan_id = isset($_REQUEST['tplan_id']) ? intval($_REQUEST['tplan_id']) : 0;
    if ($args->tplan_id > 0) {
        $info = $treeMgr->get_node_hierarchy_info($args->tplan_id);
        $args->tplan_name = $info['name'];
    }
    return $args;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:50,代码来源:planMilestonesEdit.php


示例9: init_args

/**
 * init_args
 *
 */
function init_args(&$dbHandler)
{
    $args = new stdClass();
    $args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
    $args->tplans = null;
    if ($args->tproject_id > 0) {
        $tprojectMgr = new testproject($dbHandler);
        $dummy = $tprojectMgr->tree_manager->get_node_hierarchy_info($args->tproject_id);
        $args->tproject_name = $dummy['name'];
        $args->tplans = $tprojectMgr->get_all_testplans($args->tproject_id);
    }
    $args->grants = new stdClass();
    $args->grants->testplan_create = $_SESSION['currentUser']->hasRight($dbHandler, "mgt_testplan_create", $args->tproject_id);
    return $args;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:19,代码来源:planView.php


示例10: initializeGui

function initializeGui(&$dbHandler, $argsObj, &$tplanMgr)
{
    $gui = new stdClass();
    $gui->title = lang_get('title_gen_test_rep');
    $gui->do_report = array();
    $gui->elapsed_time = 0;
    $mgr = new testproject($dbHandler);
    $dummy = $mgr->get_by_id($argsObj->tproject_id);
    $gui->testprojectOptions = new stdClass();
    $gui->testprojectOptions->testPriorityEnabled = $dummy['opt']->testPriorityEnabled;
    $gui->tproject_name = $dummy['name'];
    $info = $tplanMgr->get_by_id($argsObj->tplan_id);
    $gui->tplan_name = $info['name'];
    return $gui;
}
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:15,代码来源:dcnTopN.php


示例11: init_args

/**
 * init_args
 *
 */
function init_args(&$dbHandler)
{
    // take care of proper escaping when magic_quotes_gpc is enabled
    $_REQUEST = strings_stripSlashes($_REQUEST);
    $iParams = array("requirement_id" => array(tlInputParameter::INT_N), "req_spec_id" => array(tlInputParameter::INT_N), "containerID" => array(tlInputParameter::INT_N), "reqDocId" => array(tlInputParameter::STRING_N, 0, 64), "req_title" => array(tlInputParameter::STRING_N, 0, 100), "scope" => array(tlInputParameter::STRING_N), "reqStatus" => array(tlInputParameter::STRING_N, 0, 1), "reqType" => array(tlInputParameter::STRING_N, 0, 1), "countReq" => array(tlInputParameter::INT_N), "expected_coverage" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 20), "req_id_cbox" => array(tlInputParameter::ARRAY_INT), "itemSet" => array(tlInputParameter::ARRAY_INT), "testcase_count" => array(tlInputParameter::ARRAY_INT), "req_version_id" => array(tlInputParameter::INT_N), "copy_testcase_assignment" => array(tlInputParameter::CB_BOOL), "relation_id" => array(tlInputParameter::INT_N), "relation_source_req_id" => array(tlInputParameter::INT_N), "relation_type" => array(tlInputParameter::STRING_N), "relation_destination_req_doc_id" => array(tlInputParameter::STRING_N, 0, 64), "relation_destination_testproject_id" => array(tlInputParameter::INT_N), "save_rev" => array(tlInputParameter::INT_N), "do_save" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N), "log_message" => array(tlInputParameter::STRING_N));
    $args = new stdClass();
    R_PARAMS($iParams, $args);
    $args->req_id = $args->requirement_id;
    $args->title = $args->req_title;
    $args->arrReqIds = $args->req_id_cbox;
    $args->basehref = $_SESSION['basehref'];
    $args->tproject_name = '';
    if ($args->tproject_id > 0) {
        $treeMgr = new tree($dbHandler);
        $dummy = $treeMgr->get_node_hierarchy_info($args->tproject_id);
        $args->tproject_name = $dummy['name'];
    }
    $args->user_id = isset($_SESSION['userID']) ? $_SESSION['userID'] : 0;
    $args->user = $_SESSION['currentUser'];
    // to avoid database errors with null value
    if (!is_numeric($args->expected_coverage)) {
        $args->expected_coverage = 0;
    }
    $uk = 'setting_refresh_tree_on_action';
    $args->refreshTree = testproject::getUserChoice($args->tproject_id, array('reqTreeRefreshOnAction'));
    $args->stay_here = isset($_REQUEST['stay_here']) ? 1 : 0;
    return $args;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:32,代码来源:reqEdit.php


示例12: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, $argsObj)
{
    $tproject_mgr = new testproject($dbHandler);
    $req_mgr = new requirement_mgr($dbHandler);
    $commandMgr = new reqCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->req_cfg = config_get('req_cfg');
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($dbHandler, "mgt_modify_req");
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->glueChar = config_get('testcase_cfg')->glue_character;
    $gui->pieceSep = config_get('gui_title_separator_1');
    $gui->item_id = $argsObj->item_id;
    // identify item is version or revision ?
    $node_type_id = $req_mgr->tree_mgr->get_available_node_types();
    $node_id_type = array_flip($node_type_id);
    $item = $req_mgr->tree_mgr->get_node_hierarchy_info($gui->item_id);
    // TICKET 4702
    // target_is is db id of item, item['id'] is the REQ ID.
    // for several logics we need to DB id (target_id)
    $info = null;
    switch ($node_id_type[$item['node_type_id']]) {
        case 'requirement_version':
            $info = $req_mgr->get_version($gui->item_id);
            $info['revision_id'] = -1;
            $info['target_id'] = $info['version_id'];
            break;
        case 'requirement_revision':
            $info = $req_mgr->get_revision($gui->item_id);
            $info['target_id'] = $info['revision_id'];
            break;
    }
    $gui->item = $info;
    $gui->cfields = $req_mgr->html_table_of_custom_field_values(null, $gui->item_id, $argsObj->tproject_id);
    $gui->show_title = false;
    $gui->main_descr = lang_get('req') . $gui->pieceSep . $gui->item['title'];
    $gui->showReqSpecTitle = $argsObj->showReqSpecTitle;
    if ($gui->showReqSpecTitle) {
        $gui->parent_descr = lang_get('req_spec_short') . $gui->pieceSep . $gui->item['req_spec_title'];
    }
    $gui->reqStatus = init_labels($gui->req_cfg->status_labels);
    $gui->reqTypeDomain = init_labels($gui->req_cfg->type_labels);
    return $gui;
}
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:49,代码来源:reqViewRevision.php


示例13: __construct

 function __construct(&$db, $tproject_id)
 {
     $this->db = $db;
     $this->reqSpecMgr = new requirement_spec_mgr($db);
     $this->reqMgr = new requirement_mgr($db);
     $this->treeMgr = $this->reqMgr->tree_mgr;
     $req_spec_cfg = config_get('req_spec_cfg');
     $this->reqSpecTypeDomain = init_labels($req_spec_cfg->type_labels);
     $this->commandMgr = new reqCommands($db);
     $this->submit_button_label = lang_get('btn_save');
     $this->getRequirementsOptions = array('order_by' => " ORDER BY NH_REQ.node_order ");
     $tproject_mgr = new testproject($this->db);
     $info = $tproject_mgr->get_by_id($tproject_id);
     if ($info['reqmgr_integration_enabled']) {
         $sysmgr = new tlReqMgrSystem($this->db);
         $rms = $sysmgr->getInterfaceObject($tproject_id);
         $this->reqMgrSystem = $sysmgr->getLinkedTo($tproject_id);
         unset($sysmgr);
     }
 }
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:20,代码来源:reqSpecCommands.class.php


示例14: initializeGui

function initializeGui(&$dbHandler, &$argsObj)
{
    $tproject_mgr = new testproject($dbHandler);
    $gui = new stdClass();
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tprojectID) . config_get('testcase_cfg')->glue_character;
    $gui->mainCaption = lang_get('testproject') . " " . $argsObj->tprojectName;
    $gui->importance = config_get('testcase_importance_default');
    $gui->creation_date_from = null;
    $gui->creation_date_to = null;
    $gui->modification_date_from = null;
    $gui->modification_date_to = null;
    $gui->search_important_notice = sprintf(lang_get('search_important_notice'), $argsObj->tprojectName);
    $gui->design_cf = $tproject_mgr->cfield_mgr->get_linked_cfields_at_design($argsObj->tprojectID, cfield_mgr::ENABLED, null, 'testcase');
    $gui->keywords = $tproject_mgr->getKeywords($argsObj->tprojectID);
    $gui->filter_by['design_scope_custom_fields'] = !is_null($gui->design_cf);
    $gui->filter_by['keyword'] = !is_null($gui->keywords);
    $reqSpecSet = $tproject_mgr->genComboReqSpec($argsObj->tprojectID);
    $gui->filter_by['requirement_doc_id'] = !is_null($reqSpecSet);
    $gui->option_importance = array(0 => '', HIGH => lang_get('high_importance'), MEDIUM => lang_get('medium_importance'), LOW => lang_get('low_importance'));
    return $gui;
}
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:21,代码来源:tcSearchForm.php


示例15: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, &$argsObj)
{
    $req_spec_mgr = new requirement_spec_mgr($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler, $argsObj->tproject_id);
    $gui = $commandMgr->initGuiBean();
    $gui->refreshTree = $argsObj->refreshTree;
    $gui->req_spec_cfg = config_get('req_spec_cfg');
    $gui->req_cfg = config_get('req_cfg');
    $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req");
    $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
    $gui->revCount = $req_spec_mgr->getRevisionsCount($argsObj->req_spec_id);
    $gui->req_spec_id = intval($argsObj->req_spec_id);
    $gui->parentID = $argsObj->req_spec_id;
    $gui->req_spec_revision_id = $gui->req_spec['revision_id'];
    $gui->name = $gui->req_spec['title'];
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title'];
    $gui->refresh_tree = 'no';
    $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($gui->req_spec_id, $gui->req_spec_revision_id, $argsObj->tproject_id);
    $gui->attachments = getAttachmentInfosFrom($req_spec_mgr, $argsObj->req_spec_id);
    $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id);
    $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels);
    $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']);
    $gui->fileUploadURL = $_SESSION['basehref'] . $req_spec_mgr->getFileUploadRelativeURL($gui->req_spec_id);
    $gui->delAttachmentURL = $_SESSION['basehref'] . $req_spec_mgr->getDeleteAttachmentRelativeURL($gui->req_spec_id);
    $gui->fileUploadMsg = '';
    $gui->import_limit = TL_REPOSITORY_MAXFILESIZE;
    $gui->btn_import_req_spec = '';
    $gui->reqMgrSystemEnabled = 0;
    if (!is_null($reqMgrSystem = $commandMgr->getReqMgrSystem())) {
        $gui->btn_import_req_spec = sprintf(lang_get('importViaAPI'), $reqMgrSystem['reqmgrsystem_name']);
        $gui->reqMgrSystemEnabled = 1;
    }
    return $gui;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:43,代码来源:reqSpecView.php


示例16: init_args

function init_args(&$dbHandler)
{
    $args = new stdClass();
    $treeMgr = new tree($dbHandler);
    $tprojectMgr = new testproject($dbHandler);
    $args->tproject_name = '';
    $args->tproject_options = new stdClass();
    $args->tproject_options->testPriorityEnabled = 0;
    $args->tproject_id = isset($_REQUEST['tproject_id']) ? intval($_REQUEST['tproject_id']) : 0;
    if ($args->tproject_id > 0) {
        $info = $tprojectMgr->get_by_id($args->tproject_id);
        $args->tproject_name = $info['name'];
        $args->tproject_options = $info['opt'];
    }
    $args->tplan_name = '';
    $args->tplan_id = isset($_REQUEST['tplan_id']) ? intval($_REQUEST['tplan_id']) : 0;
    if ($args->tplan_id > 0) {
        $info = $treeMgr->get_node_hierarchy_info($args->tplan_id);
        $args->tplan_name = $info['name'];
    }
    return $args;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:22,代码来源:planMilestonesView.php


示例17: initEnv

function initEnv(&$dbHandler)
{
    $args = init_args();
    $gui = new stdClass();
    $gui->bugIDMaxLength = 0;
    $gui->createIssueURL = null;
    $gui->issueTrackerVerboseID = '';
    $gui->issueTrackerVerboseType = '';
    $gui->tproject_id = $args->tproject_id;
    // get issue tracker config and object to manage TestLink - BTS integration
    $its = null;
    $tprojectMgr = new testproject($dbHandler);
    list($issueTrackerEnabled, $its) = $tprojectMgr->getIssueTrackerMgr($args->tproject_id);
    if ($issueTrackerEnabled) {
        if (!is_null($its)) {
            $gui->issueTrackerVerboseType = $issueT['verboseType'];
            $gui->issueTrackerVerboseID = $issueT['issuetracker_name'];
            $gui->bugIDMaxLength = $its->getBugIDMaxLength();
            $gui->createIssueURL = $its->getEnterBugURL();
        }
    }
    return array($args, $gui);
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:23,代码来源:bugAdd.php


示例18: setUserSession

/**
 * set session data after modification or authorization
 *
 * @param resource &$db reference to DB identifier
 * @param string $user
 * @param integer $id
 * @param integer $roleID 
 * @param string $email 
 * @param string $locale [default = null]
 * @param boolean $active [default = null] documentation
 * 
 * @return integer status code
 * 
 * @TODO havlatm: move to tlSession class
 * @TODO fix return functionality
 **/
function setUserSession(&$db, $user, $id, $roleID, $email, $locale = null, $active = null)
{
    tLog('setUserSession: $user=' . $user . ' $id=' . $id . ' $roleID=' . $roleID . ' $email=' . $email . ' $locale=' . $locale);
    $_SESSION['userID'] = $id;
    $_SESSION['testprojectID'] = null;
    $_SESSION['s_lastAttachmentList'] = null;
    if (!is_null($locale)) {
        $_SESSION['locale'] = $locale;
        set_dt_formats();
    }
    $tproject_mgr = new testproject($db);
    $gui_cfg = config_get('gui');
    $order_by = $gui_cfg->tprojects_combo_order_by;
    $arrProducts = $tproject_mgr->get_accessible_for_user($id, 'map', $order_by);
    // 20051208 - JBA - added to set the lastProduct the user has selected before logging off.
    $tproject_cookie = 'TL_lastTestProjectForUserID_' . $id;
    if (isset($_COOKIE[$tproject_cookie])) {
        if (isset($arrProducts[$_COOKIE[$tproject_cookie]]) && $arrProducts[$_COOKIE[$tproject_cookie]]) {
            $_SESSION['testprojectID'] = $_COOKIE[$tproject_cookie];
            tLog('Cookie: {$tproject_cookie}=' . $_SESSION['testprojectID']);
        }
    }
    if (!$_SESSION['testprojectID']) {
        $tpID = null;
        if (sizeof($arrProducts)) {
            $tpID = key($arrProducts);
        }
        $_SESSION['testprojectID'] = $tpID;
    }
    // Validation is done in navBar.php
    $tplan_cookie = 'TL_lastTestPlanForUserID_' . $id;
    if (isset($_COOKIE[$tplan_cookie])) {
        $_SESSION['testplanID'] = $_COOKIE[$tplan_cookie];
        tLog("Cookie: {$tplan_cookie}=" . $_SESSION['testplanID']);
    }
    return 1;
}
开发者ID:tamtrong,项目名称:testlink,代码行数:53,代码来源:users.inc.php


示例19: init_args

/**
 * initialize user input
 * 
 * @param resource dbHandler
 * @return array $args array with user input information
 */
function init_args(&$dbHandler)
{
    $iParams = array("apikey" => array(tlInputParameter::STRING_N, 0, 64), "tproject_id" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N), "format" => array(tlInputParameter::INT_N));
    $args = new stdClass();
    $pParams = R_PARAMS($iParams, $args);
    if (!is_null($args->apikey)) {
        $cerbero = new stdClass();
        $cerbero->args = new stdClass();
        $cerbero->args->tproject_id = $args->tproject_id;
        $cerbero->args->tplan_id = $args->tplan_id;
        if (strlen($args->apikey) == 32) {
            $cerbero->args->getAccessAttr = true;
            $cerbero->method = 'checkRights';
            $cerbero->redirect_target = "../../login.php?note=logout";
            setUpEnvForRemoteAccess($dbHandler, $args->apikey, $cerbero);
        } else {
            $args->addOpAccess = false;
            $cerbero->method = null;
            $cerbero->args->getAccessAttr = false;
            setUpEnvForAnonymousAccess($dbHandler, $args->apikey, $cerbero);
        }
    } else {
        testlinkInitPage($dbHandler, false, false, "checkRights");
        $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
    }
    $tproject_mgr = new testproject($dbHandler);
    $tplan_mgr = new testplan($dbHandler);
    if ($args->tproject_id > 0) {
        $args->tproject_info = $tproject_mgr->get_by_id($args->tproject_id);
        $args->tproject_name = $args->tproject_info['name'];
        $args->tproject_description = $args->tproject_info['notes'];
    }
    if  

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP text类代码示例发布时间:2022-05-23
下一篇:
PHP testplan类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap