FIX: phpbb import - attachments not embedded in posts (#14570)

This commit is contained in:
Theodore Diamantidis 2021-10-11 15:27:54 +03:00 committed by GitHub
parent 9d28de0112
commit 97178cd777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ module ImportScripts::PhpBB3
attachment_regexp = /\[attachment=([\d])+\]<!-- [\w]+ -->([^<]+)<!-- [\w]+ -->\[\/attachment\]?/i attachment_regexp = /\[attachment=([\d])+\]<!-- [\w]+ -->([^<]+)<!-- [\w]+ -->\[\/attachment\]?/i
unreferenced_attachments = attachments.dup unreferenced_attachments = attachments.dup
text = text.gsub(attachment_regexp) do text.gsub!(attachment_regexp) do
index = $1.to_i index = $1.to_i
real_filename = $2 real_filename = $2
unreferenced_attachments[index] = nil unreferenced_attachments[index] = nil