X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmail%2FUserMailer.php;h=47fa16f87fd0da278cfcaf47c611845423430128;hb=dfec83932fd38a9086eb5a2e212889ad00f35b0e;hp=f348c5bb4e93e6905968ba9fd24a11aa3cca14df;hpb=ea6552ac838d1969404f91b203f342021aa21e39;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/mail/UserMailer.php b/includes/mail/UserMailer.php index f348c5bb4e..47fa16f87f 100644 --- a/includes/mail/UserMailer.php +++ b/includes/mail/UserMailer.php @@ -64,7 +64,7 @@ class UserMailer { * * @return string */ - static function arrayToHeaderString( $headers, $endl = PHP_EOL ) { + private static function arrayToHeaderString( $headers, $endl = PHP_EOL ) { $strings = []; foreach ( $headers as $name => $value ) { // Prevent header injection by stripping newlines from value @@ -79,10 +79,10 @@ class UserMailer { * * @return string */ - static function makeMsgId() { + private static function makeMsgId() { global $wgSMTP, $wgServer; - $domainId = WikiMap::getCurrentWikiDomain()->getId(); + $domainId = WikiMap::getCurrentWikiDbDomain()->getId(); $msgid = uniqid( $domainId . ".", true /** for cygwin */ ); if ( is_array( $wgSMTP ) && isset( $wgSMTP['IDHost'] ) && $wgSMTP['IDHost'] ) { $domain = $wgSMTP['IDHost']; @@ -102,7 +102,7 @@ class UserMailer { * @param MailAddress|MailAddress[] $to Recipient's email (or an array of them) * @param MailAddress $from Sender's email * @param string $subject Email's subject. - * @param string $body Email's text or Array of two strings to be the text and html bodies + * @param string|string[] $body Email's text or Array of two strings to be the text and html bodies * @param array $options Keys: * 'replyTo' MailAddress * 'contentType' string default 'text/plain; charset=UTF-8' @@ -225,7 +225,7 @@ class UserMailer { * @param MailAddress[] $to Array of recipients' email addresses * @param MailAddress $from Sender's email * @param string $subject Email's subject. - * @param string $body Email's text or Array of two strings to be the text and html bodies + * @param string|string[] $body Email's text or Array of two strings to be the text and html bodies * @param array $options Keys: * 'replyTo' MailAddress * 'contentType' string default 'text/plain; charset=UTF-8' @@ -465,7 +465,7 @@ class UserMailer { * @param int $code Error number * @param string $string Error message */ - static function errorHandler( $code, $string ) { + private static function errorHandler( $code, $string ) { self::$mErrorString = preg_replace( '/^mail\(\)(\s*\[.*?\])?: /', '', $string ); }