Skip to content

Commit

Permalink
Print Handler for Categories in a standard way
Browse files Browse the repository at this point in the history
The user assigned to a Global or Project-specific Category as default
handler was printed in a non-standard way. We now use function
prepare_user_name() to display it instead.

Fixes #13344
  • Loading branch information
dregad committed Sep 22, 2011
1 parent 8163d2b commit 9c1dce1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
13 changes: 3 additions & 10 deletions manage_proj_edit_page.php
Expand Up @@ -281,18 +281,11 @@

foreach ( $t_categories as $t_category ) {
$t_id = $t_category['id'];
$t_inherited = ( $t_category['project_id'] != $f_project_id ? true : false );

$t_name = $t_category['name'];
if ( NO_USER != $t_category['user_id'] && user_exists( $t_category['user_id'] )) {
$t_user_name = user_get_name( $t_category['user_id'] );
} else {
$t_user_name = '';
} ?>
$t_inherited = ( $t_category['project_id'] != $f_project_id );

<tr <?php echo helper_alternate_class() ?>>
<td><?php echo string_display( category_full_name( $t_category['id'] , /* showProject */ $t_inherited, $f_project_id ) ) ?></td>
<td><?php echo string_display_line( $t_user_name ) ?></td>
<td><?php echo string_display( category_full_name( $t_id, /* showProject */ $t_inherited, $f_project_id ) ) ?></td>
<td><?php echo prepare_user_name( $t_category['user_id'] ) ?></td>
<td class="center">
<?php if ( !$t_inherited ) {
$t_id = urlencode( $t_id );
Expand Down
11 changes: 2 additions & 9 deletions manage_proj_page.php
Expand Up @@ -175,16 +175,9 @@
foreach ( $t_categories as $t_category ) {
$t_id = $t_category['id'];

$t_name = $t_category['name'];
if ( NO_USER != $t_category['user_id'] && user_exists( $t_category['user_id'] )) {
$t_user_name = user_get_name( $t_category['user_id'] );
} else {
$t_user_name = '';
} ?>

<tr <?php echo helper_alternate_class() ?>>
<td><?php echo string_display( category_full_name( $t_category['id'], false ) ) ?></td>
<td><?php echo string_display_line( $t_user_name ) ?></td>
<td><?php echo string_display( category_full_name( $t_id, false ) ) ?></td>
<td><?php echo prepare_user_name( $t_category['user_id'] ) ?></td>
<td class="center">
<?php
$t_id = urlencode( $t_id );
Expand Down

0 comments on commit 9c1dce1

Please sign in to comment.