Skip to:
Content

BuddyPress.org


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/1.2.6/bp-activity/bp-activity-notifications.php

    r2869 r3297  
    55
    66    /* Scan for @username strings in an activity update. Notify each user. */
    7     $pattern = '/[@]+([A-Za-z0-9-_]+)/';
     7    $pattern = '/[@]+([A-Za-z0-9-_\.]+)/';
    88    preg_match_all( $pattern, $content, $usernames );
    99
     
    1717
    1818        // Now email the user with the contents of the message (if they have enabled email notifications)
    19         if ( 'no' != get_usermeta( $receiver_user_id, 'notification_activity_new_mention' ) ) {
     19        if ( 'no' != get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
    2020            $poster_name = bp_core_get_user_displayname( $poster_user_id );
    2121
     
    2727
    2828            // Set up and send the message
    29             $ud = bp_core_get_core_userdata( $receiver_user_id );
    30             $to = $ud->user_email;
    31             $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
     29            $ud       = bp_core_get_core_userdata( $receiver_user_id );
     30            $to       = $ud->user_email;
     31            $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
     32            $subject  = '[' . $sitename . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
    3233
    3334$message = sprintf( __(
     
    6162    $original_activity = new BP_Activity_Activity( $activity_id );
    6263
    63     if ( $original_activity->user_id != $commenter_id && 'no' != get_usermeta( $original_activity->user_id, 'notification_activity_new_reply' ) ) {
     64    if ( $original_activity->user_id != $commenter_id && 'no' != get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) {
    6465        $poster_name = bp_core_get_user_displayname( $commenter_id );
    6566        $thread_link = bp_activity_get_permalink( $activity_id );
     
    7071
    7172        // Set up and send the message
    72         $ud = bp_core_get_core_userdata( $original_activity->user_id );
    73         $to = $ud->user_email;
    74         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name );
     73        $ud       = bp_core_get_core_userdata( $original_activity->user_id );
     74        $to       = $ud->user_email;
     75        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
     76        $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name );
    7577
    7678$message = sprintf( __(
     
    103105    $parent_comment = new BP_Activity_Activity( $parent_id );
    104106
    105     if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != get_usermeta( $parent_comment->user_id, 'notification_activity_new_reply' ) ) {
     107    if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) {
    106108        $poster_name = bp_core_get_user_displayname( $commenter_id );
    107109        $thread_link = bp_activity_get_permalink( $activity_id );
     
    109111
    110112        // Set up and send the message
    111         $ud = bp_core_get_core_userdata( $parent_comment->user_id );
    112         $to = $ud->user_email;
    113         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name );
     113        $ud       = bp_core_get_core_userdata( $parent_comment->user_id );
     114        $to       = $ud->user_email;
     115        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
     116        $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name );
    114117
    115118        $poster_name = stripslashes( $poster_name );
Note: See TracChangeset for help on using the changeset viewer.