本文整理匯總了PHP中profile_is_global函數的典型用法代碼示例。如果您正苦於以下問題:PHP profile_is_global函數的具體用法?PHP profile_is_global怎麽用?PHP profile_is_global使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了profile_is_global函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: gpc_get_string
$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: gpc_get_string
$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));