<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [3211] branches/1.2: Fixes #2482</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>3211</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2010-08-21 06:01:31 +0000 (Sat, 21 Aug 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixes #2482</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branches12bpactivitybpactivitynotificationsphp">branches/1.2/bp-activity/bp-activity-notifications.php</a></li>
<li><a href="#branches12bpfriendsbpfriendsnotificationsphp">branches/1.2/bp-friends/bp-friends-notifications.php</a></li>
<li><a href="#branches12bpgroupsbpgroupsnotificationsphp">branches/1.2/bp-groups/bp-groups-notifications.php</a></li>
<li><a href="#branches12bpmessagesbpmessagesnotificationsphp">branches/1.2/bp-messages/bp-messages-notifications.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches12bpactivitybpactivitynotificationsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-activity/bp-activity-notifications.php (3210 => 3211)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-activity/bp-activity-notifications.php        2010-08-21 05:15:49 UTC (rev 3210)
+++ branches/1.2/bp-activity/bp-activity-notifications.php        2010-08-21 06:01:31 UTC (rev 3211)
</span><span class="lines">@@ -26,9 +26,10 @@
</span><span class="cx">                         $content = bp_activity_filter_kses( stripslashes($content) );
</span><span class="cx">
</span><span class="cx">                         // Set up and send the message
</span><del>-                        $ud = bp_core_get_core_userdata( $receiver_user_id );
-                        $to = $ud->user_email;
-                        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
</del><ins>+                        $ud = bp_core_get_core_userdata( $receiver_user_id );
+                        $to = $ud->user_email;
+                        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+                        $subject = '[' . $sitename . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
</ins><span class="cx">
</span><span class="cx"> $message = sprintf( __(
</span><span class="cx"> '%s mentioned you in an update:
</span><span class="lines">@@ -69,9 +70,10 @@
</span><span class="cx">                 $content = bp_activity_filter_kses( stripslashes($content) );
</span><span class="cx">
</span><span class="cx">                 // Set up and send the message
</span><del>-                $ud = bp_core_get_core_userdata( $original_activity->user_id );
-                $to = $ud->user_email;
-                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name );
</del><ins>+                $ud = bp_core_get_core_userdata( $original_activity->user_id );
+                $to = $ud->user_email;
+                $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+                $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name );
</ins><span class="cx">
</span><span class="cx"> $message = sprintf( __(
</span><span class="cx"> '%s replied to one of your updates:
</span><span class="lines">@@ -108,9 +110,10 @@
</span><span class="cx">                 $settings_link = bp_core_get_user_domain( $parent_comment->user_id ) . BP_SETTINGS_SLUG . '/notifications/';
</span><span class="cx">
</span><span class="cx">                 // Set up and send the message
</span><del>-                $ud = bp_core_get_core_userdata( $parent_comment->user_id );
-                $to = $ud->user_email;
-                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name );
</del><ins>+                $ud = bp_core_get_core_userdata( $parent_comment->user_id );
+                $to = $ud->user_email;
+                $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+                $subject = '[' . $sitename . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name );
</ins><span class="cx">
</span><span class="cx">                 $poster_name = stripslashes( $poster_name );
</span><span class="cx">                 $content = bp_activity_filter_kses( stripslashes( $content ) );
</span></span></pre></div>
<a id="branches12bpfriendsbpfriendsnotificationsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-friends/bp-friends-notifications.php (3210 => 3211)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-friends/bp-friends-notifications.php        2010-08-21 05:15:49 UTC (rev 3210)
+++ branches/1.2/bp-friends/bp-friends-notifications.php        2010-08-21 06:01:31 UTC (rev 3211)
</span><span class="lines">@@ -17,8 +17,9 @@
</span><span class="cx">         $initiator_link = bp_core_get_user_domain( $initiator_id );
</span><span class="cx">
</span><span class="cx">         // Set up and send the message
</span><del>-        $to = $ud->user_email;
-        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name );
</del><ins>+        $to = $ud->user_email;
+        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+        $subject = '[' . $sitename . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name );
</ins><span class="cx">
</span><span class="cx">         $message = sprintf( __(
</span><span class="cx"> "%s wants to add you as a friend.
</span><span class="lines">@@ -56,8 +57,9 @@
</span><span class="cx">         $settings_link = bp_core_get_user_domain( $initiator_id ) . BP_SETTINGS_SLUG . '/notifications';
</span><span class="cx">
</span><span class="cx">         // Set up and send the message
</span><del>-        $to = $ud->user_email;
-        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name );
</del><ins>+        $to = $ud->user_email;
+        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+        $subject = '[' . $sitename . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name );
</ins><span class="cx">
</span><span class="cx">         $message = sprintf( __(
</span><span class="cx"> '%s accepted your friend request.
</span></span></pre></div>
<a id="branches12bpgroupsbpgroupsnotificationsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-groups/bp-groups-notifications.php (3210 => 3211)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-groups/bp-groups-notifications.php        2010-08-21 05:15:49 UTC (rev 3210)
+++ branches/1.2/bp-groups/bp-groups-notifications.php        2010-08-21 06:01:31 UTC (rev 3211)
</span><span class="lines">@@ -3,8 +3,9 @@
</span><span class="cx"> function groups_notification_group_updated( $group_id ) {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        $group = new BP_Groups_Group( $group_id );
-        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . __( 'Group Details Updated', 'buddypress' );
</del><ins>+        $group = new BP_Groups_Group( $group_id );
+        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+        $subject = '[' . $sitename . '] ' . __( 'Group Details Updated', 'buddypress' );
</ins><span class="cx">
</span><span class="cx">         $user_ids = BP_Groups_Member::get_group_member_ids( $group->id );
</span><span class="cx">         foreach ( (array)$user_ids as $user_id ) {
</span><span class="lines">@@ -58,8 +59,9 @@
</span><span class="cx">         $settings_link = bp_core_get_user_domain( $requesting_user_id ) . BP_SETTINGS_SLUG . '/notifications/';
</span><span class="cx">
</span><span class="cx">         // Set up and send the message
</span><del>-        $to = $ud->user_email;
-        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
</del><ins>+        $to = $ud->user_email;
+        $sitename = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
+        $subject = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
</ins><span class="cx">
</span><span class="cx"> $message = sprintf( __(
</span><span class="cx"> '%s wants to join the group "%s".
</span><span class="lines">@@ -104,11 +106,12 @@
</span><span class="cx">         $settings_link = bp_core_get_user_domain( $requesting_user_id ) . BP_SETTINGS_SLUG . '/notifications/';
</span><span class="cx">
</span><span class="cx">         // Set up and send the message
</span><del>-        $to = $ud->user_email;
</del><ins>+        $to = $ud->user_email;
+        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
</ins><span class="cx">
</span><span class="cx">         if ( $accepted ) {
</span><del>-                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );
-                $message = sprintf( __(
</del><ins>+                $subject = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );
+                $message = sprintf( __(
</ins><span class="cx"> 'Your membership request for the group "%s" has been accepted.
</span><span class="cx">
</span><span class="cx"> To view the group please login and visit: %s
</span><span class="lines">@@ -117,7 +120,7 @@
</span><span class="cx"> ', 'buddypress' ), $group->name, $group_link );
</span><span class="cx">
</span><span class="cx">         } else {
</span><del>-                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );
</del><ins>+                $subject = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );
</ins><span class="cx">                 $message = sprintf( __(
</span><span class="cx"> 'Your membership request for the group "%s" has been rejected.
</span><span class="cx">
</span><span class="lines">@@ -161,10 +164,10 @@
</span><span class="cx">         $settings_link = bp_core_get_user_domain( $user_id ) . BP_SETTINGS_SLUG . '/notifications/';
</span><span class="cx">
</span><span class="cx">         // Set up and send the message
</span><del>-        $to = $ud->user_email;
</del><ins>+        $to = $ud->user_email;
+        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+        $subject = '[' . $sitename . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
</ins><span class="cx">
</span><del>-        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
-
</del><span class="cx">         $message = sprintf( __(
</span><span class="cx"> 'You have been promoted to %s for the group: "%s".
</span><span class="cx">
</span><span class="lines">@@ -209,10 +212,10 @@
</span><span class="cx">                 $invites_link = $invited_link . $bp->groups->slug . '/invites';
</span><span class="cx">
</span><span class="cx">                 // Set up and send the message
</span><del>-                $to = $invited_ud->user_email;
</del><ins>+                $to = $invited_ud->user_email;
+                $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+                $subject = '[' . $sitename . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
</ins><span class="cx">
</span><del>-                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
-
</del><span class="cx">                 $message = sprintf( __(
</span><span class="cx"> 'One of your friends %s has invited you to the group: "%s".
</span><span class="cx">
</span><span class="lines">@@ -268,9 +271,10 @@
</span><span class="cx">                         $content = bp_groups_filter_kses( stripslashes( $content ) );
</span><span class="cx">
</span><span class="cx">                         // Set up and send the message
</span><del>-                        $ud = bp_core_get_core_userdata( $receiver_user_id );
-                        $to = $ud->user_email;
-                        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name );
</del><ins>+                        $ud = bp_core_get_core_userdata( $receiver_user_id );
+                        $to = $ud->user_email;
+                        $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+                        $subject = '[' . $sitename . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name );
</ins><span class="cx">
</span><span class="cx"> $message = sprintf( __(
</span><span class="cx"> '%s mentioned you in the group "%s":
</span></span></pre></div>
<a id="branches12bpmessagesbpmessagesnotificationsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-messages/bp-messages-notifications.php (3210 => 3211)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-messages/bp-messages-notifications.php        2010-08-21 05:15:49 UTC (rev 3210)
+++ branches/1.2/bp-messages/bp-messages-notifications.php        2010-08-21 06:01:31 UTC (rev 3211)
</span><span class="lines">@@ -18,8 +18,9 @@
</span><span class="cx">                 $content = stripslashes( wp_filter_kses( $content ) );
</span><span class="cx">
</span><span class="cx">                 // Set up and send the message
</span><del>-                $email_to = $ud->user_email;
-                $email_subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), $sender_name );
</del><ins>+                $email_to = $ud->user_email;
+                $sitename = wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ), ENT_QUOTES );
+                $email_subject = '[' . $sitename . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), $sender_name );
</ins><span class="cx">
</span><span class="cx">                 $email_content = sprintf( __(
</span><span class="cx"> '%s sent you a new message:
</span></span></pre>
</div>
</div>
</body>
</html>