Skip to:
Content

BuddyPress.org

Ticket #7009: 0001-Hostname-remove.patch

File 0001-Hostname-remove.patch, 1.4 KB (added by singhleo, 9 years ago)

Final Patch.

  • src/bp-core/classes/class-bp-phpmailer.php

    From 290c2448e52baa9d5c328bf2b076766573e436fb Mon Sep 17 00:00:00 2001
    Message-Id: <290c2448e52baa9d5c328bf2b076766573e436fb.1460507400.git.inventive.mind@yahoo.com>
    From: Ayush <inventive.mind@yahoo.com>
    Date: Wed, 13 Apr 2016 05:59:47 +0530
    Subject: [PATCH] Hostname remove
    
    Removing hostname as after 2.5.0 we have added phpmailer_init hook and
    wordpress is adding hostname using that hook
    ---
     src/bp-core/classes/class-bp-phpmailer.php | 21 ---------------------
     1 file changed, 21 deletions(-)
    
    diff --git a/src/bp-core/classes/class-bp-phpmailer.php b/src/bp-core/classes/class-bp-phpmailer.php
    index 2042103..70a4ebc 100644
    a b class BP_PHPMailer implements BP_Email_Delivery { 
    5454
    5555                $phpmailer->IsMail();
    5656                $phpmailer->CharSet  = bp_get_option( 'blog_charset' );
    57                 $phpmailer->Hostname = self::get_hostname();
    58 
    5957
    6058                /*
    6159                 * Content.
    class BP_PHPMailer implements BP_Email_Delivery { 
    134132                }
    135133        }
    136134
    137 
    138         /*
    139          * Utility/helper functions.
    140          */
    141 
    142         /**
    143          * Get an appropriate hostname for the email. Varies depending on site configuration.
    144          *
    145          * @since 2.5.0
    146          *
    147          * @return string
    148          */
    149         public static function get_hostname() {
    150                 if ( is_multisite() ) {
    151                         return get_current_site()->domain;  // From fix_phpmailer_messageid()
    152                 }
    153 
    154                 return preg_replace( '#^https?://#i', '', bp_get_option( 'home' ) );
    155         }
    156135}