[RSS Feed/News] MyBB Importer : convertContentToBbCode writes wrong embedded attachment id

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
The MyBB importer has a bug that ruined my last migration
at method convertContentToBbCode
there is a call
Code:

$content = preg_replace('#\[attachment=(\d)+]#siU', '[ATTACH=full]$1[/ATTACH]', $content);
this converted [attachment=26549] to [ATTACH=full]9[/ATTACH]
because the capture group captures only the last digit
it should be
Code:

$content = preg_replace('#\[attachment=(\d+)]#siU', '[ATTACH=full]$1[/ATTACH]', $content);

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom