- if ( $this->address ) {
- if ( $this->name != '' && !wfIsWindows() ) {
- global $wgEnotifUseRealName;
- $name = ( $wgEnotifUseRealName && $this->realName !== '' ) ? $this->realName : $this->name;
- $quoted = UserMailer::quotedPrintable( $name );
- // Must only be quoted if string does not use =? encoding (T191931)
- if ( $quoted === $name ) {
- $quoted = '"' . addslashes( $quoted ) . '"';
- }
- return "$quoted <{$this->address}>";
- } else {
- return $this->address;
- }
- } else {
- return "";