|
|
Choosing A Webhost: |
mantisbt csv_export.php,1.23,1.24 print_all_bug_page.php,1.82,1.83 view_all: msg#00080bug-tracking.mantis.cvs
Update of /cvsroot/mantisbt/mantisbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14965 Modified Files: csv_export.php print_all_bug_page.php view_all_inc.php Log Message: Fixed #3315: Allow user to add custom fields in Reports, Exports and Bugs View (first iteration). Fixed #5639: Sort is not working in print_all_bug_page.php. Index: print_all_bug_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/print_all_bug_page.php,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- print_all_bug_page.php 12 Feb 2005 20:01:06 -0000 1.82 +++ print_all_bug_page.php 24 May 2005 23:22:48 -0000 1.83 @@ -1,7 +1,7 @@ <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito-J7RQz27tXwtAfugRpC6u6w@xxxxxxxxxxxxxxxx - # Copyright (C) 2002 - 2004 Mantis Team - mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx + # Copyright (C) 2002 - 2005 Mantis Team - mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details @@ -41,7 +41,7 @@ $f_dir = null; $t_project_id = 0; - $t_columns = helper_call_custom_function( 'get_columns_to_view', array( true ) ); + $t_columns = helper_call_custom_function( 'get_columns_to_view', array( COLUMNS_TARGET_PRINT_PAGE ) ); $t_num_of_columns = sizeof( $t_columns ); # check to see if the cookie exists @@ -164,20 +164,23 @@ $v_start = 0; $v_end = 0; } - PRINT "( $v_start - $v_end )"; + echo "( $v_start - $v_end )"; ?> </td> <td class="right" colspan="<?php echo $t_num_of_columns / 2 ?>"> <?php # print_bracket_link( 'print_all_bug_options_page.php', lang_get( 'printing_options_link' ) ) ?> - <?php print_bracket_link( 'view_all_bug_page.php', lang_get( 'view_bugs_link' ) ) ?> + <?php # print_bracket_link( 'view_all_bug_page.php', lang_get( 'view_bugs_link' ) ) ?> <?php # print_bracket_link( 'summary_page.php', lang_get( 'summary' ) ) ?> </td> </tr> <tr class="row-category"> <?php + $t_sort = $f_sort; // used within the custom function called in the loop (@@@ cleanup) + $t_dir = $f_dir; // used within the custom function called in the loop (@@@ cleanup) + foreach( $t_columns as $t_column ) { $t_title_function = 'print_column_title'; - helper_call_custom_function( $t_title_function, array( $t_column, true ) ); + helper_call_custom_function( $t_title_function, array( $t_column, COLUMNS_TARGET_PRINT_PAGE ) ); } ?> </tr> @@ -196,7 +199,7 @@ <?php foreach( $t_columns as $t_column ) { $t_column_value_function = 'print_column_value'; - helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row, true ) ); + helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row, COLUMNS_TARGET_PRINT_PAGE ) ); } ?> </tr> Index: view_all_inc.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/view_all_inc.php,v retrieving revision 1.158 retrieving revision 1.159 diff -u -d -r1.158 -r1.159 --- view_all_inc.php 26 Apr 2005 01:17:50 -0000 1.158 +++ view_all_inc.php 24 May 2005 23:22:48 -0000 1.159 @@ -1,7 +1,7 @@ <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito-J7RQz27tXwtAfugRpC6u6w@xxxxxxxxxxxxxxxx - # Copyright (C) 2002 - 2004 Mantis Team - mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx + # Copyright (C) 2002 - 2005 Mantis Team - mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details @@ -29,7 +29,7 @@ $t_icon_path = config_get( 'icon_path' ); $t_update_bug_threshold = config_get( 'update_bug_threshold' ); - $t_columns = helper_call_custom_function( 'get_columns_to_view', array() ); + $t_columns = helper_call_custom_function( 'get_columns_to_view', array( COLUMNS_TARGET_VIEW_PAGE ) ); $col_count = sizeof( $t_columns ); # -- ====================== FILTER FORM ========================= -- Index: csv_export.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/csv_export.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- csv_export.php 12 Feb 2005 20:01:05 -0000 1.23 +++ csv_export.php 24 May 2005 23:22:48 -0000 1.24 @@ -1,7 +1,7 @@ <?php # Mantis - a php based bugtracking system # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito-J7RQz27tXwtAfugRpC6u6w@xxxxxxxxxxxxxxxx - # Copyright (C) 2002 - 2004 Mantis Team - mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx + # Copyright (C) 2002 - 2005 Mantis Team - mantisbt-dev-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx # This program is distributed under the terms and conditions of the GPL # See the README and LICENSE files for details @@ -16,6 +16,7 @@ require_once( $t_core_path . 'filter_api.php' ); require_once( $t_core_path . 'csv_api.php' ); + require_once( $t_core_path . 'columns_api.php' ); ?> <?php auth_ensure_user_authenticated() ?> <?php @@ -29,12 +30,12 @@ $t_sep = csv_get_separator(); # Get bug rows according to the current filter - $rows = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count ); - if ( $rows === false ) { + $t_rows = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count ); + if ( $t_rows === false ) { print_header_redirect( 'view_all_set.php?type=0' ); } - $t_filename = csv_get_default_filename(); + $t_filename = csv_get_default_filename(); # Send headers to browser to activate mime loading @@ -51,12 +52,28 @@ $t_columns = csv_get_columns(); # export the titles + $t_first_column = true; + ob_start(); $t_titles = array(); - foreach ( $t_columns as $column => $title ) { - $t_titles[] = lang_get( $title ); + foreach ( $t_columns as $t_column ) { + if ( !$t_first_column ) { + echo $t_sep; + } else { + $t_first_column = false; + } + + if ( strpos( $t_column, 'custom_' ) === 0 ) { + $t_column_title_function = 'print_column_title'; + helper_call_custom_function( $t_column_title_function, array( $t_column, COLUMNS_TARGET_CSV_PAGE ) ); + } else { + $t_function = 'print_column_title_' . $t_column; + $t_function( '', 'ASC', COLUMNS_TARGET_CSV_PAGE ); + } } + + echo $t_nl; - $t_header = implode( $t_sep, $t_titles ) . $t_nl; + $t_header = ob_get_clean(); # Fixed for a problem in Excel where it prompts error message "SYLK: File Format Is Not Valid" # See Microsoft Knowledge Base Article - 323626 @@ -70,19 +87,33 @@ echo $t_header; # export the rows - foreach ( $rows as $row ) { - $t_values = array(); - foreach ( $t_columns as $key => $title ) { - # check if column should be visible - if ( !isset( $row[$key] ) ) { - $t_values[] = ''; - continue; + foreach ( $t_rows as $t_row ) { + $t_first_column = true; + + foreach ( $t_columns as $t_column ) { + if ( !$t_first_column ) { + echo $t_sep; + } else { + $t_first_column = false; } - $t_function = 'csv_format_' . $key; - $t_values[] = $t_function( $row[ $key ] ); + if ( strpos( $t_column, 'custom_' ) === 0 ) { + ob_start(); + $t_column_value_function = 'print_column_value'; + helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row, COLUMNS_TARGET_CSV_PAGE ) ); + $t_value = ob_get_clean(); + + if ( strstr( $t_value, $t_sep ) !== false ) { + $t_value = '"' . $t_value . '"'; + } + + echo $t_value; + } else { + $t_function = 'csv_format_' . $t_column; + echo $t_function( $t_row[ $t_column ] ); + } } - echo implode( $t_sep, $t_values ) . $t_nl; + echo $t_nl; } ?> ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | web directory.php,1.22,1.23, Victor Boctor |
|---|---|
| Next by Date: | mantisbt/core columns_api.php,1.7,1.8 constant_inc.php,1.48,1.49 csv_api.php,1.5,1.6 custom_function_api.php,1.20,1.21 lang_api.php,1.36,1.37 print_api.php,1.133,1.134, Victor Boctor |
| Previous by Thread: | web directory.php,1.22,1.23, Victor Boctor |
| Next by Thread: | mantisbt/core columns_api.php,1.7,1.8 constant_inc.php,1.48,1.49 csv_api.php,1.5,1.6 custom_function_api.php,1.20,1.21 lang_api.php,1.36,1.37 print_api.php,1.133,1.134, 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 |