Update of /cvsroot/mantisbt/mantisbt/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24349/core
Modified Files:
csv_api.php custom_function_api.php filter_api.php
helper_api.php
Log Message:
Fixed #6319: Option to customise columns on View Issues.
Index: custom_function_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/custom_function_api.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- custom_function_api.php 23 Jul 2005 12:01:48 -0000 1.25
+++ custom_function_api.php 22 Apr 2006 04:33:04 -0000 1.26
@@ -172,32 +172,16 @@
$t_columns[] = 'status'; // 'status'
$t_columns[] = 'resolution'; // 'resolution'
$t_columns[] = 'fixed_in_version'; //
'fixed_in_version';
-
- if ( OFF == config_get( 'enable_relationship' ) ) {
- $t_columns[] = 'duplicate_id'; // 'duplicate_id'
- }
+ $t_columns[] = 'duplicate_id'; // 'duplicate_id'
+ } else if ( $p_columns_target == COLUMNS_TARGET_VIEW_PAGE ) {
+ $t_columns = config_get( 'view_issues_page_columns' );
} else {
$t_columns[] = 'selection';
-
- if ( $p_columns_target == COLUMNS_TARGET_VIEW_PAGE ) {
- $t_columns[] = 'edit';
- }
-
$t_columns[] = 'priority';
$t_columns[] = 'id';
-
- $t_enable_sponsorship = config_get(
'enable_sponsorship' );
- if ( ON == $t_enable_sponsorship ) {
- $t_columns[] = 'sponsorship_total';
- }
-
+ $t_columns[] = 'sponsorship_total';
$t_columns[] = 'bugnotes_count';
-
- $t_show_attachments = config_get(
'show_attachment_indicator' );
- if ( ON == $t_show_attachments ) {
- $t_columns[] = 'attachment';
- }
-
+ $t_columns[] = 'attachment';
$t_columns[] = 'category';
$t_columns[] = 'severity';
$t_columns[] = 'status';
Index: csv_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/csv_api.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- csv_api.php 31 May 2005 13:04:17 -0000 1.7
+++ csv_api.php 22 Apr 2006 04:33:04 -0000 1.8
@@ -51,7 +51,7 @@
# --------------------
# An array of column names that are used to identify fields to include
and in which order.
function csv_get_columns() {
- $t_columns = helper_call_custom_function(
'get_columns_to_view', array( COLUMNS_TARGET_CSV_PAGE ) );
+ $t_columns = helper_get_columns_to_view(
COLUMNS_TARGET_CSV_PAGE );
return $t_columns;
}
Index: helper_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/helper_api.php,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- helper_api.php 29 Oct 2005 09:52:52 -0000 1.63
+++ helper_api.php 22 Apr 2006 04:33:04 -0000 1.64
@@ -318,4 +318,34 @@
return $t_project_filter;
}
-?>
+
+ # --------------------
+ function helper_get_columns_to_view( $p_columns_target =
COLUMNS_TARGET_VIEW_PAGE ) {
+ $t_columns = helper_call_custom_function(
'get_columns_to_view', array( COLUMNS_TARGET_VIEW_PAGE ) );
+
+ $t_enable_sponsorship = config_get( 'enable_sponsorship' );
+ if ( OFF == $t_enable_sponsorship ) {
+ $t_keys = array_keys( $t_columns, 'sponsorship_total' );
+ foreach ( $t_keys as $t_key ) {
+ unset( $t_columns[$t_key] );
+ }
+ }
+
+ $t_show_attachments = config_get( 'show_attachment_indicator' );
+ if ( OFF == $t_show_attachments ) {
+ $t_keys = array_keys( $t_columns, 'attachment' );
+ foreach ( $t_keys as $t_key ) {
+ unset( $t_columns[$t_key] );
+ }
+ }
+
+ if ( OFF == config_get( 'enable_relationship' ) ) {
+ $t_keys = array_keys( $t_columns, 'duplicate_id' );
+ foreach ( $t_keys as $t_key ) {
+ unset( $t_columns[$t_key] );
+ }
+ }
+
+ return $t_columns;
+ }
+?>
\ No newline at end of file
Index: filter_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- filter_api.php 18 Apr 2006 09:06:42 -0000 1.139
+++ filter_api.php 22 Apr 2006 04:33:04 -0000 1.140
@@ -2508,7 +2508,7 @@
}
#validate sorting
- $t_fields = helper_call_custom_function( 'get_columns_to_view',
array() );
+ $t_fields = helper_get_columns_to_view();
$t_n_fields = count( $t_fields );
for ( $i=0; $i < $t_n_fields; $i++ ) {
if ( in_array( $t_fields[$i], array( 'selection',
'edit', 'bugnotes_count', 'attachment' ) ) ) {
@@ -2993,7 +2993,7 @@
# get all of the displayed fields for sort, then drop ones that
# are not appropriate and translate the rest
- $t_fields = helper_call_custom_function( 'get_columns_to_view',
array() );
+ $t_fields = helper_get_columns_to_view();
$t_n_fields = count( $t_fields );
$t_shown_fields[""] = "";
for ( $i=0; $i < $t_n_fields; $i++ ) {
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
|