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
# Copyright (C) 2006-2017 Jean-Philippe Lang
......@@ -35,11 +35,12 @@ module Redmine
col_sep = l(:general_csv_separator)
encoding = Encoding.find(options[:encoding]) rescue Encoding.find(l(:general_csv_encoding))
str = ''.force_encoding(encoding)
if encoding == Encoding::UTF_8
# BOM
str = "\xEF\xBB\xBF".force_encoding(encoding)
end
str =
if encoding == Encoding::UTF_8
+"\xEF\xBB\xBF" # BOM
else
(+'').force_encoding(encoding)
end
super(str, :col_sep => col_sep, :encoding => encoding, &block)
end
......
# frozen_string_literal: false
# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
......@@ -305,7 +305,7 @@ module Redmine
if query.grouped? &&
(group = query.group_by_column.group_value(issue)) != previous_group
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]})"
pdf.bookmark group_label, 0, -1
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