/** * * */ function init_args() { $iParams = array("delete" => array(tlInputParameter::INT_N), "user" => array(tlInputParameter::INT_N), "user_id" => array(tlInputParameter::INT_N), "rights_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 30), "firstName" => array(tlInputParameter::STRING_N, 0, 30), "lastName" => array(tlInputParameter::STRING_N, 0, 100), "emailAddress" => array(tlInputParameter::STRING_N, 0, 100), "locale" => array(tlInputParameter::STRING_N, 0, 10), "login" => array(tlInputParameter::STRING_N, 0, 30), "password" => array(tlInputParameter::STRING_N, 0, 32), "user_is_active" => array(tlInputParameter::CB_BOOL)); $args = new stdClass(); R_PARAMS($iParams, $args); return $args; }
function init_args() { $iParams = array("exec_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 100), "notes" => array(tlInputParameter::STRING_N)); $args = new stdClass(); R_PARAMS($iParams, $args); return $args; }
function init_args(&$dbHandler) { $iParams = array("apikey" => array(tlInputParameter::STRING_N, 32, 64), "tproject_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; 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; setUpEnvForAnonymousAccess($dbHandler, $args->apikey, $cerbero); } } else { testlinkInitPage($dbHandler, true, false, "checkRights"); $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0; } if ($args->tproject_id <= 0) { $msg = __FILE__ . '::' . __FUNCTION__ . " :: Invalid Test Project ID ({$args->tproject_id})"; throw new Exception($msg); } if (is_null($args->format)) { tlog("Parameter 'format' is not defined", 'ERROR'); exit; } $args->user = $_SESSION['currentUser']; return $args; }
/** * * */ 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)); $args = new stdClass(); 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, true, false, "checkRights"); $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0; } return $args; }
function init_args() { $iParams = array("exec_id" => array(tlInputParameter::INT_N), "readonly" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); return $args; }
/** * * */ function init_args() { $pwdInputLen = config_get('loginPagePasswordMaxLenght'); // 2010904 - eloff - Why is req and reqURI parameters to the login? $iParams = array("note" => array(tlInputParameter::STRING_N, 0, 255), "tl_login" => array(tlInputParameter::STRING_N, 0, 30), "tl_password" => array(tlInputParameter::STRING_N, 0, $pwdInputLen), "req" => array(tlInputParameter::STRING_N, 0, 4000), "reqURI" => array(tlInputParameter::STRING_N, 0, 4000), "action" => array(tlInputParameter::STRING_N, 0, 10), "destination" => array(tlInputParameter::STRING_N, 0, 255), "loginform_token" => array(tlInputParameter::STRING_N, 0, 255)); $pParams = R_PARAMS($iParams); $args = new stdClass(); $args->note = $pParams['note']; $args->login = $pParams['tl_login']; $args->pwd = $pParams['tl_password']; $args->reqURI = urlencode($pParams['req']); $args->preqURI = urlencode($pParams['reqURI']); $args->destination = urldecode($pParams['destination']); $args->loginform_token = urldecode($pParams['loginform_token']); if ($pParams['action'] == 'ajaxcheck' || $pParams['action'] == 'ajaxlogin') { $args->action = $pParams['action']; } else { if (!is_null($args->login)) { $args->action = 'doLogin'; } else { $args->action = 'loginform'; } } return $args; }
/** * init_args() * */ function init_args() { $iParams = array("key" => array(tlInputParameter::STRING_N), "refreshTree" => array(tlInputParameter::INT_N)); $args = new stdClass(); $pParams = R_PARAMS($iParams, $args); return $args; }
/** * */ function init_args() { $iParams = array("id" => array(tlInputParameter::INT_N), "req_id" => array(tlInputParameter::ARRAY_INT), "req" => array(tlInputParameter::INT_N), "showCloseButton" => array(tlInputParameter::STRING_N, 0, 1), "doAction" => array(tlInputParameter::STRING_N, 0, 100), "edit" => array(tlInputParameter::STRING_N, 0, 100), "unassign" => array(tlInputParameter::STRING_N, 0, 1), "assign" => array(tlInputParameter::STRING_N, 0, 1), "form_token" => array(tlInputParameter::INT_N), "idSRS" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); // take care of proper escaping when magic_quotes_gpc is enabled $_REQUEST = strings_stripSlashes($_REQUEST); $args->idReqSpec = null; $args->idReq = $args->req; $args->reqIdSet = $args->req_id; $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0; $args->tcaseSet = null; if (isset($_SESSION['edit_mode'][$args->form_token]['testcases_to_show'])) { $args->tcaseSet = $_SESSION['edit_mode'][$args->form_token]['testcases_to_show']; } if (is_null($args->doAction)) { $args->doAction = $args->unassign != "" ? "unassign" : null; } if (is_null($args->doAction)) { $args->doAction = $args->assign != "" ? "assign" : null; } if ($args->idSRS) { $args->idReqSpec = $args->idSRS; $_SESSION['currentSrsId'] = $args->idReqSpec; } else { if (isset($_SESSION['currentSrsId']) && intval($_SESSION['currentSrsId']) > 0) { $args->idReqSpec = intval($_SESSION['currentSrsId']); } } $args->user = $_SESSION['currentUser']; return $args; }
function init_args() { $iParams = array("help" => array(tlInputParameter::STRING_N), "locale" => array(tlInputParameter::STRING_N, 0, 10)); $args = new stdClass(); $pParams = R_PARAMS($iParams, $args); return $args; }
/** * */ function initEnv(&$dbHandler) { $_REQUEST = strings_stripSlashes($_REQUEST); // input from GET['HelloString3'], // type: string, // minLen: 1, // maxLen: 15, // regular expression: null // checkFunction: applys checks via checkFooOrBar() to ensure its either 'foo' or 'bar' // normalization: done via normFunction() which replaces ',' with '.' // "HelloString3" => array("GET",tlInputParameter::STRING_N,1,15,'checkFooOrBar','normFunction'), // $iParams = array("operation" => array(tlInputParameter::STRING_N, 0, 50), "user" => array(tlInputParameter::INT_N)); $pParams = R_PARAMS($iParams); $args = new stdClass(); $args->operation = $pParams["operation"]; $args->user_id = $pParams['user']; $args->currentUser = $_SESSION['currentUser']; $args->currentUserID = $_SESSION['currentUser']->dbID; $args->basehref = $_SESSION['basehref']; $gui = new stdClass(); $gui->grants = getGrantsForUserMgmt($dbHandler, $args->currentUser); $gui->result = null; $gui->action = null; $gui->user_feedback = ''; $gui->basehref = $args->basehref; return array($args, $gui); }
/** * 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; }
/** * 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; }
function init_args() { $iParams = array("exec_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 100), "notes" => array(tlInputParameter::STRING_N), "tcversion_id" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); $args->basehref = $_SESSION['basehref']; return $args; }
/** * * */ function init_args() { $_REQUEST = strings_stripSlashes($_REQUEST); $iParams = array("machineID" => array(tlInputParameter::INT_N), "machineOwner" => array(tlInputParameter::INT_N), "machineName" => array(tlInputParameter::STRING_N, 0, 255), "machineIp" => array(tlInputParameter::STRING_N, 0, 50), "machineNotes" => array(tlInputParameter::STRING_N, 0, 2000), "machinePurpose" => array(tlInputParameter::STRING_N, 0, 2000), "machineHw" => array(tlInputParameter::STRING_N, 0, 2000), "tproject_id" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); return $args; }
/** * @return object returns the arguments for the page */ function init_args() { $iParams = array("roleid" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 100)); $args = new stdClass(); $pParams = R_PARAMS($iParams, $args); $args->currentUser = $_SESSION['currentUser']; return $args; }
function init_args() { $_REQUEST = strings_stripSlashes($_REQUEST); $iParams = array("machineID" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); $args->userId = $_SESSION['userID']; return $args; }
/** * * */ function init_args() { $iParams = array("delete" => array(tlInputParameter::INT_N), "user" => array(tlInputParameter::INT_N), "user_id" => array(tlInputParameter::INT_N), "role_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 30), "firstName" => array(tlInputParameter::STRING_N, 0, 30), "lastName" => array(tlInputParameter::STRING_N, 0, 100), "emailAddress" => array(tlInputParameter::STRING_N, 0, 100), "locale" => array(tlInputParameter::STRING_N, 0, 10), "login" => array(tlInputParameter::STRING_N, 0, 30), "password" => array(tlInputParameter::STRING_N, 0, 32), "user_is_active" => array(tlInputParameter::CB_BOOL)); $args = new stdClass(); R_PARAMS($iParams, $args); // BUGID 4066 - take care of proper escaping when magic_quotes_gpc is enabled $_REQUEST = strings_stripSlashes($_REQUEST); return $args; }
function init_args() { $args = new stdClass(); $_REQUEST = strings_stripSlashes($_REQUEST); $iParams = array("doAction" => array(tlInputParameter::STRING_N, 0, 50), "export_filename" => array(tlInputParameter::STRING_N, 0, 100), "tproject_id" => array(tlInputParameter::INT_N), "goback_url" => array(tlInputParameter::STRING_N, 0, 2048)); R_PARAMS($iParams, $args); $args->userID = $_SESSION['userID']; return $args; }
/** * */ function init_args() { $iParams = array("req_spec_id" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); $args->tproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0; $args->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : null; return $args; }
function init_args() { $iParams = array("exec_id" => array(tlInputParameter::INT_N), "readonly" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); // BUGID 4066 - take care of proper escaping when magic_quotes_gpc is enabled $_REQUEST = strings_stripSlashes($_REQUEST); return $args; }
function init_args() { $args = new stdClass(); $_REQUEST = strings_stripSlashes($_REQUEST); $iParams = array("tcase_id" => array(tlInputParameter::INT_N)); $pParams = R_PARAMS($iParams); $args = new stdClass(); $args->tcase_id = intval($pParams["tcase_id"]); return $args; }
/** * */ function init_args() { $args = new stdClass(); $iParams = array("doAction" => array(tlInputParameter::STRING_N, 0, 50)); R_PARAMS($iParams, $args); $args->userID = $_SESSION['userID']; $args->testproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0; $args->testproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : ''; return $args; }
function init_args() { $iParams = array("exec_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 100), "notes" => array(tlInputParameter::STRING_N), "tcversion_id" => array(tlInputParameter::INT_N), "tplan_id" => array(tlInputParameter::INT_N), "tproject_id" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); $args->basehref = $_SESSION['basehref']; // BUGID 4066 - take care of proper escaping when magic_quotes_gpc is enabled $_REQUEST = strings_stripSlashes($_REQUEST); return $args; }
function init_args() { $iParams = array('message' => array(tlInputParameter::STRING_N, 0, 255)); $pParams = R_PARAMS($iParams); $args = new stdClass(); if (isset($pParams['message'])) { $args->message = $pParams['message']; } return $args; }
/** * */ function init_args() { $iParams = array("item_id" => array(tlInputParameter::INT_N), "showReqSpecTitle" => array(tlInputParameter::INT_N)); $args = new stdClass(); R_PARAMS($iParams, $args); $args->tproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0; $args->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : null; $user = $_SESSION['currentUser']; $args->userID = $user->dbID; return $args; }
function init_args() { $args = new stdClass(); $_REQUEST = strings_stripSlashes($_REQUEST); $iParams = array("doAction" => array(tlInputParameter::STRING_N, 0, 50), "export_filename" => array(tlInputParameter::STRING_N, 0, 100), "goback_url" => array(tlInputParameter::STRING_N, 0, 2048)); R_PARAMS($iParams, $args); // $args->doAction = isset($_REQUEST['doAction']) ? $_REQUEST['doAction'] : null; // $args->export_filename=isset($_REQUEST['export_filename']) ? $_REQUEST['export_filename'] : null; // $args->goback_url = isset($_REQUEST['goback_url']) ? $_REQUEST['goback_url'] : null; $args->userID = $_SESSION['userID']; return $args; }
/** * */ function init_args() { $argsObj = new stdClass(); $_REQUEST = strings_stripSlashes($_REQUEST); $iParams = array("importType" => array(tlInputParameter::STRING_N, 0, 5), "req_spec_id" => array(tlInputParameter::INT_N), "doAction" => array(tlInputParameter::STRING_N, 0, 20)); R_PARAMS($iParams, $argsObj); $argsObj->doAction = $argsObj->doAction == '' ? 'askFileName' : $argsObj->doAction; $argsObj->userID = intval($_SESSION['userID']); $argsObj->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0; $argsObj->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : null; return $argsObj; }
/** * */ function init_args() { $args = new stdClass(); $iParams = array("doAction" => array(tlInputParameter::STRING_N, 0, 50), "export_filename" => array(tlInputParameter::STRING_N, 0, 255)); R_PARAMS($iParams, $args); $args->testproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0; $args->testproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : ''; if (is_null($args->export_filename)) { $args->export_filename = $args->testproject_name . "-platforms.xml"; } $args->export_filename = trim(str_ireplace(" ", "", $args->export_filename)); return $args; }
/** * */ function init_args() { // BUGID 1748 $iParams = array("requirement_id" => array(tlInputParameter::INT_N), "showReqSpecTitle" => array(tlInputParameter::INT_N), "relation_add_result_msg" => array(tlInputParameter::STRING_N)); $args = new stdClass(); R_PARAMS($iParams, $args); $args->req_id = $args->requirement_id; $args->tproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0; $args->tproject_name = isset($_SESSION['testprojectName']) ? $_SESSION['testprojectName'] : null; $user = $_SESSION['currentUser']; $args->userID = $user->dbID; return $args; }
function init_args(&$dbHandler) { $_REQUEST = strings_stripSlashes($_REQUEST); $args = new stdClass(); $iParams = array("doAction" => array(tlInputParameter::STRING_N, 0, 50), "export_filename" => array(tlInputParameter::STRING_N, 0, 255), "exportType" => array(tlInputParameter::STRING_N, 0, 255), "tproject_id" => array(tlInputParameter::INT_N)); R_PARAMS($iParams, $args); $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']; } return $args; }