#819 Email text migration - migrate %tag% style placeholders as well

This commit is contained in:
ljacqu 2016-07-02 22:22:03 +02:00
parent 3984208548
commit a9574d2363

View File

@ -92,10 +92,10 @@ public class SettingsMigrationService {
final File emailFile = new File(pluginFolder, "email.html"); final File emailFile = new File(pluginFolder, "email.html");
final String mailText = configuration.getString(oldSettingPath) final String mailText = configuration.getString(oldSettingPath)
.replace("<playername>", "<playername />") .replace("<playername>", "<playername />").replace("%playername%", "<playername />")
.replace("<servername>", "<servername />") .replace("<servername>", "<servername />").replace("%servername%", "<servername />")
.replace("<generatedpass>", "<generatedpass />") .replace("<generatedpass>", "<generatedpass />").replace("%generatedpass%", "<generatedpass />")
.replace("<image>", "<image />"); .replace("<image>", "<image />").replace("%image%", "<image />");
if (!emailFile.exists()) { if (!emailFile.exists()) {
try (FileWriter fw = new FileWriter(emailFile)) { try (FileWriter fw = new FileWriter(emailFile)) {
fw.write(mailText); fw.write(mailText);