From: Tim Düsterhus Date: Fri, 24 Jul 2015 15:17:43 +0000 (+0200) Subject: Add $language parameter to \wcf\system\email\Mailbox X-Git-Tag: 3.0.0_Beta_1~2166^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1478e5929c40763166874c9bed013745efb5772;p=GitHub%2FWoltLab%2FWCF.git Add $language parameter to \wcf\system\email\Mailbox --- diff --git a/wcfsetup/install/files/lib/system/email/Mailbox.class.php b/wcfsetup/install/files/lib/system/email/Mailbox.class.php index f94858e4e5..65abde2d93 100644 --- a/wcfsetup/install/files/lib/system/email/Mailbox.class.php +++ b/wcfsetup/install/files/lib/system/email/Mailbox.class.php @@ -1,6 +1,8 @@ address = $address; $this->name = $name; + if ($language === null) { + $language = LanguageFactory::getInstance()->getLanguage(LanguageFactory::getInstance()->getDefaultLanguageID()); + } + $this->language = $language; } /** @@ -58,6 +65,16 @@ class Mailbox { return $this->address; } + /** + * Returns the language the recipient of this mailbox wants. + * This is used for localization of the email template. + * + * @return \wcf\data\language\Language + */ + public function getLanguage() { + return $this->language; + } + /** * Returns a string representation for use in a RFC 5233 message. *