|
|
Choosing A Webhost: |
mantisbt/core print_api.php,1.135,1.136 html_api.php,1.168,1.169: msg#00032bug-tracking.mantis.cvs
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24034/core Modified Files: print_api.php html_api.php Log Message: Sort new status values into ascending order. They can be out of order if defaults are specified. Index: html_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/html_api.php,v retrieving revision 1.168 retrieving revision 1.169 diff -u -d -r1.168 -r1.169 --- html_api.php 28 May 2005 02:07:28 -0000 1.168 +++ html_api.php 11 Jun 2005 19:32:42 -0000 1.169 @@ -881,6 +881,12 @@ ( bug_get_field( $p_bug_id, 'reporter_id' ) == auth_get_current_user_id() && ( ON == config_get( 'allow_reporter_close' ) ) ) ); if ( count( $t_enum_list ) > 0 ) { + # resort the list into ascending order after noting the key from the first element (the default) + $t_default_arr = each( $t_enum_list ); + $t_default = $t_default_arr['key']; + ksort( $t_enum_list ); + reset( $t_enum_list ); + echo "<form method=\"post\" action=\"bug_change_status_page.php\">"; $t_button_text = lang_get( 'bug_status_to_button' ); @@ -888,7 +894,9 @@ echo " <select name=\"new_status\">"; # space at beginning of line is important foreach ( $t_enum_list as $key => $val ) { - echo "<option value=\"$key\">$val</option>"; + echo "<option value=\"$key\" "; + check_selected( $key, $t_default ); + echo ">$val</option>"; } echo '</select>'; Index: print_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/print_api.php,v retrieving revision 1.135 retrieving revision 1.136 diff -u -d -r1.135 -r1.136 --- print_api.php 28 May 2005 00:54:34 -0000 1.135 +++ print_api.php 11 Jun 2005 19:32:42 -0000 1.136 @@ -680,6 +680,9 @@ $t_enum_list = get_status_option_list( $t_current_auth, $p_current_value, true, $p_allow_close ); if ( count( $t_enum_list ) > 0 ) { + # resort the list into ascending order + ksort( $t_enum_list ); + reset( $t_enum_list ); echo '<select name="' . $p_select_label . '">'; foreach ( $t_enum_list as $key => $val ) { echo "<option value=\"$key\""; ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | web directory.php,1.28,1.29, Victor Boctor |
|---|---|
| Next by Date: | mantisbt/core bug_group_action_api.php,NONE,1.1 print_api.php,1.136,1.137, Victor Boctor |
| Previous by Thread: | web directory.php,1.28,1.29, Victor Boctor |
| Next by Thread: | mantisbt/core bug_group_action_api.php,NONE,1.1 print_api.php,1.136,1.137, Victor Boctor |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |