<!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] [2946] trunk: Merging 1.2 branch with trunk</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2946</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-04-21 11:34:12 +0000 (Wed, 21 Apr 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merging 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="#trunkbpblogsphp">trunk/bp-blogs.php</a></li>
<li><a href="#trunkbpcorebpcoreadminbarphp">trunk/bp-core/bp-core-adminbar.php</a></li>
<li><a href="#trunkbpcorebpcoreavatarsphp">trunk/bp-core/bp-core-avatars.php</a></li>
<li><a href="#trunkbpcorebpcorecssjsphp">trunk/bp-core/bp-core-cssjs.php</a></li>
<li><a href="#trunkbpcorebpcoresignupphp">trunk/bp-core/bp-core-signup.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatetagsphp">trunk/bp-forums/bp-forums-templatetags.php</a></li>
<li><a href="#trunkbpfriendsphp">trunk/bp-friends.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsclassesphp">trunk/bp-groups/bp-groups-classes.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatetagsphp">trunk/bp-groups/bp-groups-templatetags.php</a></li>
<li><a href="#trunkbpgroupsphp">trunk/bp-groups.php</a></li>
<li><a href="#trunkbpthemesbpdefaultcommentsphp">trunk/bp-themes/bp-default/comments.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 (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-classes.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-activity/bp-activity-classes.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">                         $this->primary_link = $row->primary_link;
</span><span class="cx">                         $this->component = $row->component;
</span><span class="cx">                         $this->type = $row->type;
</span><del>-                        $this->action = $row->type;
</del><ins>+                        $this->action = $row->action;
</ins><span class="cx">                         $this->content = $row->content;
</span><span class="cx">                         $this->date_recorded = $row->date_recorded;
</span><span class="cx">                         $this->hide_sitewide = $row->hide_sitewide;
</span><span class="lines">@@ -97,12 +97,6 @@
</span><span class="cx">                 /* Where conditions */
</span><span class="cx">                 $where_conditions = array();
</span><span class="cx">
</span><del>-                /* Searching */
-                if ( $search_terms ) {
-                        $search_terms = $wpdb->escape( $search_terms );
-                        $where_conditions['search_sql'] = "a.content LIKE '%%" . like_escape( $search_terms ) . "%%'";
-                }
-
</del><span class="cx">                 /* Filtering */
</span><span class="cx">                 if ( $filter && $filter_sql = BP_Activity_Activity::get_filter_sql( $filter ) )
</span><span class="cx">                         $where_conditions['filter_sql'] = $filter_sql;
</span><span class="lines">@@ -122,6 +116,18 @@
</span><span class="cx">
</span><span class="cx">                 $where_sql = 'WHERE ' . join( ' AND ', $where_conditions );
</span><span class="cx">
</span><ins>+                /* Searching */
+                if ( $search_terms ) {
+                        $search_terms = $wpdb->escape( $search_terms );
+
+                        if ( !empty( $filter['user_id'] ) )
+                                $where_sql .= ' OR ';
+                        else if ( !empty( $where_conditions ) )
+                                $where_sql .= ' AND ';
+
+                        $where_sql .= "a.content LIKE '%%" . like_escape( $search_terms ) . "%%'";
+                }
+
</ins><span class="cx">                 if ( $per_page && $page ) {
</span><span class="cx">                         $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $per_page ), intval( $per_page ) );
</span><span class="cx">                         $activities = $wpdb->get_results( $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}" ) );
</span></span></pre></div>
<a id="trunkbpblogsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-blogs.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -647,8 +647,9 @@
</span><span class="cx">
</span><span class="cx">         do_action( 'bp_blogs_remove_data', $user_id );
</span><span class="cx"> }
</span><del>-add_action( 'wpmu_delete_user', 'bp_blogs_remove_data', 1 );
-add_action( 'delete_user', 'bp_blogs_remove_data', 1 );
</del><ins>+add_action( 'wpmu_delete_user', 'bp_blogs_remove_data' );
+add_action( 'delete_user', 'bp_blogs_remove_data' );
+add_action( 'make_spam_user', 'bp_blogs_remove_data' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /********************************************************************************
</span></span></pre></div>
<a id="trunkbpcorebpcoreadminbarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-adminbar.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-adminbar.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-core/bp-core-adminbar.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx">         if ( defined( 'BP_DISABLE_ADMIN_BAR' ) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><del>-        if ( (int)$bp->site_options['hide-loggedout-adminbar'] && !is_user_logged_in() )
</del><ins>+        if ( (int)get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $bp->doing_admin_bar = true;
</span></span></pre></div>
<a id="trunkbpcorebpcoreavatarsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-avatars.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-avatars.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-core/bp-core-avatars.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">                 closedir($av_dir);
</span><span class="cx">
</span><span class="cx">                 if ( $avatar_url )
</span><del>-                        return apply_filters( 'bp_core_fetch_avatar', "<img src='{$avatar_url}' alt='{$alt}' class='{$class}'{$css_id}{$html_width}{$html_height} />", $params );
</del><ins>+                        return apply_filters( 'bp_core_fetch_avatar', "<img src='{$avatar_url}' alt='{$alt}' class='{$class}'{$css_id}{$html_width}{$html_height} />", $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /* If no avatars have been uploaded for this item, display a gravatar */
</span><span class="lines">@@ -162,10 +162,9 @@
</span><span class="cx">                 $email = apply_filters( 'bp_core_gravatar_email', $email, $item_id, $object );
</span><span class="cx">                 $gravatar = apply_filters( 'bp_gravatar_url', $host ) . md5( $email ) . '?d=' . $default_grav . '&amp;s=' . $grav_size;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_core_fetch_avatar', "<img src='{$gravatar}' alt='{$alt}' class='{$class}'{$css_id}{$html_width}{$html_height} />", $params );
-
</del><ins>+                return apply_filters( 'bp_core_fetch_avatar', "<img src='{$gravatar}' alt='{$alt}' class='{$class}'{$css_id}{$html_width}{$html_height} />", $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
</ins><span class="cx">         } else {
</span><del>-                return false;
</del><ins>+                return apply_filters( 'bp_core_fetch_avatar', false, $params, $item_id, $avatar_dir, $css_id, $html_width, $html_height, $avatar_folder_url, $avatar_folder_dir );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -230,6 +229,13 @@
</span><span class="cx"> function bp_core_avatar_handle_upload( $file, $upload_dir_filter ) {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><ins>+        /***
+         * You may want to hook into this filter if you want to override this function.
+         * Make sure you return false.
+         */
+        if ( !apply_filters( 'bp_core_pre_avatar_handle_upload', true, $file, $upload_dir_filter ) )
+                return true;
+
</ins><span class="cx">         require_once( ABSPATH . '/wp-admin/includes/image.php' );
</span><span class="cx">         require_once( ABSPATH . '/wp-admin/includes/file.php' );
</span><span class="cx">
</span><span class="lines">@@ -303,6 +309,14 @@
</span><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span><ins>+
+        /***
+         * You may want to hook into this filter if you want to override this function.
+         * Make sure you return false.
+         */
+        if ( !apply_filters( 'bp_core_pre_avatar_handle_crop', true, $r ) )
+                return true;
+
</ins><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><span class="cx">         if ( !$original_file )
</span></span></pre></div>
<a id="trunkbpcorebpcorecssjsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-cssjs.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-cssjs.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-core/bp-core-cssjs.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx"> function bp_core_override_adminbar_css() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( defined( 'BP_DISABLE_ADMIN_BAR' ) || ( $bp->site_options['hide-loggedout-adminbar'] && !is_user_logged_in() ) ) {
</del><ins>+        if ( defined( 'BP_DISABLE_ADMIN_BAR' ) || ( (int)get_site_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) ) {
</ins><span class="cx">         ?>
</span><span class="cx"> <style type="text/css">body { padding-top: 0 !important; } #wp-admin-bar { display: none; }</style>
</span><span class="cx">         <?php }
</span></span></pre></div>
<a id="trunkbpcorebpcoresignupphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-signup.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-signup.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-core/bp-core-signup.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -53,19 +53,30 @@
</span><span class="cx">                 $bp->signup->username = $_POST['signup_username'];
</span><span class="cx">                 $bp->signup->email = $_POST['signup_email'];
</span><span class="cx">
</span><del>-                if ( !empty( $_POST['signup_profile_field_ids'] ) && function_exists( 'xprofile_check_is_required_field' ) ) {
-                        /* Now we've checked account details, we can check profile information */
-                        $profile_field_ids = explode( ',', $_POST['signup_profile_field_ids'] );
</del><ins>+                /* Now we've checked account details, we can check profile information */
+                if ( function_exists( 'xprofile_check_is_required_field' ) ) {
</ins><span class="cx">
</span><del>-                        /* Loop through the posted fields formatting any datebox values then validate the field */
-                        foreach ( (array) $profile_field_ids as $field_id ) {
-                                if ( !isset( $_POST['field_' . $field_id] ) ) {
-                                        if ( isset( $_POST['field_' . $field_id . '_day'] ) )
-                                                $_POST['field_' . $field_id] = strtotime( $_POST['field_' . $field_id . '_day'] . $_POST['field_' . $field_id . '_month'] . $_POST['field_' . $field_id . '_year'] );
</del><ins>+                        /* Make sure hidden field is passed and populated */
+                        if ( isset( $_POST['signup_profile_field_ids'] ) && !empty( $_POST['signup_profile_field_ids'] ) ) {
+
+                                /* Let's compact any profile field info into an array */
+                                $profile_field_ids = explode( ',', $_POST['signup_profile_field_ids'] );
+
+                                /* Loop through the posted fields formatting any datebox values then validate the field */
+                                foreach ( (array) $profile_field_ids as $field_id ) {
+                                        if ( !isset( $_POST['field_' . $field_id] ) ) {
+                                                if ( isset( $_POST['field_' . $field_id . '_day'] ) )
+                                                        $_POST['field_' . $field_id] = strtotime( $_POST['field_' . $field_id . '_day'] . $_POST['field_' . $field_id . '_month'] . $_POST['field_' . $field_id . '_year'] );
+                                        }
+
+                                        /* Create errors for required fields without values */
+                                        if ( xprofile_check_is_required_field( $field_id ) && empty( $_POST['field_' . $field_id] ) )
+                                                $bp->signup->errors['field_' . $field_id] = __( 'This is a required field', 'buddypress' );
</ins><span class="cx">                                 }
</span><span class="cx">
</span><del>-                                if ( xprofile_check_is_required_field( $field_id ) && empty( $_POST['field_' . $field_id] ) )
-                                        $bp->signup->errors['field_' . $field_id] = __( 'This is a required field', 'buddypress' );
</del><ins>+                        /* This situation doesn't naturally occur so bounce to website root */
+                        } else {
+                                bp_core_redirect( $bp->root_domain );
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -251,7 +262,7 @@
</span><span class="cx">         $user_email = sanitize_email( $user_email );
</span><span class="cx">
</span><span class="cx">         if ( empty( $user_name ) )
</span><del>-                 $errors->add( 'user_name', __( 'Please enter a username', 'buddypress' ) );
</del><ins>+                $errors->add( 'user_name', __( 'Please enter a username', 'buddypress' ) );
</ins><span class="cx">
</span><span class="cx">         $maybe = array();
</span><span class="cx">         preg_match( "/[a-z0-9]+/", $user_name, $maybe );
</span><span class="lines">@@ -259,17 +270,21 @@
</span><span class="cx">         $db_illegal_names = get_site_option( 'illegal_names' );
</span><span class="cx">         $filtered_illegal_names = apply_filters( 'bp_core_illegal_usernames', array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator', BP_GROUPS_SLUG, $bp->members->slug, BP_FORUMS_SLUG, BP_BLOGS_SLUG, BP_REGISTER_SLUG, BP_ACTIVATION_SLUG ) );
</span><span class="cx">
</span><del>-        $illegal_names = array_merge( (array)$db_illegal_names, (array)$filtered_illegal_names );
</del><ins>+        /* Safely merge our illegal names into existing site_option */
+        $common_names                        = array_intersect( (array)$db_illegal_names, (array)$filtered_illegal_names );
+        $diff_names                                = array_diff( (array)$db_illegal_names, (array)$filtered_illegal_names );
+        $illegal_names                        = array_merge( (array)$diff_names, (array)$common_names );
+
</ins><span class="cx">         update_site_option( 'illegal_names', $illegal_names );
</span><span class="cx">
</span><span class="cx">         if ( in_array( $user_name, (array)$illegal_names ) )
</span><span class="cx">                 $errors->add( 'user_name', __( 'Sorry, that username is not allowed', 'buddypress' ) );
</span><span class="cx">
</span><span class="cx">         if ( !validate_username( $user_name ) || $user_name != $maybe[0] )
</span><del>-         $errors->add( 'user_name', __( 'Only lowercase letters and numbers allowed', 'buddypress' ) );
</del><ins>+                $errors->add( 'user_name', __( 'Only lowercase letters and numbers allowed', 'buddypress' ) );
</ins><span class="cx">
</span><span class="cx">         if( strlen( $user_name ) < 4 )
</span><del>-         $errors->add( 'user_name', __( 'Username must be at least 4 characters', 'buddypress' ) );
</del><ins>+                $errors->add( 'user_name', __( 'Username must be at least 4 characters', 'buddypress' ) );
</ins><span class="cx">
</span><span class="cx">         if ( strpos( ' ' . $user_name, '_' ) != false )
</span><span class="cx">                 $errors->add( 'user_name', __( 'Sorry, usernames may not contain the character "_"!', 'buddypress' ) );
</span><span class="lines">@@ -384,7 +399,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_core_activate_signup( $key ) {
</span><del>-        global $wpdb;
</del><ins>+        global $bp, $wpdb;
</ins><span class="cx">
</span><span class="cx">         $user = false;
</span><span class="cx">
</span><span class="lines">@@ -557,7 +572,7 @@
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( locate_template( array( 'registration/register.php' ), false ) || locate_template( array( 'register.php' ), false ) )
</span><del>-                wp_redirect( bp_get_root_domain() . '/' . BP_REGISTER_SLUG . '/' );
</del><ins>+                bp_core_redirect( bp_get_root_domain() . '/' . BP_REGISTER_SLUG . '/' );
</ins><span class="cx"> }
</span><span class="cx"> if ( bp_core_is_multisite() )
</span><span class="cx">         add_action( 'wp', 'bp_core_wpsignup_redirect' );
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-core.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -636,7 +636,8 @@
</span><span class="cx">                 'link' => $bp->loggedin_user->domain . $slug . '/',
</span><span class="cx">                 'css_id' => $item_css_id,
</span><span class="cx">                 'show_for_displayed_user' => $show_for_displayed_user,
</span><del>-                'position' => $position
</del><ins>+                'position' => $position,
+                'screen_function' => &$screen_function
</ins><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         /***
</span><span class="lines">@@ -685,6 +686,15 @@
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><ins>+        if ( $function = $bp->bp_nav[$parent_slug]['screen_function'] ) {
+                if ( !is_object( $function[0] ) )
+                        remove_action( 'wp', $function, 3 );
+                else
+                        remove_action( 'wp', array( &$function[0], $function[1] ), 3 );
+        }
+
+        $bp->bp_nav[$parent_slug]['screen_function'] = &$screen_function;
+
</ins><span class="cx">         if ( $bp->current_component == $parent_slug && !$bp->current_action ) {
</span><span class="cx">                 if ( !is_object( $screen_function[0] ) )
</span><span class="cx">                         add_action( 'wp', $screen_function, 3 );
</span><span class="lines">@@ -773,7 +783,8 @@
</span><span class="cx">                 'slug' => $slug,
</span><span class="cx">                 'css_id' => $item_css_id,
</span><span class="cx">                 'position' => $position,
</span><del>-                'user_has_access' => $user_has_access
</del><ins>+                'user_has_access' => $user_has_access,
+                'screen_function' => &$screen_function
</ins><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         if ( ( $bp->current_action == $slug && $bp->current_component == $parent_slug ) && $user_has_access ) {
</span><span class="lines">@@ -833,6 +844,13 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        if ( $function = $bp->bp_nav[$parent_id]['screen_function'] ) {
+                if ( !is_object( $function[0] ) )
+                        remove_action( 'wp', $function, 3 );
+                else
+                        remove_action( 'wp', array( &$function[0], $function[1] ), 3 );
+        }
+
</ins><span class="cx">         unset( $bp->bp_nav[$parent_id] );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -848,13 +866,11 @@
</span><span class="cx"> function bp_core_remove_subnav_item( $parent_id, $slug ) {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        $function = $bp->bp_options_nav[$parent_id][$slug]['screen_function'];
-
-        if ( $function ) {
-                if ( !is_object( $screen_function[0] ) )
-                        remove_action( 'wp', $screen_function, 3 );
</del><ins>+        if ( $function = $bp->bp_options_nav[$parent_id][$slug]['screen_function'] ) {
+                if ( !is_object( $function[0] ) )
+                        remove_action( 'wp', $function, 3 );
</ins><span class="cx">                 else
</span><del>-                        remove_action( 'wp', array( &$screen_function[0], $screen_function[1] ), 3 );
</del><ins>+                        remove_action( 'wp', array( &$function[0], $function[1] ), 3 );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         unset( $bp->bp_options_nav[$parent_id][$slug] );
</span><span class="lines">@@ -1841,9 +1857,9 @@
</span><span class="cx">         /* Flush the cache to remove the user from all cached objects */
</span><span class="cx">         wp_cache_flush();
</span><span class="cx"> }
</span><del>-add_action( 'wpmu_delete_user', 'bp_core_remove_data', 1 );
-add_action( 'delete_user', 'bp_core_remove_data', 1 );
-add_action( 'make_spam_user', 'bp_core_remove_data', 1 );
</del><ins>+add_action( 'wpmu_delete_user', 'bp_core_remove_data' );
+add_action( 'delete_user', 'bp_core_remove_data' );
+add_action( 'make_spam_user', 'bp_core_remove_data' );
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * bp_load_buddypress_textdomain()
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-templatetags.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-templatetags.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-forums/bp-forums-templatetags.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -253,7 +253,7 @@
</span><span class="cx">                 global $forum_template;
</span><span class="cx">
</span><span class="cx">                 $post = bb_get_first_post( (int)$forum_template->topic->topic_id, false );
</span><del>-                return apply_filters( 'bp_get_the_topic_text', $post->post_text );
</del><ins>+                return apply_filters( 'bp_get_the_topic_text', attribute_escape( $post->post_text ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_poster_id() {
</span><span class="lines">@@ -463,7 +463,7 @@
</span><span class="cx">         function bp_get_the_topic_total_posts() {
</span><span class="cx">                 global $forum_template;
</span><span class="cx">
</span><del>-                return $forum_template->topic->topic_posts;
</del><ins>+                return apply_filters( 'bp_get_the_topic_total_posts', $forum_template->topic->topic_posts );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_tag_count() {
</span><span class="lines">@@ -937,7 +937,7 @@
</span><span class="cx">                 global $bp;
</span><span class="cx">
</span><span class="cx">                 $post = bp_forums_get_post( $bp->action_variables[4] );
</span><del>-                return attribute_escape( $post->post_text );
</del><ins>+                return apply_filters( 'bp_get_the_topic_post_edit_text', attribute_escape( $post->post_text ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_pagination() {
</span></span></pre></div>
<a id="trunkbpfriendsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-friends.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -565,9 +565,9 @@
</span><span class="cx">
</span><span class="cx">         do_action( 'friends_remove_data', $user_id );
</span><span class="cx"> }
</span><del>-add_action( 'wpmu_delete_user', 'friends_remove_data', 1 );
-add_action( 'delete_user', 'friends_remove_data', 1 );
-add_action( 'make_spam_user', 'friends_remove_data', 1 );
</del><ins>+add_action( 'wpmu_delete_user', 'friends_remove_data' );
+add_action( 'delete_user', 'friends_remove_data' );
+add_action( 'make_spam_user', 'friends_remove_data' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /********************************************************************************
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-classes.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-classes.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-groups/bp-groups-classes.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx">                 $user_ids = implode( ',', (array)$user_ids );
</span><span class="cx">
</span><span class="cx">                 /* Modify group count usermeta for members */
</span><del>-                $wpdb->query( $wpdb->prepare( "UPDATE {$bp->groups->table_name_groupmeta} SET meta_value = meta_value - 1 WHERE meta_key = 'total_group_count' AND user_id IN ( {$user_ids} )" ) );
</del><ins>+                $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->usermeta} SET meta_value = meta_value - 1 WHERE meta_key = 'total_group_count' AND user_id IN ( {$user_ids} )" ) );
</ins><span class="cx">
</span><span class="cx">                 /* Now delete all group member entries */
</span><span class="cx">                 BP_Groups_Member::delete_all( $this->id );
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-templatetags.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-templatetags.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-groups/bp-groups-templatetags.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 $this->pag_links = paginate_links( array(
</span><del>-                        'base' => add_query_arg( array( 'grpage' => '%#%', 'num' => $this->pag_num, 's' => $_REQUEST['s'], 'sortby' => $this->sort_by, 'order' => $this->order ) ),
</del><ins>+                        'base' => add_query_arg( array( 'grpage' => '%#%', 'num' => $this->pag_num, 's' => $search_terms, 'sortby' => $this->sort_by, 'order' => $this->order ) ),
</ins><span class="cx">                         'format' => '',
</span><span class="cx">                         'total' => ceil($this->total_group_count / $this->pag_num),
</span><span class="cx">                         'current' => $this->pag_page,
</span></span></pre></div>
<a id="trunkbpgroupsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-groups.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -2416,9 +2416,9 @@
</span><span class="cx">
</span><span class="cx">         do_action( 'groups_remove_data_for_user', $user_id );
</span><span class="cx"> }
</span><del>-add_action( 'wpmu_delete_user', 'groups_remove_data_for_user', 1 );
-add_action( 'delete_user', 'groups_remove_data_for_user', 1 );
-add_action( 'make_spam_user', 'groups_remove_data_for_user', 1 );
</del><ins>+add_action( 'wpmu_delete_user', 'groups_remove_data_for_user' );
+add_action( 'delete_user', 'groups_remove_data_for_user' );
+add_action( 'make_spam_user', 'groups_remove_data_for_user' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /********************************************************************************
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/comments.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/comments.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-themes/bp-default/comments.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">                         ?>
</span><span class="cx">
</span><span class="cx">                         <span class="title"><?php the_title() ?></span>
</span><del>-                        <h3 id="comments"><?php comments_number( 'No Comments', 'One Comment', $numComments . ' Comments' );?></h3>
</del><ins>+                        <h3 id="comments"><?php comments_number( '', '', $numComments );?></h3>
</ins><span class="cx">
</span><span class="cx">                         <?php do_action( 'bp_before_blog_comment_list' ) ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpxprofilephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile.php (2945 => 2946)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile.php        2010-04-21 01:57:01 UTC (rev 2945)
+++ trunk/bp-xprofile.php        2010-04-21 11:34:12 UTC (rev 2946)
</span><span class="lines">@@ -891,8 +891,9 @@
</span><span class="cx">         delete_usermeta( $user_id, 'bp_core_avatar_v2' );
</span><span class="cx">         delete_usermeta( $user_id, 'bp_core_avatar_v2_path' );
</span><span class="cx"> }
</span><del>-add_action( 'wpmu_delete_user', 'xprofile_remove_data', 1 );
-add_action( 'delete_user', 'xprofile_remove_data', 1 );
</del><ins>+add_action( 'wpmu_delete_user', 'xprofile_remove_data' );
+add_action( 'delete_user', 'xprofile_remove_data' );
+add_action( 'make_spam_user', 'xprofile_remove_data' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /********************************************************************************
</span></span></pre>
</div>
</div>
</body>
</html>