From: Marcel Werk Date: Mon, 12 Aug 2013 11:20:47 +0000 (+0200) Subject: Fixed import of embedded attachments X-Git-Tag: 2.0.0_Beta_7~34 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=908a92e22a145f6670403baaa9395e77528c906e;p=GitHub%2FWoltLab%2FWCF.git Fixed import of embedded attachments --- diff --git a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php index 95512042b6..cdf9c7d46f 100644 --- a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php @@ -76,10 +76,11 @@ class AbstractAttachmentImporter implements IImporter { } protected function fixEmbeddedAttachments($message, $oldID, $newID) { - if (StringUtil::indexOfIgnoreCase($message, '[attach]'.$oldID.'[/attach]') !== false || StringUtil::indexOfIgnoreCase($message, '[attach='.$oldID.']') !== false) { + if (StringUtil::indexOfIgnoreCase($message, '[attach]'.$oldID.'[/attach]') !== false || StringUtil::indexOfIgnoreCase($message, '[attach='.$oldID.']') !== false || StringUtil::indexOfIgnoreCase($message, '[attach='.$oldID.',') !== false) { $message = StringUtil::replaceIgnoreCase('[attach]'.$oldID.'[/attach]', '[attach]'.$newID.'[/attach]', $message); $message = StringUtil::replaceIgnoreCase('[attach='.$oldID.']', '[attach='.$newID.']', $message); - + $message = StringUtil::replaceIgnoreCase('[attach='.$oldID.',', '[attach='.$newID.',', $message); + return $message; }