<!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] [2822] trunk: Merge 1.2 branch with trunk</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2822</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-03-08 16:20:25 +0000 (Mon, 08 Mar 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge 1.2 branch with trunk</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityclassesphp">trunk/bp-activity/bp-activity-classes.php</a></li>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpblogsbpblogstemplatetagsphp">trunk/bp-blogs/bp-blogs-templatetags.php</a></li>
<li><a href="#trunkbpcorebpcoresignupphp">trunk/bp-core/bp-core-signup.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatetagsphp">trunk/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpfriendsphp">trunk/bp-friends.php</a></li>
<li><a href="#trunkbpgroupsphp">trunk/bp-groups.php</a></li>
<li><a href="#trunkbpmessagesbpmessagestemplatetagsphp">trunk/bp-messages/bp-messages-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivityindexphp">trunk/bp-themes/bp-default/activity/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssinglepluginsphp">trunk/bp-themes/bp-default/groups/single/plugins.php</a></li>
<li><a href="#trunkbpthemesbpdefaultheaderphp">trunk/bp-themes/bp-default/header.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleactivityphp">trunk/bp-themes/bp-default/members/single/activity.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssinglepluginsphp">trunk/bp-themes/bp-default/members/single/plugins.php</a></li>
<li><a href="#trunkbpxprofilephp">trunk/bp-xprofile.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-classes.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-classes.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-activity/bp-activity-classes.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx">                 return array( 'activities' => $activities, 'total' => (int)$total_activities );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        function get_id( $user_id, $component, $type, $item_id, $secondary_item_id, $action, $content ) {
</del><ins>+        function get_id( $user_id, $component, $type, $item_id, $secondary_item_id, $action, $content, $date_recorded ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 $where_args = false;
</span><span class="lines">@@ -224,6 +224,9 @@
</span><span class="cx">                 if ( !empty( $content ) )
</span><span class="cx">                         $where_args[] = $wpdb->prepare( "content = %s", $content );
</span><span class="cx">
</span><ins>+                if ( !empty( $date_recorded ) )
+                        $where_args[] = $wpdb->prepare( "date_recorded = %s", $date_recorded );
+
</ins><span class="cx">                 if ( !empty( $where_args ) )
</span><span class="cx">                         $where_sql = 'WHERE ' . join( ' AND ', $where_args );
</span><span class="cx">                 else
</span></span></pre></div>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-activity/bp-activity-templatetags.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -540,7 +540,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_activity_is_favorite() {
</span><del>-        echo bp_get_is_activity_favorite();
</del><ins>+        echo bp_get_activity_is_favorite();
</ins><span class="cx"> }
</span><span class="cx">         function bp_get_activity_is_favorite() {
</span><span class="cx">                 global $bp, $activities_template;
</span></span></pre></div>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-activity.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -247,7 +247,11 @@
</span><span class="cx">
</span><span class="cx">         if ( !$has_access ) {
</span><span class="cx">                 bp_core_add_message( __( 'You do not have access to this activity.', 'buddypress' ), 'error' );
</span><del>-                bp_core_redirect( $bp->loggedin_user->domain );
</del><ins>+
+                if ( is_user_logged_in() )
+                        bp_core_redirect( $bp->loggedin_user->domain );
+                else
+                        bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . clean_url( $bp->root_domain . '/' . $bp->activity->slug . '/p/' . $bp->current_action ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         bp_core_load_template( apply_filters( 'bp_activity_template_profile_activity_permalink', 'members/single/activity/permalink' ) );
</span><span class="lines">@@ -311,19 +315,21 @@
</span><span class="cx">         /* Redirect based on the type of activity */
</span><span class="cx">         if ( $activity->component == $bp->groups->id ) {
</span><span class="cx">                 if ( $activity->user_id )
</span><del>-                        $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug . '/' . $activity->id;
</del><ins>+                        $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug . '/' . $activity->id . '/';
</ins><span class="cx">                 else {
</span><span class="cx">                         if ( $group = groups_get_group( array( 'group_id' => $activity->item_id ) ) )
</span><del>-                                $redirect = bp_get_group_permalink( $group ) . $bp->activity->slug . '/' . $activity->id;
</del><ins>+                                $redirect = bp_get_group_permalink( $group ) . $bp->activity->slug . '/' . $activity->id . '/';
</ins><span class="cx">                 }
</span><span class="cx">         } else
</span><span class="cx">                 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug . '/' . $activity->id;
</span><span class="cx">
</span><ins>+        $redirect = apply_filters( 'bp_activity_permalink_redirect_url', $redirect, &$activity );
+
</ins><span class="cx">         if ( !$redirect )
</span><span class="cx">                 bp_core_redirect( $bp->root_domain );
</span><span class="cx">
</span><span class="cx">         /* Redirect to the actual activity permalink page */
</span><del>-        bp_core_redirect( apply_filters( 'bp_activity_action_permalink_url', $redirect . '/', &$activity ) );
</del><ins>+        bp_core_redirect( $redirect );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'wp', 'bp_activity_action_permalink_router', 3 );
</span><span class="cx">
</span><span class="lines">@@ -714,6 +720,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="cx">         $defaults = array(
</span><ins>+                'id' => false,
</ins><span class="cx">                 'content' => false,
</span><span class="cx">                 'user_id' => $bp->loggedin_user->id,
</span><span class="cx">                 'activity_id' => false, // ID of the root activity item
</span><span class="lines">@@ -735,6 +742,7 @@
</span><span class="cx">
</span><span class="cx">         /* Insert the activity comment */
</span><span class="cx">         $comment_id = bp_activity_add( array(
</span><ins>+                'id' => $id,
</ins><span class="cx">                 'action' => apply_filters( 'bp_activity_comment_action', sprintf( __( '%s posted a new activity comment:', 'buddypress' ), bp_core_get_userlink( $user_id ) ) ),
</span><span class="cx">                 'content' => apply_filters( 'bp_activity_comment_content', $content ),
</span><span class="cx">                 'component' => $bp->activity->id,
</span><span class="lines">@@ -772,13 +780,14 @@
</span><span class="cx">                 'item_id' => false,
</span><span class="cx">                 'secondary_item_id' => false,
</span><span class="cx">                 'action' => false,
</span><del>-                'content' => false
</del><ins>+                'content' => false,
+                'date_recorded' => false,
</ins><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-         return apply_filters( 'bp_activity_get_activity_id', BP_Activity_Activity::get_id( $user_id, $component, $type, $item_id, $secondary_item_id, $action, $content ) );
</del><ins>+         return apply_filters( 'bp_activity_get_activity_id', BP_Activity_Activity::get_id( $user_id, $component, $type, $item_id, $secondary_item_id, $action, $content, $date_recorded ) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /***
</span></span></pre></div>
<a id="trunkbpblogsbpblogstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-templatetags.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-templatetags.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-blogs/bp-blogs-templatetags.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -467,7 +467,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="cx">         if ( bp_is_my_profile() )        {
</span><del>-                echo apply_filters( 'bp_create_blog_link', '<a href="' . $bp->loggedin_user->domain . $bp->blogs->slug . '/create-a-blog">' . __('Create a Blog', 'buddypress') . '</a>' );
</del><ins>+                echo apply_filters( 'bp_create_blog_link', '<a href="' . $bp->root_domain . '/' . $bp->blogs->slug . '/create">' . __('Create a Blog', 'buddypress') . '</a>' );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorebpcoresignupphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-signup.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-signup.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-core/bp-core-signup.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -234,6 +234,8 @@
</span><span class="cx">
</span><span class="cx">         $bp->signup->username = $user_login;
</span><span class="cx">
</span><ins>+        do_action( 'bp_core_signup_user', $user_id, $user_login, $user_password, $user_email, $usermeta );
+
</ins><span class="cx">         return $user_id;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-core/bp-core-templatetags.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -1692,7 +1692,7 @@
</span><span class="cx"> function bp_is_create_blog() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( BP_BLOGS_SLUG == $bp->current_component && 'create-a-blog' == $bp->current_action )
</del><ins>+        if ( BP_BLOGS_SLUG == $bp->current_component && 'create' == $bp->current_action )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-core.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -2103,7 +2103,7 @@
</span><span class="cx">         if ( bp_core_is_multisite() && $current_blog->blog_id != BP_ROOT_BLOG )
</span><span class="cx">                 return $redirect_to;
</span><span class="cx">
</span><del>-        if ( !empty( $_REQUEST['redirect_to'] ) && strpos( $_REQUEST['redirect_to'], 'wp-admin' ) )
</del><ins>+        if ( !empty( $_REQUEST['redirect_to'] ) || strpos( $_REQUEST['redirect_to'], 'wp-admin' ) )
</ins><span class="cx">                 return $redirect_to;
</span><span class="cx">
</span><span class="cx">         if ( false === strpos( wp_get_referer(), 'wp-login.php' ) && false === strpos( wp_get_referer(), 'activate' ) && empty( $_REQUEST['nr'] ) )
</span></span></pre></div>
<a id="trunkbpfriendsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-friends.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="cx">         // Delete any friendship acceptance notifications for the user when viewing a profile
</span><del>-        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, 'friends', 'friendship_accepted' );
</del><ins>+        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_accepted' );
</ins><span class="cx">
</span><span class="cx">         do_action( 'friends_screen_my_friends' );
</span><span class="cx">
</span><span class="lines">@@ -133,6 +133,9 @@
</span><span class="cx">
</span><span class="cx">         do_action( 'friends_screen_requests' );
</span><span class="cx">
</span><ins>+        if ( isset( $_GET['new'] ) )
+                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_request' );
+
</ins><span class="cx">         bp_core_load_template( apply_filters( 'friends_template_requests', 'members/single/home' ) );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -317,11 +320,11 @@
</span><span class="cx">
</span><span class="cx">                 case 'friendship_request':
</span><span class="cx">                         if ( (int)$total_items > 1 ) {
</span><del>-                                return apply_filters( 'bp_friends_multiple_friendship_request_notification', '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have %d pending friendship requests', 'buddypress' ), (int)$total_items ) . '</a>', $total_items );
</del><ins>+                                return apply_filters( 'bp_friends_multiple_friendship_request_notification', '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests/?new" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have %d pending friendship requests', 'buddypress' ), (int)$total_items ) . '</a>', $total_items );
</ins><span class="cx">                         } else {
</span><span class="cx">                                 $user_fullname = bp_core_get_user_displayname( $item_id );
</span><span class="cx">                                 $user_url = bp_core_get_user_domain( $item_id );
</span><del>-                                return apply_filters( 'bp_friends_single_friendship_request_notification', '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have a friendship request from %s', 'buddypress' ), $user_fullname ) . '</a>', $user_fullname );
</del><ins>+                                return apply_filters( 'bp_friends_single_friendship_request_notification', '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests/?new" title="' . __( 'Friendship requests', 'buddypress' ) . '">' . sprintf( __('You have a friendship request from %s', 'buddypress' ), $user_fullname ) . '</a>', $user_fullname );
</ins><span class="cx">                         }
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -362,7 +365,7 @@
</span><span class="cx">
</span><span class="cx">                 if ( !$force_accept ) {
</span><span class="cx">                         // Add the on screen notification
</span><del>-                        bp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, 'friends', 'friendship_request' );
</del><ins>+                        bp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, $bp->friends->id, 'friendship_request' );
</ins><span class="cx">
</span><span class="cx">                         // Send the email notification
</span><span class="cx">                         require_once( BP_PLUGIN_DIR . '/bp-friends/bp-friends-notifications.php' );
</span><span class="lines">@@ -408,10 +411,10 @@
</span><span class="cx">                 friends_update_friend_totals( $friendship->initiator_user_id, $friendship->friend_user_id );
</span><span class="cx">
</span><span class="cx">                 /* Remove the friend request notice */
</span><del>-                bp_core_delete_notifications_for_user_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, 'friends', 'friendship_request' );
</del><ins>+                bp_core_delete_notifications_for_user_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
</ins><span class="cx">
</span><span class="cx">                 /* Add a friend accepted notice for the initiating user */
</span><del>-                bp_core_add_notification( $friendship->friend_user_id, $friendship->initiator_user_id, 'friends', 'friendship_accepted' );
</del><ins>+                bp_core_add_notification( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_accepted' );
</ins><span class="cx">
</span><span class="cx">                 $initiator_link = bp_core_get_userlink( $friendship->initiator_user_id );
</span><span class="cx">                 $friend_link = bp_core_get_userlink( $friendship->friend_user_id );
</span><span class="lines">@@ -449,7 +452,7 @@
</span><span class="cx">
</span><span class="cx">         if ( !$friendship->is_confirmed && BP_Friends_Friendship::reject( $friendship_id ) ) {
</span><span class="cx">                 // Remove the friend request notice
</span><del>-                bp_core_delete_notifications_for_user_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, 'friends', 'friendship_request' );
</del><ins>+                bp_core_delete_notifications_for_user_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
</ins><span class="cx">
</span><span class="cx">                 do_action( 'friends_friendship_rejected', $friendship_id, &$friendship );
</span><span class="cx">                 return true;
</span><span class="lines">@@ -597,7 +600,7 @@
</span><span class="cx">         delete_usermeta( $user_id, 'total_friend_count' );
</span><span class="cx">
</span><span class="cx">         /* Remove friendship requests FROM user */
</span><del>-        bp_core_delete_notifications_from_user( $user_id, $bp->friends->slug, 'friendship_request' );
</del><ins>+        bp_core_delete_notifications_from_user( $user_id, $bp->friends->id, 'friendship_request' );
</ins><span class="cx">
</span><span class="cx">         do_action( 'friends_remove_data', $user_id );
</span><span class="cx"> }
</span><span class="lines">@@ -631,7 +634,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="cx">         if ( isset($_GET['new']) )
</span><del>-                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, 'friends', 'friendship_accepted' );
</del><ins>+                bp_core_delete_notifications_for_user_by_type( $bp->displayed_user->id, $bp->friends->id, 'friendship_accepted' );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'bp_activity_screen_my_activity', 'friends_clear_friend_notifications' );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-groups.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -268,10 +268,10 @@
</span><span class="cx">
</span><span class="cx">         if ( isset($_GET['n']) ) {
</span><span class="cx">                 // Delete group request notifications for the user
</span><del>-                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'membership_request_accepted' );
-                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'membership_request_rejected' );
-                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'member_promoted_to_mod' );
-                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'member_promoted_to_admin' );
</del><ins>+                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_accepted' );
+                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_rejected' );
+                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_mod' );
+                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_admin' );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         do_action( 'groups_screen_my_groups' );
</span><span class="lines">@@ -321,7 +321,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Remove notifications
</span><del>-        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'group_invite' );
</del><ins>+        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'group_invite' );
</ins><span class="cx">
</span><span class="cx">         do_action( 'groups_screen_group_invites', $group_id );
</span><span class="cx">
</span><span class="lines">@@ -334,10 +334,10 @@
</span><span class="cx">         if ( $bp->is_single_item ) {
</span><span class="cx">                 if ( isset($_GET['n']) ) {
</span><span class="cx">                         // Delete group request notifications for the user
</span><del>-                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'membership_request_accepted' );
-                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'membership_request_rejected' );
-                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'member_promoted_to_mod' );
-                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'member_promoted_to_admin' );
</del><ins>+                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_accepted' );
+                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_rejected' );
+                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_mod' );
+                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_admin' );
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 do_action( 'groups_screen_group_home' );
</span><span class="lines">@@ -872,7 +872,7 @@
</span><span class="cx">                         return false;
</span><span class="cx">
</span><span class="cx">                 // Remove any screen notifications
</span><del>-                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'new_membership_request' );
</del><ins>+                bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->id, 'new_membership_request' );
</ins><span class="cx">
</span><span class="cx">                 $request_action = $bp->action_variables[1];
</span><span class="cx">                 $membership_id = $bp->action_variables[2];
</span><span class="lines">@@ -1544,6 +1544,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        groups_update_groupmeta( $group->id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
</ins><span class="cx">         do_action( 'groups_settings_updated', $group->id );
</span><span class="cx">
</span><span class="cx">         return true;
</span><span class="lines">@@ -1841,7 +1842,7 @@
</span><span class="cx">         $defaults = array(
</span><span class="cx">                 'content' => false,
</span><span class="cx">                 'user_id' => $bp->loggedin_user->id,
</span><del>-                'group_id' => false
</del><ins>+                'group_id' => $bp->groups->current_group->id
</ins><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span><span class="lines">@@ -1865,7 +1866,7 @@
</span><span class="cx">                 'action' => apply_filters( 'groups_activity_new_update_action', $activity_action ),
</span><span class="cx">                 'content' => apply_filters( 'groups_activity_new_update_content', $activity_content ),
</span><span class="cx">                 'type' => 'activity_update',
</span><del>-                'item_id' => $bp->groups->current_group->id
</del><ins>+                'item_id' => $group_id
</ins><span class="cx">         ) );
</span><span class="cx">
</span><span class="cx">         /* Require the notifications code so email notifications can be set on the 'bp_activity_posted_update' action. */
</span><span class="lines">@@ -2158,7 +2159,7 @@
</span><span class="cx">         groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 );
</span><span class="cx">         groups_update_groupmeta( $group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
</span><span class="cx">
</span><del>-        bp_core_delete_notifications_for_user_by_item_id( $user_id, $group_id, $bp->groups->slug, 'group_invite' );
</del><ins>+        bp_core_delete_notifications_for_user_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
</ins><span class="cx">
</span><span class="cx">         do_action( 'groups_accept_invite', $user_id, $group_id );
</span><span class="cx">         return true;
</span><span class="lines">@@ -2179,7 +2180,7 @@
</span><span class="cx">         $delete = BP_Groups_Member::delete_invite( $user_id, $group_id );
</span><span class="cx">
</span><span class="cx">         if ( $delete )
</span><del>-                bp_core_delete_notifications_for_user_by_item_id( $user_id, $group_id, $bp->groups->slug, 'group_invite' );
</del><ins>+                bp_core_delete_notifications_for_user_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
</ins><span class="cx">
</span><span class="cx">         return $delete;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpmessagesbpmessagestemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-templatetags.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-templatetags.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-messages/bp-messages-templatetags.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx">                 wp_redirect( $bp->displayed_user->id );
</span><span class="cx">         } else {
</span><span class="cx">                 if ( 'inbox' == $bp->current_action )
</span><del>-                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, 'messages', 'new_message' );
</del><ins>+                        bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->messages->id, 'new_message' );
</ins><span class="cx">
</span><span class="cx">                 if ( 'sentbox' == $bp->current_action )
</span><span class="cx">                         $box = 'sentbox';
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivityindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/index.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/index.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-themes/bp-default/activity/index.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -65,9 +65,12 @@
</span><span class="cx">                                                 <select>
</span><span class="cx">                                                         <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option>
</span><span class="cx">                                                         <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
</span><del>-                                                        <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
-                                                        <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
</del><span class="cx">
</span><ins>+                                                        <?php if ( bp_is_active( 'blogs' ) ) : ?>
+                                                                <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
+                                                                <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
+                                                        <?php endif; ?>
+
</ins><span class="cx">                                                         <?php if ( bp_is_active( 'forums' ) ) : ?>
</span><span class="cx">                                                                 <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
</span><span class="cx">                                                                 <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssinglepluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/plugins.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/plugins.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-themes/bp-default/groups/single/plugins.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx">                         </div>
</span><span class="cx">
</span><span class="cx">                         <div id="item-nav">
</span><del>-                                <div class="item-list-tabs no-ajax" id="sub-nav">
</del><ins>+                                <div class="item-list-tabs no-ajax" id="object-nav">
</ins><span class="cx">                                         <ul>
</span><span class="cx">                                                 <?php bp_get_options_nav() ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/header.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/header.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-themes/bp-default/header.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">                                                 <a href="<?php echo site_url() ?>/<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a>
</span><span class="cx">                                         </li>
</span><span class="cx">
</span><del>-                                        <?php if ( bp_is_active( 'forums' ) && bp_is_active( 'groups' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>
</del><ins>+                                        <?php if ( bp_is_active( 'forums' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>
</ins><span class="cx">                                                 <li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
</span><span class="cx">                                                         <a href="<?php echo site_url() ?>/<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a>
</span><span class="cx">                                                 </li>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/activity.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/activity.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-themes/bp-default/members/single/activity.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -8,8 +8,10 @@
</span><span class="cx">                                 <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
</span><span class="cx">
</span><span class="cx">                                 <?php if ( 'groups' != bp_current_action() ) : ?>
</span><del>-                                        <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
-                                        <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
</del><ins>+                                        <?php if ( bp_is_active( 'blogs' ) ) : ?>
+                                                <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
+                                                <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
+                                        <?php endif; ?>
</ins><span class="cx">
</span><span class="cx">                                         <?php if ( bp_is_active( 'friends' ) ) : ?>
</span><span class="cx">                                                 <option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssinglepluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/plugins.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/plugins.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-themes/bp-default/members/single/plugins.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -13,8 +13,6 @@
</span><span class="cx">                                 <div class="item-list-tabs no-ajax" id="object-nav">
</span><span class="cx">                                         <ul>
</span><span class="cx">                                                 <?php bp_get_displayed_user_nav() ?>
</span><del>-
-                                                <?php do_action( 'bp_members_directory_member_types' ) ?>
</del><span class="cx">                                         </ul>
</span><span class="cx">                                 </div>
</span><span class="cx">                         </div>
</span><span class="lines">@@ -24,13 +22,13 @@
</span><span class="cx">                                 <div class="item-list-tabs no-ajax" id="subnav">
</span><span class="cx">                                         <ul>
</span><span class="cx">                                                 <?php bp_get_options_nav() ?>
</span><ins>+
+                                                <?php do_action( 'bp_member_plugin_options_nav' ) ?>
</ins><span class="cx">                                         </ul>
</span><span class="cx">                                 </div>
</span><span class="cx">
</span><span class="cx">                                 <?php do_action( 'bp_template_content' ) ?>
</span><span class="cx">
</span><del>-                                <?php do_action( 'bp_directory_members_content' ) ?>
-
</del><span class="cx">                         </div><!-- #item-body -->
</span><span class="cx">
</span><span class="cx">                         <?php do_action( 'bp_after_member_plugin_template' ) ?>
</span></span></pre></div>
<a id="trunkbpxprofilephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile.php (2821 => 2822)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile.php        2010-03-08 16:10:19 UTC (rev 2821)
+++ trunk/bp-xprofile.php        2010-03-08 16:20:25 UTC (rev 2822)
</span><span class="lines">@@ -898,13 +898,19 @@
</span><span class="cx"> *
</span><span class="cx"> * @package BuddyPress Core
</span><span class="cx"> */
</span><del>-function xprofile_sync_wp_profile() {
</del><ins>+function xprofile_sync_wp_profile( $user_id = false ) {
</ins><span class="cx">         global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">         if ( (int)$bp->site_options['bp-disable-profile-sync'] )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><del>-        $fullname = xprofile_get_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $bp->loggedin_user->id );
</del><ins>+        if ( empty( $user_id ) )
+                $user_id = $bp->loggedin_user->id;
+
+        if ( empty( $user_id ) )
+                return false;
+
+        $fullname = xprofile_get_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user_id );
</ins><span class="cx">         $space = strpos( $fullname, ' ' );
</span><span class="cx">
</span><span class="cx">         if ( false === $space ) {
</span><span class="lines">@@ -915,16 +921,16 @@
</span><span class="cx">                 $lastname = trim( substr( $fullname, $space, strlen($fullname) ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        update_usermeta( $bp->loggedin_user->id, 'nickname', $fullname );
-        update_usermeta( $bp->loggedin_user->id, 'first_name', $firstname );
-        update_usermeta( $bp->loggedin_user->id, 'last_name', $lastname );
</del><ins>+        update_usermeta( $user_id, 'nickname', $fullname );
+        update_usermeta( $user_id, 'first_name', $firstname );
+        update_usermeta( $user_id, 'last_name', $lastname );
</ins><span class="cx">
</span><del>-        $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $bp->loggedin_user->id ) );
-        $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $bp->loggedin_user->id ), $bp->loggedin_user->id ) );
</del><ins>+        $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_id ) );
+        $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $user_id ), $user_id ) );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'xprofile_updated_profile', 'xprofile_sync_wp_profile' );
</span><ins>+add_action( 'bp_core_signup_user', 'xprofile_sync_wp_profile' );
</ins><span class="cx">
</span><del>-
</del><span class="cx"> /**
</span><span class="cx"> * xprofile_remove_screen_notifications()
</span><span class="cx"> *
</span></span></pre>
</div>
</div>
</body>
</html>