From: Paul R. <pri...@us...> - 2004-08-01 22:25:25
|
Update of /cvsroot/mantisbt/mantisbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11045 Modified Files: bug_close.php bug_close_page.php bug_report.php bug_resolve.php bug_resolve_page.php bug_update.php bug_view_advanced_page.php bug_view_page.php config_defaults_inc.php print_all_bug_page_word.php print_bug_page.php Log Message: Updates for: 0004009: New custom field type "multiple select" Index: bug_resolve_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_resolve_page.php,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- bug_resolve_page.php 11 Jul 2004 13:24:29 -0000 1.41 +++ bug_resolve_page.php 1 Aug 2004 22:24:58 -0000 1.42 @@ -106,14 +106,7 @@ <?php echo lang_get_defaulted( $t_def['name'] ) ?> </td> <td> - <?php - $t_custom_field_value = custom_field_get_value( $t_id, $f_bug_id ); - if( CUSTOM_FIELD_TYPE_EMAIL == $t_def['type'] ) { - echo "<a href=\"mailto:$t_custom_field_value\">$t_custom_field_value</a>"; - } else { - echo $t_custom_field_value; - } - ?> + <?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?> </td> </tr> <?php Index: bug_close_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_close_page.php,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- bug_close_page.php 11 Jul 2004 13:24:28 -0000 1.33 +++ bug_close_page.php 1 Aug 2004 22:24:58 -0000 1.34 @@ -76,14 +76,7 @@ <?php echo lang_get_defaulted( $t_def['name'] ) ?> </td> <td> - <?php - $t_custom_field_value = custom_field_get_value( $t_id, $f_bug_id ); - if( CUSTOM_FIELD_TYPE_EMAIL == $t_def['type'] ) { - echo "<a href=\"mailto:$t_custom_field_value\">$t_custom_field_value</a>"; - } else { - echo $t_custom_field_value; - } - ?> + <?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?> </td> </tr> <?php Index: bug_update.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_update.php,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- bug_update.php 26 Jun 2004 14:05:42 -0000 1.63 +++ bug_update.php 1 Aug 2004 22:24:58 -0000 1.64 @@ -65,7 +65,8 @@ $t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug_data->project_id ); foreach( $t_related_custom_field_ids as $t_id ) { - $t_custom_field_value = gpc_get_string( "custom_field_$t_id", null ); + $t_def = custom_field_get_definition( $t_id ); + $t_custom_field_value = gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], null ); # Only update the field if it is posted if ( $t_custom_field_value === null ) { @@ -77,8 +78,7 @@ continue; } - $t_def = custom_field_get_definition( $t_id ); - if ( $t_def['require_update'] && ( gpc_get_string( "custom_field_$t_id", '' ) == '' ) ) { + if ( $t_def['require_update'] && ( gpc_get_custom_field( "custom_field_$t_id", '' ) == '' ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_EMPTY_FIELD, ERROR ); } Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v retrieving revision 1.187 retrieving revision 1.188 diff -u -d -r1.187 -r1.188 --- config_defaults_inc.php 1 Aug 2004 12:34:18 -0000 1.187 +++ config_defaults_inc.php 1 Aug 2004 22:24:58 -0000 1.188 @@ -1056,7 +1056,7 @@ $g_projection_enum_string = '10:none,30:tweak,50:minor fix,70:major rework,90:redesign'; $g_eta_enum_string = '10:none,20:< 1 day,30:2-3 days,40:< 1 week,50:< 1 month,60:> 1 month'; - $g_custom_field_type_enum_string = '0:string,1:numeric,2:float,3:enum,4:email'; + $g_custom_field_type_enum_string = '0:string,1:numeric,2:float,3:enum,4:email,5:checkbox,6:list,7:multiselection list'; ############################# # Mantis Javascript Variables Index: bug_view_advanced_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_view_advanced_page.php,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- bug_view_advanced_page.php 30 Jul 2004 22:27:49 -0000 1.59 +++ bug_view_advanced_page.php 1 Aug 2004 22:24:58 -0000 1.60 @@ -421,14 +421,7 @@ <?php echo lang_get_defaulted( $t_def['name'] ) ?> </td> <td colspan="5"> - <?php - $t_custom_field_value = custom_field_get_value( $t_id, $f_bug_id ); - if( CUSTOM_FIELD_TYPE_EMAIL == $t_def['type'] ) { - echo "<a href=\"mailto:$t_custom_field_value\">$t_custom_field_value</a>"; - } else { - echo $t_custom_field_value; - } - ?> + <?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?> </td> </tr> <?php Index: print_bug_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/print_bug_page.php,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- print_bug_page.php 16 Jul 2004 23:03:09 -0000 1.49 +++ print_bug_page.php 1 Aug 2004 22:24:59 -0000 1.50 @@ -242,12 +242,10 @@ ?> <tr class="print"> <td class="print-category"> - <?php echo $t_def['name'] ?>: + <?php echo lang_get_defaulted( $t_def['name'] ) ?>: </td> <td class="print" colspan="4"> - <?php - echo custom_field_get_value( $t_id, $f_bug_id ); - ?> + <?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?> </td> </tr> <?php Index: print_all_bug_page_word.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/print_all_bug_page_word.php,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- print_all_bug_page_word.php 16 Jul 2004 23:03:09 -0000 1.50 +++ print_all_bug_page_word.php 1 Aug 2004 22:24:59 -0000 1.51 @@ -281,12 +281,10 @@ ?> <tr class="print"> <td class="print-category"> - <?php echo $t_def['name'] ?>: + <?php echo lang_get_defaulted( $t_def['name'] ) ?>: </td> <td class="print" colspan="5"> - <?php - echo custom_field_get_value( $t_id, $v_id ); - ?> + <?php print_custom_field_value( $t_def, $t_id, $v_id ); ?> </td> </tr> <?php Index: bug_report.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_report.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- bug_report.php 26 Jun 2004 14:05:42 -0000 1.32 +++ bug_report.php 1 Aug 2004 22:24:58 -0000 1.33 @@ -84,11 +84,11 @@ $t_related_custom_field_ids = custom_field_get_linked_ids( $f_project_id ); foreach( $t_related_custom_field_ids as $t_id ) { $t_def = custom_field_get_definition( $t_id ); - if ( $t_def['require_report'] && ( gpc_get_string( "custom_field_$t_id", '' ) == '' ) ) { + if ( $t_def['require_report'] && ( gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], '' ) == '' ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_EMPTY_FIELD, ERROR ); } - if ( !custom_field_validate( $t_id, gpc_get_string( "custom_field_$t_id", $t_def['default_value'] ) ) ) { + if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ) ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); } @@ -123,7 +123,7 @@ } $t_def = custom_field_get_definition( $t_id ); - if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_string( "custom_field_$t_id", $t_def['default_value'] ) ) ) { + if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ) ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); } Index: bug_view_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_view_page.php,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- bug_view_page.php 30 Jul 2004 22:27:49 -0000 1.63 +++ bug_view_page.php 1 Aug 2004 22:24:58 -0000 1.64 @@ -302,14 +302,7 @@ <?php echo lang_get_defaulted( $t_def['name'] ) ?> </td> <td colspan="5"> - <?php - $t_custom_field_value = custom_field_get_value( $t_id, $f_bug_id ); - if( CUSTOM_FIELD_TYPE_EMAIL == $t_def['type'] ) { - echo "<a href=\"mailto:$t_custom_field_value\">$t_custom_field_value</a>"; - } else { - echo $t_custom_field_value; - } - ?> + <?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?> </td> </tr> <?php Index: bug_resolve.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_resolve.php,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- bug_resolve.php 26 Jun 2004 14:05:42 -0000 1.41 +++ bug_resolve.php 1 Aug 2004 22:24:58 -0000 1.42 @@ -41,11 +41,11 @@ $t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug_data->project_id ); foreach( $t_related_custom_field_ids as $t_id ) { $t_def = custom_field_get_definition( $t_id ); - if ( $t_def['require_resolve'] && ( gpc_get_string( "custom_field_$t_id", '' ) == '' ) ) { + if ( $t_def['require_resolve'] && ( gpc_get_custom_field( "custom_field_$t_id", '' ) == '' ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_EMPTY_FIELD, ERROR ); } - if ( !custom_field_validate( $t_id, gpc_get_string( "custom_field_$t_id", $t_def['default_value'] ) ) ) { + if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['default_value'] ) ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); } @@ -59,7 +59,7 @@ } $t_def = custom_field_get_definition( $t_id ); - if( !custom_field_set_value( $t_id, $f_bug_id, gpc_get_string( "custom_field_$t_id", $t_def['default_value'] ) ) ) { + if( !custom_field_set_value( $t_id, $f_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['default_value'] ) ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); } Index: bug_close.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_close.php,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- bug_close.php 26 Jun 2004 14:05:41 -0000 1.38 +++ bug_close.php 1 Aug 2004 22:24:58 -0000 1.39 @@ -31,11 +31,11 @@ $t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug_data->project_id ); foreach( $t_related_custom_field_ids as $t_id ) { $t_def = custom_field_get_definition( $t_id ); - if ( $t_def['require_close'] && ( gpc_get_string( "custom_field_$t_id", '' ) == '' ) ) { + if ( $t_def['require_close'] && ( gpc_get_custom_field( "custom_field_$t_id", '' ) == '' ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_EMPTY_FIELD, ERROR ); } - if ( !custom_field_validate( $t_id, gpc_get_string( "custom_field_$t_id", $t_def['default_value'] ) ) ) { + if ( !custom_field_validate( $t_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['default_value'] ) ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); } @@ -49,7 +49,7 @@ } $t_def = custom_field_get_definition( $t_id ); - if( !custom_field_set_value( $t_id, $f_bug_id, gpc_get_string( "custom_field_$t_id", $t_def['default_value'] ) ) ) { + if( !custom_field_set_value( $t_id, $f_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['default_value'] ) ) ) { error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) ); trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR ); } |