* @param User $user
* @param string $source
*/
- function compose( $user, $source ) {
+ private function compose( $user, $source ) {
global $wgEnotifImpersonal;
if ( !$this->composed_common ) {
/**
* Send any queued mails
*/
- function sendMails() {
+ private function sendMails() {
global $wgEnotifImpersonal;
if ( $wgEnotifImpersonal ) {
$this->sendImpersonal( $this->mailTargets );
* @param User $watchingUser
* @param string $source
* @return Status
- * @private
*/
- function sendPersonalised( $watchingUser, $source ) {
+ private function sendPersonalised( $watchingUser, $source ) {
global $wgEnotifUseRealName;
// From the PHP manual:
// Note: The to parameter cannot be an address in the form of
* @param MailAddress[] $addresses
* @return Status|null
*/
- function sendImpersonal( $addresses ) {
+ private function sendImpersonal( $addresses ) {
if ( empty( $addresses ) ) {
return null;
}
* Return formatted and quoted address to insert into SMTP headers
* @return string
*/
- function toString() {
+ public function toString() {
if ( !$this->address ) {
return '';
}
return "$quoted <{$this->address}>";
}
- function __toString() {
+ public function __toString() {
return $this->toString();
}
}
*
* @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
*
* @return string
*/
- static function makeMsgId() {
+ private static function makeMsgId() {
global $wgSMTP, $wgServer;
$domainId = WikiMap::getCurrentWikiDbDomain()->getId();
* @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 );
}