Make import scripts work with frozen strings

This commit is contained in:
Gerhard Schlager
2019-05-30 22:20:57 +02:00
parent c70d0c6659
commit 0f3c3bc309
14 changed files with 19 additions and 17 deletions

View File

@ -319,7 +319,7 @@ class ImportScripts::Smf2 < ImportScripts::Base
"\n[#{tag}]#{$~[:inner].strip}[/#{tag}]\n"
end
body.gsub!(XListPattern) do |s|
r = "\n[ul]"
r = +"\n[ul]"
s.lines.each { |l| r << '[li]' << l.strip.sub(/^\[x\]\s*/, '') << '[/li]' }
r << "[/ul]\n"
end
@ -357,7 +357,7 @@ class ImportScripts::Smf2 < ImportScripts::Base
inner = $~[:inner].strip
params = parse_tag_params($~[:params])
if params['author'].present?
quote = "[quote=\"#{params['author']}"
quote = +"[quote=\"#{params['author']}"
if QuoteParamsPattern =~ params['link']
tl = topic_lookup_from_imported_post_id($~[:msg].to_i)
quote << ", post:#{tl[:post_number]}, topic:#{tl[:topic_id]}" if tl