Skip to:
Content

BuddyPress.org

Ticket #5885: 5885.patch

File 5885.patch, 1.9 KB (added by boonebgorges, 10 years ago)
  • src/bp-groups/bp-groups-notifications.php

    diff --git src/bp-groups/bp-groups-notifications.php src/bp-groups/bp-groups-notifications.php
    index c4b1a48..0efa9cf 100644
    function groups_notification_new_membership_request( $requesting_user_id = 0, $a 
    111111        // Link to the group administrator email settings: %s in "disable notifications" part of the email
    112112        $settings_link  = bp_core_get_user_domain( $admin_id ) . $settings_slug . '/notifications/';
    113113
     114        // Fetch the message, if there's one to fetch
     115        $membership = new BP_Groups_Member( false, false, $membership_id );
     116
    114117        // Set up and send the message
    115118        $to       = $ud->user_email;
    116119        $subject  = bp_get_email_subject( array( 'text' => sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name ) ) );
    117120
    118 $message = sprintf( __(
     121        if ( ! empty( $membership->comments ) ) {
     122                $message = sprintf( __(
     123'%1$s wants to join the group "%2$s".
     124
     125Message from %1$s: "%3$s"
     126
     127Because you are the administrator of this group, you must either accept or reject the membership request.
     128
     129To view all pending membership requests for this group, please visit:
     130%4$s
     131
     132To view %5$s\'s profile: %6$s
     133
     134---------------------
     135', 'buddypress' ), $requesting_user_name, $group->name, $membership->comments, $group_requests, $requesting_user_name, $profile_link );
     136
     137        } else {
     138
     139                $message = sprintf( __(
    119140'%1$s wants to join the group "%2$s".
    120141
    121142Because you are the administrator of this group, you must either accept or reject the membership request.
    To view %4$s\'s profile: %5$s 
    127148
    128149---------------------
    129150', 'buddypress' ), $requesting_user_name, $group->name, $group_requests, $requesting_user_name, $profile_link );
     151        }
    130152
    131153        // Only show the disable notifications line if the settings component is enabled
    132154        if ( bp_is_active( 'settings' ) ) {