Commit 1a67aaf2 authored by maeda's avatar maeda

Support frozen_string_literal in lib/redmine/export/*.rb (#26561).

Contributed by Pavel Rosický.


git-svn-id: https://svn.redmine.org/redmine/trunk@17985 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent d6f9dd17
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
...@@ -35,11 +35,12 @@ module Redmine ...@@ -35,11 +35,12 @@ module Redmine
col_sep = l(:general_csv_separator) col_sep = l(:general_csv_separator)
encoding = Encoding.find(options[:encoding]) rescue Encoding.find(l(:general_csv_encoding)) encoding = Encoding.find(options[:encoding]) rescue Encoding.find(l(:general_csv_encoding))
str = ''.force_encoding(encoding) str =
if encoding == Encoding::UTF_8 if encoding == Encoding::UTF_8
# BOM +"\xEF\xBB\xBF" # BOM
str = "\xEF\xBB\xBF".force_encoding(encoding) else
end (+'').force_encoding(encoding)
end
super(str, :col_sep => col_sep, :encoding => encoding, &block) super(str, :col_sep => col_sep, :encoding => encoding, &block)
end end
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
...@@ -305,7 +305,7 @@ module Redmine ...@@ -305,7 +305,7 @@ module Redmine
if query.grouped? && if query.grouped? &&
(group = query.group_by_column.group_value(issue)) != previous_group (group = query.group_by_column.group_value(issue)) != previous_group
pdf.SetFontStyle('B',10) pdf.SetFontStyle('B',10)
group_label = group.blank? ? 'None' : group.to_s.dup group_label = group.blank? ? +'None' : group.to_s.dup
group_label << " (#{result_count_by_group[group]})" group_label << " (#{result_count_by_group[group]})"
pdf.bookmark group_label, 0, -1 pdf.bookmark group_label, 0, -1
pdf.RDMCell(table_width, row_height * 2, group_label, 'LR', 1, 'L') pdf.RDMCell(table_width, row_height * 2, group_label, 'LR', 1, 'L')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment