Permalink
Browse files

Obsolete $g_show_attachment_indicator option

Following discussion with dhx on IRC on 31-Aug-2011, 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

Porting 3323204 to master
  • Loading branch information...
1 parent 791b936 commit ce56bd5706ebf98a2b8a55624e4b492a52ae8a05 @dregad dregad committed Aug 31, 2011
Showing with 6 additions and 18 deletions.
  1. +0 −10 config_defaults_inc.php
  2. +1 −6 core/columns_api.php
  3. +1 −1 core/helper_api.php
  4. +4 −1 core/obsolete.php
View
@@ -2063,16 +2063,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
@@ -1074,12 +1074,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
@@ -494,7 +494,7 @@ function helper_get_columns_to_view( $p_columns_target = COLUMNS_TARGET_VIEW_PAG
$t_keys_to_remove[] = 'overdue';
}
- 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
@@ -139,7 +139,10 @@
config_obsolete( 'graph_font', '' );
config_obsolete( 'graph_colors', '' );
-#changes in 1.3.0dev
+# changes in 1.2.8
+config_obsolete( 'show_attachment_indicator' );
+
+# changes in 1.3.0dev
config_obsolete( 'bugnote_allow_user_edit_delete', '' );
config_obsolete( 'password_confirm_hash_magic_string', 'crypto_master_salt' );
config_obsolete( 'rss_key_seed', 'crypto_master_salt' );

0 comments on commit ce56bd5

Please sign in to comment.