<!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" />
<title>[BuddyPress][3873] trunk/bp-groups: More pass-by-value cleanup, this time in entire groups component</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>3873</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-01-24 06:39:34 +0000 (Mon, 24 Jan 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>More pass-by-value cleanup, this time in entire groups component</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpgroupsbpgroupsforumsphp">trunk/bp-groups/bp-groups-forums.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsfunctionsphp">trunk/bp-groups/bp-groups-functions.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsnotificationsphp">trunk/bp-groups/bp-groups-notifications.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsscreensphp">trunk/bp-groups/bp-groups-screens.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatephp">trunk/bp-groups/bp-groups-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpgroupsbpgroupsforumsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-forums.php (3872 => 3873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-forums.php        2011-01-24 06:30:27 UTC (rev 3872)
+++ trunk/bp-groups/bp-groups-forums.php        2011-01-24 06:39:34 UTC (rev 3873)
</span><span class="lines">@@ -60,8 +60,8 @@
</span><span class="cx"> 
</span><span class="cx">                 // Record this in activity streams
</span><span class="cx">                 groups_record_activity( array(
</span><del>-                        'action'            =&gt; apply_filters( 'groups_activity_new_forum_post_action', $activity_action, $post_id, $post_text, &amp;$topic ),
-                        'content'           =&gt; apply_filters( 'groups_activity_new_forum_post_content', $activity_content, $post_id, $post_text, &amp;$topic ),
</del><ins>+                        'action'            =&gt; apply_filters( 'groups_activity_new_forum_post_action', $activity_action,   $post_id, $post_text, $topic ),
+                        'content'           =&gt; apply_filters( 'groups_activity_new_forum_post_content', $activity_content, $post_id, $post_text, $topic ),
</ins><span class="cx">                         'primary_link'      =&gt; apply_filters( 'groups_activity_new_forum_post_primary_link', &quot;{$primary_link}#post-{$post_id}&quot; ),
</span><span class="cx">                         'type'              =&gt; 'new_forum_post',
</span><span class="cx">                         'item_id'           =&gt; $bp-&gt;groups-&gt;current_group-&gt;id,
</span><span class="lines">@@ -95,15 +95,15 @@
</span><span class="cx"> 
</span><span class="cx">                 // Record this in activity streams
</span><span class="cx">                 groups_record_activity( array(
</span><del>-                        'action'            =&gt; apply_filters( 'groups_activity_new_forum_topic_action', $activity_action, $topic_text, &amp;$topic ),
-                        'content'           =&gt; apply_filters( 'groups_activity_new_forum_topic_content', $activity_content, $topic_text, &amp;$topic ),
</del><ins>+                        'action'            =&gt; apply_filters( 'groups_activity_new_forum_topic_action', $activity_action,   $topic_text, $topic ),
+                        'content'           =&gt; apply_filters( 'groups_activity_new_forum_topic_content', $activity_content, $topic_text, $topic ),
</ins><span class="cx">                         'primary_link'      =&gt; apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) . 'forum/topic/' . $topic-&gt;topic_slug . '/' ),
</span><span class="cx">                         'type'              =&gt; 'new_forum_topic',
</span><span class="cx">                         'item_id'           =&gt; $bp-&gt;groups-&gt;current_group-&gt;id,
</span><span class="cx">                         'secondary_item_id' =&gt; $topic-&gt;topic_id
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                do_action( 'groups_new_forum_topic', $bp-&gt;groups-&gt;current_group-&gt;id, &amp;$topic );
</del><ins>+                do_action( 'groups_new_forum_topic', $bp-&gt;groups-&gt;current_group-&gt;id, $topic );
</ins><span class="cx"> 
</span><span class="cx">                 return $topic;
</span><span class="cx">         }
</span><span class="lines">@@ -127,8 +127,8 @@
</span><span class="cx"> 
</span><span class="cx">                 // Record this in activity streams
</span><span class="cx">                 groups_record_activity( array(
</span><del>-                        'action'            =&gt; apply_filters( 'groups_activity_new_forum_topic_action', $activity_action, $topic_text, &amp;$topic ),
-                        'content'           =&gt; apply_filters( 'groups_activity_new_forum_topic_content', $activity_content, $topic_text, &amp;$topic ),
</del><ins>+                        'action'            =&gt; apply_filters( 'groups_activity_new_forum_topic_action', $activity_action,   $topic_text, $topic ),
+                        'content'           =&gt; apply_filters( 'groups_activity_new_forum_topic_content', $activity_content, $topic_text, $topic ),
</ins><span class="cx">                         'primary_link'      =&gt; apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) . 'forum/topic/' . $topic-&gt;topic_slug . '/' ),
</span><span class="cx">                         'type'              =&gt; 'new_forum_topic',
</span><span class="cx">                         'item_id'           =&gt; (int)$bp-&gt;groups-&gt;current_group-&gt;id,
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx">                         'recorded_time '    =&gt; $topic-&gt;topic_time
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                do_action( 'groups_update_group_forum_topic', &amp;$topic );
</del><ins>+                do_action( 'groups_update_group_forum_topic', $topic );
</ins><span class="cx"> 
</span><span class="cx">                 return $topic;
</span><span class="cx">         }
</span><span class="lines">@@ -169,8 +169,8 @@
</span><span class="cx">                 // Update the entry in activity streams
</span><span class="cx">                 groups_record_activity( array(
</span><span class="cx">                         'id'                =&gt; $id,
</span><del>-                        'action'            =&gt; apply_filters( 'groups_activity_new_forum_post_action', $activity_action, $post_text, &amp;$topic, &amp;$forum_post ),
-                        'content'           =&gt; apply_filters( 'groups_activity_new_forum_post_content', $activity_content, $post_text, &amp;$topic, &amp;$forum_post ),
</del><ins>+                        'action'            =&gt; apply_filters( 'groups_activity_new_forum_post_action', $activity_action, $post_text,   $topic, $forum_post ),
+                        'content'           =&gt; apply_filters( 'groups_activity_new_forum_post_content', $activity_content, $post_text, $topic, $forum_post ),
</ins><span class="cx">                         'primary_link'      =&gt; apply_filters( 'groups_activity_new_forum_post_primary_link', $primary_link . &quot;#post-&quot; . $post_id ),
</span><span class="cx">                         'type'              =&gt; 'new_forum_post',
</span><span class="cx">                         'item_id'           =&gt; (int)$bp-&gt;groups-&gt;current_group-&gt;id,
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">                         'recorded_time'     =&gt; $post-&gt;post_time
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                do_action( 'groups_update_group_forum_post', &amp;$post, &amp;$topic );
</del><ins>+                do_action( 'groups_update_group_forum_post', $post, $topic );
</ins><span class="cx"> 
</span><span class="cx">                 return $post_id;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-functions.php (3872 => 3873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-functions.php        2011-01-24 06:30:27 UTC (rev 3872)
+++ trunk/bp-groups/bp-groups-functions.php        2011-01-24 06:39:34 UTC (rev 3873)
</span><span class="lines">@@ -400,7 +400,7 @@
</span><span class="cx"> 
</span><span class="cx">         $groups = BP_Groups_Group::get( $type, $per_page, $page, $user_id, $search_terms, $include, $populate_extras, $exclude, $show_hidden );
</span><span class="cx"> 
</span><del>-        return apply_filters( 'groups_get_groups', $groups, &amp;$params );
</del><ins>+        return apply_filters( 'groups_get_groups', $groups, $params );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function groups_get_total_group_count() {
</span><span class="lines">@@ -800,7 +800,7 @@
</span><span class="cx">         $group = new BP_Groups_Group( $membership-&gt;group_id );
</span><span class="cx"> 
</span><span class="cx">         groups_record_activity( array(
</span><del>-                'action'  =&gt; apply_filters( 'groups_activity_membership_accepted_action', sprintf( __( '%1$s joined the group %2$s', 'buddypress'), bp_core_get_userlink( $membership-&gt;user_id ), '&lt;a href=&quot;' . bp_get_group_permalink( $group ) . '&quot;&gt;' . esc_attr( $group-&gt;name ) . '&lt;/a&gt;' ), $membership-&gt;user_id, &amp;$group ),
</del><ins>+                'action'  =&gt; apply_filters( 'groups_activity_membership_accepted_action', sprintf( __( '%1$s joined the group %2$s', 'buddypress'), bp_core_get_userlink( $membership-&gt;user_id ), '&lt;a href=&quot;' . bp_get_group_permalink( $group ) . '&quot;&gt;' . esc_attr( $group-&gt;name ) . '&lt;/a&gt;' ), $membership-&gt;user_id, $group ),
</ins><span class="cx">                 'type'    =&gt; 'joined_group',
</span><span class="cx">                 'item_id' =&gt; $membership-&gt;group_id,
</span><span class="cx">                 'user_id' =&gt; $membership-&gt;user_id
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsnotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-notifications.php (3872 => 3873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-notifications.php        2011-01-24 06:30:27 UTC (rev 3872)
+++ trunk/bp-groups/bp-groups-notifications.php        2011-01-24 06:39:34 UTC (rev 3873)
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx"> 
</span><span class="cx">                 /* Send the message */
</span><span class="cx">                 $to = apply_filters( 'groups_notification_group_updated_to', $to );
</span><del>-                $subject = apply_filters( 'groups_notification_group_updated_subject', $subject, &amp;$group );
-                $message = apply_filters( 'groups_notification_group_updated_message', $message, &amp;$group, $group_link );
</del><ins>+                $subject = apply_filters( 'groups_notification_group_updated_subject', $subject, $group );
+                $message = apply_filters( 'groups_notification_group_updated_message', $message, $group, $group_link );
</ins><span class="cx"> 
</span><span class="cx">                 wp_mail( $to, $subject, $message );
</span><span class="cx"> 
</span><span class="lines">@@ -82,8 +82,8 @@
</span><span class="cx"> 
</span><span class="cx">         /* Send the message */
</span><span class="cx">         $to = apply_filters( 'groups_notification_new_membership_request_to', $to );
</span><del>-        $subject = apply_filters( 'groups_notification_new_membership_request_subject', $subject, &amp;$group );
-        $message = apply_filters( 'groups_notification_new_membership_request_message', $message, &amp;$group, $requesting_user_name, $profile_link, $group_requests );
</del><ins>+        $subject = apply_filters( 'groups_notification_new_membership_request_subject', $subject, $group );
+        $message = apply_filters( 'groups_notification_new_membership_request_message', $message, $group, $requesting_user_name, $profile_link, $group_requests );
</ins><span class="cx"> 
</span><span class="cx">         wp_mail( $to, $subject, $message );
</span><span class="cx"> 
</span><span class="lines">@@ -138,8 +138,8 @@
</span><span class="cx"> 
</span><span class="cx">         /* Send the message */
</span><span class="cx">         $to = apply_filters( 'groups_notification_membership_request_completed_to', $to );
</span><del>-        $subject = apply_filters( 'groups_notification_membership_request_completed_subject', $subject, &amp;$group );
-        $message = apply_filters( 'groups_notification_membership_request_completed_message', $message, &amp;$group, $group_link  );
</del><ins>+        $subject = apply_filters( 'groups_notification_membership_request_completed_subject', $subject, $group );
+        $message = apply_filters( 'groups_notification_membership_request_completed_message', $message, $group, $group_link  );
</ins><span class="cx"> 
</span><span class="cx">         wp_mail( $to, $subject, $message );
</span><span class="cx"> 
</span><span class="lines">@@ -186,8 +186,8 @@
</span><span class="cx"> 
</span><span class="cx">         /* Send the message */
</span><span class="cx">         $to = apply_filters( 'groups_notification_promoted_member_to', $to );
</span><del>-        $subject = apply_filters( 'groups_notification_promoted_member_subject', $subject, &amp;$group );
-        $message = apply_filters( 'groups_notification_promoted_member_message', $message, &amp;$group, $promoted_to, $group_link );
</del><ins>+        $subject = apply_filters( 'groups_notification_promoted_member_subject', $subject, $group );
+        $message = apply_filters( 'groups_notification_promoted_member_message', $message, $group, $promoted_to, $group_link );
</ins><span class="cx"> 
</span><span class="cx">         wp_mail( $to, $subject, $message );
</span><span class="cx"> 
</span><span class="lines">@@ -240,8 +240,8 @@
</span><span class="cx"> 
</span><span class="cx">                 /* Send the message */
</span><span class="cx">                 $to = apply_filters( 'groups_notification_group_invites_to', $to );
</span><del>-                $subject = apply_filters( 'groups_notification_group_invites_subject', $subject, &amp;$group );
-                $message = apply_filters( 'groups_notification_group_invites_message', $message, &amp;$group, $inviter_name, $inviter_link, $invites_link, $group_link );
</del><ins>+                $subject = apply_filters( 'groups_notification_group_invites_subject', $subject, $group );
+                $message = apply_filters( 'groups_notification_group_invites_message', $message, $group, $inviter_name, $inviter_link, $invites_link, $group_link );
</ins><span class="cx"> 
</span><span class="cx">                 wp_mail( $to, $subject, $message );
</span><span class="cx">         }
</span><span class="lines">@@ -300,8 +300,8 @@
</span><span class="cx"> 
</span><span class="cx">                         /* Send the message */
</span><span class="cx">                         $to = apply_filters( 'groups_at_message_notification_to', $to );
</span><del>-                        $subject = apply_filters( 'groups_at_message_notification_subject', $subject, &amp;$group, $poster_name );
-                        $message = apply_filters( 'groups_at_message_notification_message', $message, &amp;$group, $poster_name, $content, $message_link );
</del><ins>+                        $subject = apply_filters( 'groups_at_message_notification_subject', $subject, $group, $poster_name );
+                        $message = apply_filters( 'groups_at_message_notification_message', $message, $group, $poster_name, $content, $message_link );
</ins><span class="cx"> 
</span><span class="cx">                         wp_mail( $to, $subject, $message );
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-screens.php (3872 => 3873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-screens.php        2011-01-24 06:30:27 UTC (rev 3872)
+++ trunk/bp-groups/bp-groups-screens.php        2011-01-24 06:39:34 UTC (rev 3873)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">                         $group = new BP_Groups_Group( $group_id );
</span><span class="cx"> 
</span><span class="cx">                         groups_record_activity( array(
</span><del>-                                'action'  =&gt; apply_filters( 'groups_activity_accepted_invite_action', sprintf( __( '%1$s joined the group %2$s', 'buddypress'), bp_core_get_userlink( $bp-&gt;loggedin_user-&gt;id ), '&lt;a href=&quot;' . bp_get_group_permalink( $group ) . '&quot;&gt;' . esc_attr( $group-&gt;name ) . '&lt;/a&gt;' ), $bp-&gt;loggedin_user-&gt;id, &amp;$group ),
</del><ins>+                                'action'  =&gt; apply_filters( 'groups_activity_accepted_invite_action', sprintf( __( '%1$s joined the group %2$s', 'buddypress'), bp_core_get_userlink( $bp-&gt;loggedin_user-&gt;id ), '&lt;a href=&quot;' . bp_get_group_permalink( $group ) . '&quot;&gt;' . esc_attr( $group-&gt;name ) . '&lt;/a&gt;' ), $bp-&gt;loggedin_user-&gt;id, $group ),
</ins><span class="cx">                                 'type'    =&gt; 'joined_group',
</span><span class="cx">                                 'item_id' =&gt; $group-&gt;id
</span><span class="cx">                         ) );
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-template.php (3872 => 3873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-template.php        2011-01-24 06:30:27 UTC (rev 3872)
+++ trunk/bp-groups/bp-groups-template.php        2011-01-24 06:39:34 UTC (rev 3873)
</span><span class="lines">@@ -878,7 +878,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $defaults = array(
</span><span class="cx">                         'user_id' =&gt; $members_template-&gt;member-&gt;user_id,
</span><del>-                        'group' =&gt; &amp;$groups_template-&gt;group
</del><ins>+                        'group'   =&gt; $groups_template-&gt;group
</ins><span class="cx">                 );
</span><span class="cx"> 
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span><span class="lines">@@ -895,7 +895,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $defaults = array(
</span><span class="cx">                         'user_id' =&gt; $members_template-&gt;member-&gt;user_id,
</span><del>-                        'group' =&gt; &amp;$groups_template-&gt;group
</del><ins>+                        'group'   =&gt; $groups_template-&gt;group
</ins><span class="cx">                 );
</span><span class="cx"> 
</span><span class="cx">                 $r = wp_parse_args( $args, $defaults );
</span></span></pre>
</div>
</div>

</body>
</html>