From bff36aff852e6cba073faf334ba6c762193ba360 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Fri, 26 Mar 2021 00:10:46 +0100 Subject: [PATCH] Remove unused print_project_user_list() API The logic is now handled directly in manage_user_edit_page.php, so this function is no longer necessary. Issue #28122 --- core/print_api.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/core/print_api.php b/core/print_api.php index a8a7d482b1..dbf773d4cc 100644 --- a/core/print_api.php +++ b/core/print_api.php @@ -1188,30 +1188,6 @@ function print_project_user_list_option_list2( $p_user_id ) { } } -/** - * list of projects that a user is in - * @param integer $p_user_id An user identifier. - * @param boolean $p_include_remove_link Whether to display remove link. - * @return void - */ -function print_project_user_list( $p_user_id, $p_include_remove_link = true ) { - $t_projects = user_get_assigned_projects( $p_user_id ); - - foreach( $t_projects as $t_project_id=>$t_project ) { - $t_project_name = string_attribute( $t_project['name'] ); - $t_view_state = $t_project['view_state']; - $t_access_level = $t_project['access_level']; - $t_access_level = get_enum_element( 'access_levels', $t_access_level ); - $t_view_state = get_enum_element( 'project_view_state', $t_view_state ); - - echo $t_project_name . ' [' . $t_access_level . '] (' . $t_view_state . ')'; - if( $p_include_remove_link && access_has_project_level( config_get( 'project_user_threshold' ), $t_project_id ) ) { - html_button( 'manage_user_proj_delete.php', lang_get( 'remove_link' ), array( 'project_id' => $t_project_id, 'user_id' => $p_user_id ) ); - } - echo '
'; - } -} - /** * List of projects with which the specified field id is linked. * For every project, the project name is listed and then the list of custom