Esempio n. 1
0
function initializeGui(&$dbHandler, &$argsObj, $orderBy)
{
    $guiObj = new stdClass();
    $guiObj->highlight = initialize_tabsmenu();
    $guiObj->highlight->view_users = 1;
    $guiObj->update_title_bar = 0;
    $guiObj->reload = 0;
    $guiObj->user_order_by = $argsObj->user_order_by;
    $guiObj->order_by_role_dir = $argsObj->order_by_dir['order_by_role_dir'];
    $guiObj->order_by_login_dir = $argsObj->order_by_dir['order_by_login_dir'];
    $guiObj->checked_hide_inactive_users = $argsObj->checked_hide_inactive_users;
    $guiObj->base_href = $argsObj->basehref;
    $guiObj->body_onload = $argsObj->body_onload;
    $guiObj->role_colour = tlRole::getRoleColourCfg($dbHandler);
    $guiObj->users = tlUser::getAllUsersRoles($dbHandler, get_order_by_clause($orderBy));
    $guiObj->grants = $argsObj->currentUser->getGrantsForUserMgmt($dbHandler, $argsObj->tproject_id);
    $guiObj->tproject_id = $argsObj->tproject_id;
    return $guiObj;
}
function initializeGui(&$dbHandler, $argsObj)
{
    $gui = new stdClass();
    $gui->highlight = initialize_tabsmenu();
    $gui->user_feedback = '';
    $gui->no_features = '';
    $gui->roles_updated = '';
    $gui->tproject_name = $argsObj->testprojectName;
    $gui->featureType = $argsObj->featureType;
    $gui->optRights = tlRole::getAll($dbHandler, null, null, null, tlRole::TLOBJ_O_GET_DETAIL_MINIMUM);
    $gui->features = null;
    $gui->featureID = null;
    $gui->role_colour = null;
    $guiCfg = config_get('gui');
    if ($guiCfg->usersAssignGlobalRoleColoring == ENABLED) {
        $gui->role_colour = tlRole::getRoleColourCfg($dbHandler);
    }
    return $gui;
}
Esempio n. 3
0
$tprojectMgr = new testproject($db);
$tplanMgr = new testplan($db);
$args = init_args();
$gui = new stdClass();
$gui->highlight = initialize_tabsmenu();
$gui->user_feedback = '';
$gui->no_features = '';
$gui->roles_updated = '';
$gui->tproject_name = $args->testprojectName;
$gui->optRights = tlRole::getAll($db, null, null, null, tlRole::TLOBJ_O_GET_DETAIL_MINIMUM);
$gui->features = null;
$gui->featureType = $args->featureType;
$gui->featureID = null;
$gui->role_colour = null;
if ($guiCfg->usersAssignGlobalRoleColoring == ENABLED) {
    $gui->role_colour = tlRole::getRoleColourCfg($db);
}
$target = new stdClass();
$target->testprojectID = null;
$target->testplanID = null;
switch ($args->featureType) {
    case "testproject":
        $gui->highlight->assign_users_tproject = 1;
        $gui->roles_updated = lang_get("test_project_user_roles_updated");
        $gui->not_for_you = lang_get("testproject_roles_assign_disabled");
        $assignRolesFor = $args->featureType;
        $target->testprojectID = $args->featureID > 0 ? $args->featureID : null;
        $featureMgr =& $tprojectMgr;
        break;
    case "testplan":
        $gui->highlight->assign_users_tplan = 1;