Skip to content

Commit

Permalink
Remove unused print_project_user_list() API
Browse files Browse the repository at this point in the history
The logic is now handled directly in manage_user_edit_page.php, so this
function is no longer necessary.

Issue #28122
  • Loading branch information
dregad committed Apr 4, 2021
1 parent 94f1060 commit bff36af
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions core/print_api.php
Expand Up @@ -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 '<br />';
}
}

/**
* 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
Expand Down

0 comments on commit bff36af

Please sign in to comment.