|
|
Choosing A Webhost: |
mantisbt changelog_page.php,1.19,1.20: msg#00008bug-tracking.mantis.cvs
Update of /cvsroot/mantisbt/mantisbt In directory sc8-pr-cvs16:/tmp/cvs-serv8437 Modified Files: changelog_page.php Log Message: Fix: 0007131: Skip Blank Changelogs Index: changelog_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/changelog_page.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- changelog_page.php 24 Mar 2007 17:20:51 -0000 1.19 +++ changelog_page.php 7 May 2007 23:03:13 -0000 1.20 @@ -30,6 +30,11 @@ echo string_display( "<br />$t_description<br /><br />" ); } } + + function print_project_header ( $p_project_name ) { + echo '<br /><span class="pagetitle">', string_display( $p_project_name ), ' - ', lang_get( 'changelog' ), '</span><br /><br />'; + echo '<tt>'; + } $t_user_id = auth_get_current_user_id(); $f_project_id = gpc_get_int( 'project_id', helper_get_current_project() ); @@ -73,10 +78,13 @@ $t_bug_table = config_get( 'mantis_bug_table' ); $t_version_rows = version_get_all_rows( $t_project_id ); - - echo '<br /><span class="pagetitle">', string_display( $t_project_name ), ' - ', lang_get( 'changelog' ), '</span><br /><br />'; - echo '<tt>'; - + + # skip projects with no versions + if (sizeof($t_version_rows) == 0) { + continue; + } + + $t_project_header_printed = false; $i = 0; foreach( $t_version_rows as $t_version_row ) { @@ -89,6 +97,11 @@ $t_description = version_get_field( $t_version_id, 'description' ); if ( !is_blank( $t_description ) ) { + if ( !$t_project_header_printed ) { + print_project_header ($t_project_name); + } + $t_project_header_printed = true; + if ( $i > 0 ) { echo '<br />'; } @@ -125,6 +138,11 @@ # Print the header for the version with the first changelog entry to be added. if ( $t_first_entry && !$t_version_header_printed ) { + if ( !$t_project_header_printed ) { + print_project_header ($t_project_name); + } + $t_project_header_printed = true; + if ( $i > 0 ) { echo '<br />'; } @@ -141,9 +159,14 @@ $i++; } - echo '</tt>'; - $t_project_index++; + if ( $t_project_header_printed ) { + echo '</tt>'; + $t_project_index++; + } } + if ( $t_project_index == 0 ) { + echo '<br /><span class="pagetitle">' . lang_get('changelog_empty') . '</span>'; + } html_page_bottom1( __FILE__ ); ?> \ No newline at end of file ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | mantisbt/core user_api.php,1.108,1.109, Paul Richards |
|---|---|
| Next by Date: | mantisbt/lang strings_english.txt,1.293,1.294, Paul Richards |
| Previous by Thread: | mantisbt/core user_api.php,1.108,1.109, Paul Richards |
| Next by Thread: | mantisbt/lang strings_english.txt,1.293,1.294, Paul Richards |
| 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 |