コード例 #1
0
     $f_os = gpc_get_string('os');
     $f_os_build = gpc_get_string('os_build');
     $f_description = gpc_get_string('description');
     if (profile_is_global($f_profile_id)) {
         access_ensure_global_level(config_get('manage_global_profile_threshold'));
         profile_update(ALL_USERS, $f_profile_id, $f_platform, $f_os, $f_os_build, $f_description);
         form_security_purge('profile_update');
         print_header_redirect('manage_prof_menu_page.php');
     } else {
         profile_update(auth_get_current_user_id(), $f_profile_id, $f_platform, $f_os, $f_os_build, $f_description);
         form_security_purge('profile_update');
         print_header_redirect('account_prof_menu_page.php');
     }
     break;
 case 'delete':
     if (profile_is_global($f_profile_id)) {
         access_ensure_global_level(config_get('manage_global_profile_threshold'));
         profile_delete(ALL_USERS, $f_profile_id);
         form_security_purge('profile_update');
         print_header_redirect('manage_prof_menu_page.php');
     } else {
         profile_delete(auth_get_current_user_id(), $f_profile_id);
         form_security_purge('profile_update');
         print_header_redirect('account_prof_menu_page.php');
     }
     break;
 case 'make_default':
     current_user_set_pref('default_profile', $f_profile_id);
     form_security_purge('profile_update');
     print_header_redirect('account_prof_menu_page.php');
     break;
コード例 #2
0
ファイル: bug_report.php プロジェクト: fur81/zofaxiopeu
$t_bug_data->additional_information = gpc_get_string('additional_info', config_get('default_bug_additional_info'));
$t_bug_data->due_date = gpc_get_string('due_date', '');
if (is_blank($t_bug_data->due_date)) {
    $t_bug_data->due_date = date_get_null();
}
$f_files = gpc_get_file('ufile', null);
/** @todo (thraxisp) Note that this always returns a structure */
$f_report_stay = gpc_get_bool('report_stay', false);
$f_copy_notes_from_parent = gpc_get_bool('copy_notes_from_parent', false);
$f_copy_attachments_from_parent = gpc_get_bool('copy_attachments_from_parent', false);
if (access_has_project_level(config_get('roadmap_update_threshold'), $t_bug_data->project_id)) {
    $t_bug_data->target_version = gpc_get_string('target_version', '');
}
# if a profile was selected then let's use that information
if (0 != $t_bug_data->profile_id) {
    if (profile_is_global($t_bug_data->profile_id)) {
        $row = user_get_profile_row(ALL_USERS, $t_bug_data->profile_id);
    } else {
        $row = user_get_profile_row($t_bug_data->reporter_id, $t_bug_data->profile_id);
    }
    if (is_blank($t_bug_data->platform)) {
        $t_bug_data->platform = $row['platform'];
    }
    if (is_blank($t_bug_data->os)) {
        $t_bug_data->os = $row['os'];
    }
    if (is_blank($t_bug_data->os_build)) {
        $t_bug_data->os_build = $row['os_build'];
    }
}
helper_call_custom_function('issue_create_validate', array($t_bug_data));