Permalink
Browse files

Obsolete $g_show_attachment_indicator option

Following discussion with dhx on IRC today, this setting is not necessary.

There is no point or advantage in displaying a paperclip bitmap as opposed to
the actual number of attachments; furthermore, the option was inconsistently
used, in one instance it was actually hiding the attachments column completely

Affects issue #13276

Commit also removes trailing whitespace in columns_api.php
  • Loading branch information...
1 parent a1b29d2 commit 3323204d0c3e6031b182b7113e7afb99d861588d @dregad dregad committed Aug 31, 2011
Showing with 9 additions and 23 deletions.
  1. +0 −12 config_defaults_inc.php
  2. +5 −10 core/columns_api.php
  3. +1 −1 core/helper_api.php
  4. +3 −0 core/obsolete.php
@@ -1903,18 +1903,6 @@
$g_preview_max_height = 250;
/**
- * Show an attachment indicator on bug list
- * Show a clickable attachment indicator on the bug
- * list page if the bug has one or more files attached.
- * Note: This option is disabled by default since it adds
- * 1 database query per bug listed and thus might slow
- * down the page display.
- *
- * @global int $g_show_attachment_indicator
- */
- $g_show_attachment_indicator = OFF;
-
- /**
* access level needed to view bugs attachments. View means to see the file names
* sizes, and timestamps of the attachments.
* @global int $g_view_attachments_threshold
View
@@ -32,7 +32,7 @@
function columns_filter_disabled( $p_columns ) {
$t_columns = array();
$t_enable_profiles = ( config_get( 'enable_profiles' ) == ON );
-
+
foreach ( $p_columns as $t_column ) {
switch( $t_column ) {
case 'os':
@@ -94,11 +94,11 @@ function columns_get_standard() {
if( config_get( 'enable_eta' ) == OFF ) {
unset( $t_columns['eta'] );
}
-
- if( config_get( 'enable_projection' ) == OFF ) {
+
+ if( config_get( 'enable_projection' ) == OFF ) {
unset( $t_columns['projection'] );
}
-
+
if( config_get( 'enable_product_build' ) == OFF ) {
unset( $t_columns['build'] );
}
@@ -1013,12 +1013,7 @@ function print_column_attachment_count( $p_bug, $p_columns_target = COLUMNS_TARG
if ( $t_attachment_count > 0 ) {
$t_href = string_get_bug_view_url( $p_bug->id ) . '#attachments';
$t_href_title = sprintf( lang_get( 'view_attachments_for_issue' ), $t_attachment_count, $p_bug->id );
- if ( config_get( 'show_attachment_indicator' ) ) {
- $t_alt_text = $t_attachment_count . lang_get( 'word_separator' ) . lang_get( 'attachments' );
- echo "<a href=\"$t_href\" title=\"$t_href_title\"><img src=\"${t_icon_path}attachment.png\" alt=\"$t_alt_text\" title=\"$t_alt_text\" /></a>";
- } else {
- echo "<a href=\"$t_href\" title=\"$t_href_title\">$t_attachment_count</a>";
- }
+ echo "<a href=\"$t_href\" title=\"$t_href_title\">$t_attachment_count</a>";
} else {
echo ' &#160; ';
}
View
@@ -400,7 +400,7 @@ function helper_get_columns_to_view( $p_columns_target = COLUMNS_TARGET_VIEW_PAG
$t_keys_to_remove[] = 'sponsorship_total';
}
- if( $p_columns_target == COLUMNS_TARGET_CSV_PAGE || $p_columns_target == COLUMNS_TARGET_EXCEL_PAGE || OFF == config_get( 'show_attachment_indicator' ) ) {
+ if( $p_columns_target == COLUMNS_TARGET_CSV_PAGE || $p_columns_target == COLUMNS_TARGET_EXCEL_PAGE ) {
$t_keys_to_remove[] = 'attachment_count';
}
View
@@ -138,3 +138,6 @@
config_obsolete( 'default_graph_type', '' );
config_obsolete( 'graph_font', '' );
config_obsolete( 'graph_colors', '' );
+
+# changes in 1.2.8
+config_obsolete( 'show_attachment_indicator' );

0 comments on commit 3323204

Please sign in to comment.