Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'remove-show_attachment_indicator'

Conflicts:
	config_defaults_inc.php
  • Loading branch information...
commit 7c34919f3a0b03724d83b8cee28088870591d5b1 2 parents dc0c718 + 3323204
@dregad dregad authored
View
26 config_defaults_inc.php
@@ -823,14 +823,16 @@
* To include custom field 'xyz', include the column name as 'custom_xyz'.
*
* Standard Column Names (i.e. names to choose from):
- * selection, edit, id, project_id, reporter_id, handler_id, priority, reproducibility, projection, eta,
- * resolution, fixed_in_version, view_state, os, os_build, build (for product build), platform, version, date_submitted, attachment,
- * category, sponsorship_total, severity, status, last_updated, summary, bugnotes_count, description,
- * steps_to_reproduce, additional_information
+ * id, project_id, reporter_id, handler_id, duplicate_id, priority, severity,
+ * reproducibility, status, resolution, category_id, date_submitted, last_updated,
+ * os, os_build, platform, version, fixed_in_version, target_version, view_state,
+ * summary, sponsorship_total, due_date, description, steps_to_reproduce,
+ * additional_information, attachment_count, bugnotes_count, selection, edit,
+ * overdue
*
* @global array $g_view_issues_page_columns
*/
- $g_view_issues_page_columns = array ( 'selection', 'edit', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment', 'category_id', 'severity', 'status', 'last_updated', 'summary' );
+ $g_view_issues_page_columns = array ( 'selection', 'edit', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment_count', 'category_id', 'severity', 'status', 'last_updated', 'summary' );
/**
* The default columns to be included in the Print Issues Page.
@@ -838,7 +840,7 @@
* Also each user can configure their own columns using My Account -> Manage Columns
* @global array $g_print_issues_page_columns
*/
- $g_print_issues_page_columns = array ( 'selection', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment', 'category_id', 'severity', 'status', 'last_updated', 'summary' );
+ $g_print_issues_page_columns = array ( 'selection', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment_count', 'category_id', 'severity', 'status', 'last_updated', 'summary' );
/**
* The default columns to be included in the CSV export.
@@ -1918,18 +1920,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
17 core/columns_api.php
@@ -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'] );
}
@@ -1016,8 +1016,6 @@ function print_column_attachment_count( $p_bug, $p_columns_target = COLUMNS_TARG
global $t_icon_path;
# Check for attachments
- # TODO: factor in the allow_view_own_attachments configuration option
- # instead of just using a global check.
$t_attachment_count = 0;
if( file_can_view_bug_attachments( $p_bug->id, null ) ) {
$t_attachment_count = file_bug_attachment_count( $p_bug->id );
@@ -1028,12 +1026,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
4 core/filter_api.php
@@ -597,7 +597,7 @@ function filter_ensure_valid_filter( $p_filter_arr ) {
$t_fields = helper_get_columns_to_view();
$t_n_fields = count( $t_fields );
for( $i = 0;$i < $t_n_fields;$i++ ) {
- if( isset( $t_fields[$i] ) && in_array( $t_fields[$i], array( 'selection', 'edit', 'bugnotes_count', 'attachment' ) ) ) {
+ if( isset( $t_fields[$i] ) && in_array( $t_fields[$i], array( 'selection', 'edit', 'bugnotes_count', 'attachment_count' ) ) ) {
unset( $t_fields[$i] );
}
}
@@ -4065,7 +4065,7 @@ function print_filter_show_sort() {
$t_n_fields = count( $t_fields );
$t_shown_fields[''] = '';
for( $i = 0;$i < $t_n_fields;$i++ ) {
- if( !in_array( $t_fields[$i], array( 'selection', 'edit', 'bugnotes_count', 'attachment' ) ) ) {
+ if( !in_array( $t_fields[$i], array( 'selection', 'edit', 'bugnotes_count', 'attachment_count' ) ) ) {
if( strpos( $t_fields[$i], 'custom_' ) === 0 ) {
$t_field_name = string_display( lang_get_defaulted( utf8_substr( $t_fields[$i], utf8_strlen( 'custom_' ) ) ) );
} else {
View
8 core/helper_api.php
@@ -149,7 +149,7 @@ function check_selected( $p_var, $p_val = true ) {
* @param mixed $p_var
* @param mixed $p_val
* @return null
- */
+ */
function check_checked( $p_var, $p_val = true ) {
if( $p_var == $p_val ) {
echo ' checked="checked" ';
@@ -360,7 +360,7 @@ function helper_project_specific_where( $p_project_id, $p_user_id = null ) {
}
/**
- *
+ *
* @param int $p_columns_target
* @param bool $p_viewable_only
* @param int $p_user_id
@@ -400,8 +400,8 @@ 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' ) ) {
- $t_keys_to_remove[] = 'attachment';
+ if( $p_columns_target == COLUMNS_TARGET_CSV_PAGE || $p_columns_target == COLUMNS_TARGET_EXCEL_PAGE ) {
+ $t_keys_to_remove[] = 'attachment_count';
}
$t_keys_to_remove[] = 'duplicate_id';
View
3  core/obsolete.php
@@ -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' );
View
2  view_filters_page.php
@@ -113,7 +113,7 @@ function SwitchDateFields() {
$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' ) ) ) {
+ if ( in_array( $t_fields[$i], array( 'selection', 'edit', 'bugnotes_count', 'attachment_count' ) ) ) {
unset( $t_fields[$i] );
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.