Skip to:
Content

BuddyPress.org

Changeset 2719


Ignore:
Timestamp:
02/15/2010 10:30:56 AM (17 years ago)
Author:
apeatling
Message:

Fixes #1949

Location:
trunk
Files:
5 edited

Legend:

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

    r2717 r2719  
    2323                        $settings_link = bp_core_get_user_domain( $receiver_user_id ) .  BP_SETTINGS_SLUG . '/notifications/';
    2424
     25                        $poster_name = stripslashes( $poster_name );
     26                        $content = bp_activity_filter_kses( stripslashes($content) );
     27
    2528                        // Set up and send the message
    2629                        $ud = bp_core_get_core_userdata( $receiver_user_id );
    2730                        $to = $ud->user_email;
    28                         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), stripslashes($poster_name) );
     31                        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
    2932
    3033$message = sprintf( __(
    … …  
    3639
    3740---------------------
    38 ', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes($content) ), $message_link );
     41', 'buddypress' ), $poster_name, $content, $message_link );
    3942
    4043                        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    … …  
    4245                        /* Send the message */
    4346                        $to = apply_filters( 'bp_activity_at_message_notification_to', $to );
    44                         $subject = apply_filters( 'bp_activity_at_message_notification_subject', $subject );
    45                         $message = apply_filters( 'bp_activity_at_message_notification_message', $message );
     47                        $subject = apply_filters( 'bp_activity_at_message_notification_subject', $subject, $poster_name );
     48                        $message = apply_filters( 'bp_activity_at_message_notification_message', $message, $poster_name, $content, $message_link );
    4649
    4750                        wp_mail( $to, $subject, $message );
    … …  
    6366                $settings_link = bp_core_get_user_domain( $original_activity->user_id ) .  BP_SETTINGS_SLUG . '/notifications/';
    6467
     68                $poster_name = stripslashes( $poster_name );
     69                $content = bp_activity_filter_kses( stripslashes($content) );
     70
    6571                // Set up and send the message
    6672                $ud = bp_core_get_core_userdata( $original_activity->user_id );
    6773                $to = $ud->user_email;
    68                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), stripslashes_deep( $poster_name ) );
     74                $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name );
    6975
    7076$message = sprintf( __(
    … …  
    7682
    7783---------------------
    78 ', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes( $content ) ), $thread_link );
     84', 'buddypress' ), $poster_name, $content, $thread_link );
    7985
    8086                $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    … …  
    8288                /* Send the message */
    8389                $to = apply_filters( 'bp_activity_new_comment_notification_to', $to );
    84                 $subject = apply_filters( 'bp_activity_new_comment_notification_subject', $subject );
    85                 $message = apply_filters( 'bp_activity_new_comment_notification_message', $message );
     90                $subject = apply_filters( 'bp_activity_new_comment_notification_subject', $subject, $poster_name );
     91                $message = apply_filters( 'bp_activity_new_comment_notification_message', $message, $poster_name, $content, $thread_link );
    8692
    8793                wp_mail( $to, $subject, $message );
    … …  
    105111                $ud = bp_core_get_core_userdata( $parent_comment->user_id );
    106112                $to = $ud->user_email;
    107                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), stripslashes_deep( $poster_name ) );
     113                $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name );
     114
     115                $poster_name = stripslashes( $poster_name );
     116                $content = bp_activity_filter_kses( stripslashes( $content ) );
    108117
    109118$message = sprintf( __(
    … …  
    115124
    116125---------------------
    117 ', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes( $content ) ), $thread_link );
     126', 'buddypress' ), $poster_name, $content, $thread_link );
    118127
    119128                $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    … …  
    121130                /* Send the message */
    122131                $to = apply_filters( 'bp_activity_new_comment_notification_comment_author_to', $to );
    123                 $subject = apply_filters( 'bp_activity_new_comment_notification_comment_author_subject', $subject );
    124                 $message = apply_filters( 'bp_activity_new_comment_notification_comment_author_message', $message );
     132                $subject = apply_filters( 'bp_activity_new_comment_notification_comment_author_subject', $subject, $poster_name );
     133                $message = apply_filters( 'bp_activity_new_comment_notification_comment_author_message', $message, $poster_name, $content );
    125134
    126135                wp_mail( $to, $subject, $message );
  • trunk/bp-activity/bp-activity-templatetags.php

    r2718 r2719  
    939939                        $content = $activities_template->activity->action . $activities_template->activity->content;
    940940
    941                 return apply_filters( 'bp_get_activity_feed_item_description', html_entity_decode( utf8_encode( str_replace( '%s', '', $content ) ) ) );
     941                return apply_filters( 'bp_get_activity_feed_item_description', html_entity_decode( str_replace( '%s', '', $content ) ) );
    942942        }
    943943
  • trunk/bp-friends/bp-friends-notifications.php

    r2717 r2719  
    3535        /* Send the message */
    3636        $to = apply_filters( 'friends_notification_new_request_to', $to );
    37         $subject = apply_filters( 'friends_notification_new_request_subject', $subject );
    38         $message = apply_filters( 'friends_notification_new_request_message', $message );
     37        $subject = apply_filters( 'friends_notification_new_request_subject', $subject, $initiator_name );
     38        $message = apply_filters( 'friends_notification_new_request_message', $message, $initiator_name, $initiator_link, $all_requests_link );
    3939
    4040        wp_mail( $to, $subject, $message );
    … …  
    7272        /* Send the message */
    7373        $to = apply_filters( 'friends_notification_accepted_request_to', $to );
    74         $subject = apply_filters( 'friends_notification_accepted_request_subject', $subject );
    75         $message = apply_filters( 'friends_notification_accepted_request_message', $message );
     74        $subject = apply_filters( 'friends_notification_accepted_request_subject', $subject, $friend_name );
     75        $message = apply_filters( 'friends_notification_accepted_request_message', $message, $friend_name, $friend_link );
    7676
    7777        wp_mail( $to, $subject, $message );
  • trunk/bp-groups/bp-groups-notifications.php

    r2717 r2719  
    3131                /* Send the message */
    3232                $to = apply_filters( 'groups_notification_group_updated_to', $to );
    33                 $subject = apply_filters( 'groups_notification_group_updated_subject', $subject );
    34                 $message = apply_filters( 'groups_notification_group_updated_message', $message );
     33                $subject = apply_filters( 'groups_notification_group_updated_subject', $subject, &$group );
     34                $message = apply_filters( 'groups_notification_group_updated_message', $message, &$group, $group_link );
    3535
    3636                wp_mail( $to, $subject, $message );
    … …  
    7979        /* Send the message */
    8080        $to = apply_filters( 'groups_notification_new_membership_request_to', $to );
    81         $subject = apply_filters( 'groups_notification_new_membership_request_subject', $subject );
    82         $message = apply_filters( 'groups_notification_new_membership_request_message', $message );
     81        $subject = apply_filters( 'groups_notification_new_membership_request_subject', $subject, &$group );
     82        $message = apply_filters( 'groups_notification_new_membership_request_message', $message, &$group, $requesting_user_name, $profile_link, $group_requests );
    8383
    8484        wp_mail( $to, $subject, $message );
    … …  
    132132        /* Send the message */
    133133        $to = apply_filters( 'groups_notification_membership_request_completed_to', $to );
    134         $subject = apply_filters( 'groups_notification_membership_request_completed_subject', $subject );
    135         $message = apply_filters( 'groups_notification_membership_request_completed_message', $message );
     134        $subject = apply_filters( 'groups_notification_membership_request_completed_subject', $subject, &$group );
     135        $message = apply_filters( 'groups_notification_membership_request_completed_message', $message, &$group, $group_link );
    136136
    137137        wp_mail( $to, $subject, $message );
    … …  
    178178        /* Send the message */
    179179        $to = apply_filters( 'groups_notification_promoted_member_to', $to );
    180         $subject = apply_filters( 'groups_notification_promoted_member_subject', $subject );
    181         $message = apply_filters( 'groups_notification_promoted_member_message', $message );
     180        $subject = apply_filters( 'groups_notification_promoted_member_subject', $subject, &$group );
     181        $message = apply_filters( 'groups_notification_promoted_member_message', $message, &$group, $promoted_to, $group_link );
    182182
    183183        wp_mail( $to, $subject, $message );
    … …  
    230230                /* Send the message */
    231231                $to = apply_filters( 'groups_notification_group_invites_to', $to );
    232                 $subject = apply_filters( 'groups_notification_group_invites_subject', $subject );
    233                 $message = apply_filters( 'groups_notification_group_invites_message', $message );
     232                $subject = apply_filters( 'groups_notification_group_invites_subject', $subject, &$group );
     233                $message = apply_filters( 'groups_notification_group_invites_message', $message, &$group, $inviter_name, $inviter_link, $invites_link, $group_link );
    234234
    235235                wp_mail( $to, $subject, $message );
    … …  
    265265                        $settings_link = bp_core_get_user_domain( $receiver_user_id ) .  BP_SETTINGS_SLUG . '/notifications/';
    266266
     267                        $poster_name = stripslashes( $poster_name );
     268                        $content = bp_groups_filter_kses( stripslashes( $content ) );
     269
    267270                        // Set up and send the message
    268271                        $ud = bp_core_get_core_userdata( $receiver_user_id );
    269272                        $to = $ud->user_email;
    270                         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), stripslashes( $poster_name ), $group->name );
     273                        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name );
    271274
    272275$message = sprintf( __(
    … …  
    278281
    279282---------------------
    280 ', 'buddypress' ), $poster_name, $group->name, bp_groups_filter_kses( stripslashes( $content ) ), $message_link );
     283', 'buddypress' ), $poster_name, $group->name, $content, $message_link );
    281284
    282285                        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    … …  
    284287                        /* Send the message */
    285288                        $to = apply_filters( 'groups_at_message_notification_to', $to );
    286                         $subject = apply_filters( 'groups_at_message_notification_subject', $subject );
    287                         $message = apply_filters( 'groups_at_message_notification_message', $message );
     289                        $subject = apply_filters( 'groups_at_message_notification_subject', $subject, &$group, $poster_name );
     290                        $message = apply_filters( 'groups_at_message_notification_message', $message, &$group, $poster_name, $content, $message_link );
    288291
    289292                        wp_mail( $to, $subject, $message );
  • trunk/bp-messages/bp-messages-notifications.php

    r2717 r2719  
    1414                $settings_link = bp_core_get_user_domain( $recipient->user_id ) .  BP_SETTINGS_SLUG . '/notifications/';
    1515
     16                $sender_name = stripslashes( $sender_name );
     17                $subject = stripslashes( wp_filter_kses( $subject ) );
     18                $content = stripslashes( wp_filter_kses( $content ) );
     19
    1620                // Set up and send the message
    1721                $email_to = $ud->user_email;
    18                 $email_subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), stripslashes( $sender_name ) );
     22                $email_subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), $sender_name );
    1923
    2024                $email_content = sprintf( __(
    … …  
    2832
    2933---------------------
    30 ', 'buddypress' ), $sender_name, stripslashes( wp_filter_kses( $subject ) ), stripslashes( wp_filter_kses( $content ) ), $message_link );
     34', 'buddypress' ), $sender_name, $subject, $content, $message_link );
    3135
    3236                $content .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    … …  
    3438                /* Send the message */
    3539                $email_to = apply_filters( 'messages_notification_new_message_to', $email_to );
    36                 $email_subject = apply_filters( 'messages_notification_new_message_subject', $email_subject );
    37                 $email_content = apply_filters( 'messages_notification_new_message_message', $email_content );
     40                $email_subject = apply_filters( 'messages_notification_new_message_subject', $email_subject, $sender_name );
     41                $email_content = apply_filters( 'messages_notification_new_message_message', $email_content, $sender_name, $subject, $content, $message_link );
    3842
    3943                wp_mail( $email_to, $email_subject, $email_content );
Note: See TracChangeset for help on using the changeset viewer.