Skip to content

Commit 9c1dce1

Browse files
committedSep 22, 2011
Print Handler for Categories in a standard way
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
1 parent 8163d2b commit 9c1dce1

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed
 

‎manage_proj_edit_page.php

+3-10
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,11 @@
281281

282282
foreach ( $t_categories as $t_category ) {
283283
$t_id = $t_category['id'];
284-
$t_inherited = ( $t_category['project_id'] != $f_project_id ? true : false );
285-
286-
$t_name = $t_category['name'];
287-
if ( NO_USER != $t_category['user_id'] && user_exists( $t_category['user_id'] )) {
288-
$t_user_name = user_get_name( $t_category['user_id'] );
289-
} else {
290-
$t_user_name = '';
291-
} ?>
284+
$t_inherited = ( $t_category['project_id'] != $f_project_id );
292285

293286
<tr <?php echo helper_alternate_class() ?>>
294-
<td><?php echo string_display( category_full_name( $t_category['id'] , /* showProject */ $t_inherited, $f_project_id ) ) ?></td>
295-
<td><?php echo string_display_line( $t_user_name ) ?></td>
287+
<td><?php echo string_display( category_full_name( $t_id, /* showProject */ $t_inherited, $f_project_id ) ) ?></td>
288+
<td><?php echo prepare_user_name( $t_category['user_id'] ) ?></td>
296289
<td class="center">
297290
<?php if ( !$t_inherited ) {
298291
$t_id = urlencode( $t_id );

‎manage_proj_page.php

+2-9
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,9 @@
175175
foreach ( $t_categories as $t_category ) {
176176
$t_id = $t_category['id'];
177177

178-
$t_name = $t_category['name'];
179-
if ( NO_USER != $t_category['user_id'] && user_exists( $t_category['user_id'] )) {
180-
$t_user_name = user_get_name( $t_category['user_id'] );
181-
} else {
182-
$t_user_name = '';
183-
} ?>
184-
185178
<tr <?php echo helper_alternate_class() ?>>
186-
<td><?php echo string_display( category_full_name( $t_category['id'], false ) ) ?></td>
187-
<td><?php echo string_display_line( $t_user_name ) ?></td>
179+
<td><?php echo string_display( category_full_name( $t_id, false ) ) ?></td>
180+
<td><?php echo prepare_user_name( $t_category['user_id'] ) ?></td>
188181
<td class="center">
189182
<?php
190183
$t_id = urlencode( $t_id );

0 commit comments

Comments
 (0)
Please sign in to comment.