MyBB Importer : convertContentToBbCode writes wrong embedded attachment id

K

K a M a L

Guest
Member
The MyBB importer has a bug that ruined the last migration I did
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);
 
BlackSpigot General Chat
Rules Help Users
    xYuriko @ xYuriko: Why plugins are free here strange question lol
    Top