From: Marcel Werk Date: Wed, 9 Nov 2016 12:22:04 +0000 (+0100) Subject: Fixed overwriting of existing mail settings X-Git-Tag: 3.0.0_Beta_5~64 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3531e36805143cca625d179fb3a837370e1302d6;p=GitHub%2FWoltLab%2FWCF.git Fixed overwriting of existing mail settings --- diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_post_sql.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_post_sql.php index 4d3dd5c3cd..8138f7b43d 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_post_sql.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_post_sql.php @@ -46,18 +46,15 @@ $sql = "UPDATE wcf".WCF_N."_option SET optionValue = ? WHERE optionName = ?"; $statement = WCF::getDB()->prepareStatement($sql); -$statement->execute([ - WCF::getUser()->username, - 'mail_from_name' -]); -$statement->execute([ - WCF::getUser()->email, - 'mail_from_address' -]); -$statement->execute([ - WCF::getUser()->email, - 'mail_admin_address' -]); +if (!MAIL_FROM_NAME) { + $statement->execute([WCF::getUser()->username, 'mail_from_name']); +} +if (!MAIL_FROM_ADDRESS) { + $statement->execute([WCF::getUser()->email, 'mail_from_address']); +} +if (!MAIL_ADMIN_ADDRESS) { + $statement->execute([WCF::getUser()->email, 'mail_admin_address']); +} // Generate signature_secret try {