Skip to:
Content

BuddyPress.org

Changeset 6587


Ignore:
Timestamp:
12/10/2012 09:36:05 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Revert r6586:

  • Do not call esc_html() on site_name in sign-up email titles.
  • Do not decode email blogname section of email subjects into HTML entities.
  • For all components with notifications, including deprecated files.
  • Fixes #4401.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-notifications.php

    r6342 r6587  
    7171        $ud       = bp_core_get_core_userdata( $receiver_user_id );
    7272        $to       = $ud->user_email;
    73         $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     73        $sitename = bp_get_option( 'blogname', 'WordPress' );
    7474        $subject  = '[' . $sitename . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
    7575
     
    160160        $ud       = bp_core_get_core_userdata( $original_activity->user_id );
    161161        $to       = $ud->user_email;
    162         $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     162        $sitename = bp_get_option( 'blogname', 'WordPress' );
    163163        $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name );
    164164
     
    203203        $ud       = bp_core_get_core_userdata( $parent_comment->user_id );
    204204        $to       = $ud->user_email;
    205         $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     205        $sitename = bp_get_option( 'blogname', 'WordPress' );
    206206        $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name );
    207207
  • trunk/bp-core/bp-core-filters.php

    r6586 r6587  
    105105 *
    106106 * @package BuddyPress Core
    107  * @uses get_blog_option() fetches the value for a meta_key in the wp_X_options table
     107 * @uses bp_get_option() fetches the value for a meta_key in the wp_X_options table
    108108 * @return The blog name for the root blog
    109109 */
    110110function bp_core_email_from_name_filter() {
    111     return apply_filters( 'bp_core_email_from_name_filter', wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES ) );
     111    return apply_filters( 'bp_core_email_from_name_filter', bp_get_option( 'blogname', 'WordPress' ) );
    112112}
    113113add_filter( 'wp_mail_from_name', 'bp_core_email_from_name_filter' );
     
    253253        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    254254
    255     $from_name       = get_site_option( 'site_name', 'WordPress' );
     255    $from_name       = bp_get_option( 'blogname', 'WordPress' );
    256256    $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
    257257    $message         = sprintf( __( "Thanks for registering! To complete the activation of your account and blog, please click the following link:\n\n%1\$s\n\n\n\nAfter you activate, you can visit your blog here:\n\n%2\$s", 'buddypress' ), $activate_url, esc_url( "http://{$domain}{$path}" ) );
     
    281281        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    282282
    283     $from_name       = get_site_option( 'site_name', 'WordPress' );
     283    $from_name       = bp_get_option( 'blogname', 'WordPress' );
    284284    $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
    285285    $message         = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url );
  • trunk/bp-core/deprecated/1.5.php

    r6583 r6587  
    350350            $ud = bp_core_get_core_userdata( $receiver_user_id );
    351351            $to = $ud->user_email;
    352             $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     352            $sitename = bp_get_option( 'blogname', 'WordPress' );
    353353            $subject  = '[' . $sitename . '] ' . sprintf( __( '%1$s mentioned you in the group "%2$s"', 'buddypress' ), $poster_name, $group->name );
    354354
  • trunk/bp-friends/bp-friends-notifications.php

    r6342 r6587  
    2929    // Set up and send the message
    3030    $to       = $ud->user_email;
    31     $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     31    $sitename = bp_get_option( 'blogname', 'WordPress' );
    3232    $subject  = '[' . $sitename . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name );
    3333
     
    6868    // Set up and send the message
    6969    $to       = $ud->user_email;
    70     $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     70    $sitename = bp_get_option( 'blogname', 'WordPress' );
    7171    $subject  = '[' . $sitename . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name );
    7272
  • trunk/bp-groups/bp-groups-notifications.php

    r6342 r6587  
    1717
    1818    $group    = groups_get_group( array( 'group_id' => $group_id ) );
    19     $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     19    $sitename = bp_get_option( 'blogname', 'WordPress' );
    2020    $subject  = '[' . $sitename . '] ' . __( 'Group Details Updated', 'buddypress' );
    2121
     
    7474    // Set up and send the message
    7575    $to       = $ud->user_email;
    76     $sitename = wp_specialchars_decode( bp_get_option( 'blogname' ), ENT_QUOTES );
     76    $sitename = bp_get_option( 'blogname', 'WordPress' );
    7777    $subject  = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
    7878
     
    123123    // Set up and send the message
    124124    $to       = $ud->user_email;
    125     $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     125    $sitename = bp_get_option( 'blogname', 'WordPress' );
    126126
    127127    if ( $accepted ) {
     
    182182    // Set up and send the message
    183183    $to       = $ud->user_email;
    184     $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     184    $sitename = bp_get_option( 'blogname', 'WordPress' );
    185185    $subject  = '[' . $sitename . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
    186186
     
    232232        // Set up and send the message
    233233        $to       = $invited_ud->user_email;
    234         $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     234        $sitename = bp_get_option( 'blogname', 'WordPress' );
    235235        $subject  = '[' . $sitename . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
    236236
  • trunk/bp-members/bp-members-functions.php

    r6574 r6587  
    13401340    $activate_url = esc_url( $activate_url );
    13411341
    1342     $from_name = ( '' == bp_get_option( 'blogname' ) ) ? __( 'BuddyPress', 'buddypress' ) : esc_html( bp_get_option( 'blogname' ) );
     1342    $from_name = bp_get_option( 'blogname', 'WordPress' );
    13431343
    13441344    $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url );
  • trunk/bp-messages/bp-messages-notifications.php

    r6541 r6587  
    4848            // Set up and send the message
    4949            $email_to      = $ud->user_email;
    50             $sitename      = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
     50            $sitename      = bp_get_option( 'blogname', 'WordPress' );
    5151            $email_subject = '[' . $sitename . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), $sender_name );
    5252
Note: See TracChangeset for help on using the changeset viewer.