Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/22/2010 11:09:28 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2523 props cnorris23

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-groups/bp-groups-notifications.php

    r2719 r3145  
    55
    66        $group = new BP_Groups_Group( $group_id );
    7         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . __( 'Group Details Updated', 'buddypress' );
     7        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . __( 'Group Details Updated', 'buddypress' );
    88
    99        $user_ids = BP_Groups_Member::get_group_member_ids( $group->id );
    1010        foreach ( (array)$user_ids as $user_id ) {
    11                 if ( 'no' == get_usermeta( $user_id, 'notification_groups_group_updated' ) ) continue;
     11                if ( 'no' == get_user_meta( $user_id, 'notification_groups_group_updated', true ) ) continue;
    1212
    1313                $ud = bp_core_get_core_userdata( $user_id );
    … …  
    4545        bp_core_add_notification( $requesting_user_id, $admin_id, 'groups', 'new_membership_request', $group_id );
    4646
    47         if ( 'no' == get_usermeta( $admin_id, 'notification_groups_membership_request' ) )
     47        if ( 'no' == get_user_meta( $admin_id, 'notification_groups_membership_request', true ) )
    4848                return false;
    4949
    … …  
    6060        // Set up and send the message
    6161        $to = $ud->user_email;
    62         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
     62        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
    6363
    6464$message = sprintf( __(
    … …  
    9494                bp_core_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_rejected' );
    9595
    96         if ( 'no' == get_usermeta( $requesting_user_id, 'notification_membership_request_completed' ) )
     96        if ( 'no' == get_user_meta( $requesting_user_id, 'notification_membership_request_completed', true ) )
    9797                return false;
    9898
    … …  
    108108
    109109        if ( $accepted ) {
    110                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );
     110                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );
    111111                $message = sprintf( __(
    112112'Your membership request for the group "%s" has been accepted.
    … …  
    118118
    119119        } else {
    120                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );
     120                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );
    121121                $message = sprintf( __(
    122122'Your membership request for the group "%s" has been rejected.
    … …  
    152152        bp_core_add_notification( $group_id, $user_id, 'groups', $type );
    153153
    154         if ( 'no' == get_usermeta( $user_id, 'notification_groups_admin_promotion' ) )
     154        if ( 'no' == get_user_meta( $user_id, 'notification_groups_admin_promotion', true ) )
    155155                return false;
    156156
    … …  
    164164        $to = $ud->user_email;
    165165
    166         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
     166        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
    167167
    168168        $message = sprintf( __(
    … …  
    200200                bp_core_add_notification( $group->id, $invited_user_id, 'groups', 'group_invite' );
    201201
    202                 if ( 'no' == get_usermeta( $invited_user_id, 'notification_groups_invite' ) )
     202                if ( 'no' == get_user_meta( $invited_user_id, 'notification_groups_invite', true ) )
    203203                        return false;
    204204
    … …  
    212212                $to = $invited_ud->user_email;
    213213
    214                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
     214                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
    215215
    216216                $message = sprintf( __(
    … …  
    259259
    260260                // Now email the user with the contents of the message (if they have enabled email notifications)
    261                 if ( 'no' != get_usermeta( $user_id, 'notification_activity_new_mention' ) ) {
     261                if ( 'no' != get_user_meta( $user_id, 'notification_activity_new_mention', true ) ) {
    262262                        $poster_name = bp_core_get_user_displayname( $poster_user_id );
    263263
    … …  
    271271                        $ud = bp_core_get_core_userdata( $receiver_user_id );
    272272                        $to = $ud->user_email;
    273                         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name );
     273                        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name );
    274274
    275275$message = sprintf( __(
Note: See TracChangeset for help on using the changeset viewer.