Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

mantisbt changelog_page.php,1.7,1.8: msg#00010

bug-tracking.mantis.cvs

Subject: mantisbt changelog_page.php,1.7,1.8

Update of /cvsroot/mantisbt/mantisbt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15209

Modified Files:
changelog_page.php
Log Message:
- 0004400: [feature] Changelog should view release notes (vboctor)
- 0004658: [feature] Changelog should support project_id parameter (vboctor)

Index: changelog_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/changelog_page.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- changelog_page.php 26 Aug 2004 23:24:41 -0000 1.7
+++ changelog_page.php 3 Oct 2004 12:41:09 -0000 1.8
@@ -15,20 +15,37 @@
$t_core_path = config_get( 'core_path' );

require_once( $t_core_path.'bug_api.php' );
+
+ # Print header for the specified project version.
+ function print_version_header( $p_version_id ) {
+ $t_project_id = version_get_field( $p_version_id,
'project_id' );
+ $t_version_name = version_get_field( $p_version_id, 'version' );
+ $t_project_name = project_get_field( $t_project_id, 'name' );
+
+ $t_release_title = $t_project_name . ' - ' . $t_version_name;
+ echo $t_release_title, '<br />';
+ echo str_pad( '', strlen( $t_release_title ), '=' ), '<br />';
+
+ $t_description = version_get_field( $p_version_id,
'description' );
+ if ( ( $t_description !== false ) && !is_blank( $t_description
) ) {
+ echo string_display( "<br />$t_description<br /><br />"
);
+ }
+ }
+
?>
<?php
+ $f_project_id = gpc_get_int( 'project_id', helper_get_current_project()
);
+
# this page is invalid for the 'All Project' selection
- if ( ALL_PROJECTS == helper_get_current_project() ) {
+ if ( ALL_PROJECTS == $f_project_id ) {
print_header_redirect(
'login_select_proj_page.php?ref=changelog_page.php' );
}

- $t_project_id = helper_get_current_project();
- access_ensure_project_level( config_get( 'view_changelog_threshold' ),
$t_project_id );
+ access_ensure_project_level( config_get( 'view_changelog_threshold' ),
$f_project_id );

html_page_top1( lang_get( 'changelog' ) ); // title
html_page_top2();

- $f_project_id = helper_get_current_project();
$c_project_id = db_prepare_int( $f_project_id );
$t_project_name = project_get_field( $f_project_id, 'name' );
$t_can_view_private = access_has_project_level( config_get(
'private_bug_threshold' ), $f_project_id );
@@ -38,7 +55,7 @@

$t_version_rows = version_get_all_rows( $f_project_id );

- echo '<br /><span class="pagetitle">', lang_get( 'changelog' ),
'</span><br /><br />';
+ echo '<br /><span class="pagetitle">', $t_project_name, ' - ',
lang_get( 'changelog' ), '</span><br /><br />';
echo '<tt>';

$i = 0;
@@ -47,10 +64,21 @@
$t_version = $t_version_row['version'];
$c_version = db_prepare_string( $t_version );

- $t_version_id = version_get_id( $c_version );
+ $t_version_id = version_get_id( $c_version, $f_project_id );

$query = "SELECT id, view_state FROM $t_bug_table WHERE
project_id='$c_project_id' AND fixed_in_version='$c_version' ORDER BY
last_updated DESC";

+ $t_description = version_get_field( $t_version_id,
'description' );
+ if ( !is_blank( $t_description ) ) {
+ if ( $i > 0 ) {
+ echo '<br />';
+ }
+
+ print_version_header( $t_version_id );
+ $t_version_header_printed = true;
+ } else {
+ $t_version_header_printed = false;
+ }
$t_first_entry = true;

for ( $t_result = db_query( $query ); !$t_result->EOF;
$t_result->MoveNext() ) {
@@ -66,20 +94,14 @@
}

# Print the header for the version with the first
changelog entry to be added.
- if ( $t_first_entry ) {
+ if ( $t_first_entry && !$t_version_header_printed ) {
if ( $i > 0 ) {
echo '<br />';
}

- $t_release_title = $t_project_name . ' - ' .
$t_version;
- echo $t_release_title, '<br />';
- echo str_pad( '', strlen( $t_release_title ),
'=' ), '<br />';
-
- $t_description = version_get_field(
$t_version_id, 'description' );
- if ( ( $t_description !== false ) && !is_blank(
$t_description ) ) {
- echo string_display( "<br
/>$t_description<br /><br />" );
- }
+ print_version_header( $t_version_id );

+ $t_version_header_printed = true;
$t_first_entry = false;
}




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation