<!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] [2055] trunk: Merging 1.1 branch with trunk</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2055</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-10-26 17:31:43 +0000 (Mon, 26 Oct 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merging 1.1 branch with trunk</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityfiltersphp">trunk/bp-activity/bp-activity-filters.php</a></li>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpblogsbpblogsclassesphp">trunk/bp-blogs/bp-blogs-classes.php</a></li>
<li><a href="#trunkbpblogsphp">trunk/bp-blogs.php</a></li>
<li><a href="#trunkbpcorebpcoreclassesphp">trunk/bp-core/bp-core-classes.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpfriendsbpfriendsclassesphp">trunk/bp-friends/bp-friends-classes.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="#trunkbpthemesbpsnparent_incjsajaxjs">trunk/bp-themes/bp-sn-parent/_inc/js/ajax.js</a></li>
<li><a href="#trunkbpthemesbpsnparentwirepostformphp">trunk/bp-themes/bp-sn-parent/wire/post-form.php</a></li>
<li><a href="#trunkbpthemesbpsnparentwirepostlistphp">trunk/bp-themes/bp-sn-parent/wire/post-list.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-filters.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-filters.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-activity/bp-activity-filters.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -2,6 +2,8 @@
</span><span class="cx">
</span><span class="cx"> /* Apply WordPress defined filters */
</span><span class="cx"> add_filter( 'bp_get_activity_content', 'bp_activity_filter_kses', 1 );
</span><ins>+add_filter( 'bp_get_activity_content', 'bp_activity_filter_kses', 1 );
+
</ins><span class="cx"> add_filter( 'bp_get_activity_content', 'force_balance_tags' );
</span><span class="cx"> add_filter( 'bp_get_activity_content', 'wptexturize' );
</span><span class="cx"> add_filter( 'bp_get_activity_content', 'convert_smilies' );
</span></span></pre></div>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-activity/bp-activity-templatetags.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -351,6 +351,8 @@
</span><span class="cx">                                 $selected = ' class="selected"';
</span><span class="cx">                         else
</span><span class="cx">                                 unset($selected);
</span><ins>+                        
+                        $component_name = attribute_escape( $component_name );
</ins><span class="cx">
</span><span class="cx">                         switch ( $style ) {
</span><span class="cx">                                 case 'list':
</span><span class="lines">@@ -378,13 +380,13 @@
</span><span class="cx">                         /* Make sure all core internal component names are translatable */
</span><span class="cx">                         $translatable_component_names = array( __( 'profile', 'buddypress'), __( 'friends', 'buddypress' ), __( 'groups', 'buddypress' ), __( 'status', 'buddypress' ), __( 'blogs', 'buddypress' ) );
</span><span class="cx">                         
</span><del>-                        $component_links[] = $before . '<a href="' . $link . '">' . ucwords( __( $component_name, 'buddypress' ) ) . '</a>' . $after;
</del><ins>+                        $component_links[] = $before . '<a href="' . attribute_escape( $link ) . '">' . ucwords( __( $component_name, 'buddypress' ) ) . '</a>' . $after;
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 $link = remove_query_arg( 'afilter' , $link );
</span><span class="cx">
</span><span class="cx">                 if ( isset( $_GET['afilter'] ) )
</span><del>-                        $component_links[] = '<' . $tag . ' id="afilter-clear"><a href="' . $link . '"">' . __( 'Clear Filter', 'buddypress' ) . '</a></' . $tag . '>';
</del><ins>+                        $component_links[] = '<' . $tag . ' id="afilter-clear"><a href="' . attribute_escape( $link ) . '"">' . __( 'Clear Filter', 'buddypress' ) . '</a></' . $tag . '>';
</ins><span class="cx">                 
</span><span class="cx">                 return apply_filters( 'bp_get_activity_filter_links', implode( "\n", $component_links ) );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbpblogsbpblogsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-classes.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-classes.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-blogs/bp-blogs-classes.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">                 if ( !$bp->blogs )
</span><span class="cx">                         bp_blogs_setup_globals();
</span><span class="cx">                 
</span><del>-                like_escape($letter);
</del><ins>+                $letter = like_escape( $wpdb->escape( $letter ) );
</ins><span class="cx">                                 
</span><span class="cx">                 if ( $limit && $page ) {
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx">                 if ( !$bp->blogs )
</span><span class="cx">                         bp_blogs_setup_globals();
</span><span class="cx">                 
</span><del>-                like_escape($filter);
</del><ins>+                $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                 
</span><span class="cx">                 if ( $limit && $page ) {
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span></span></pre></div>
<a id="trunkbpblogsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-blogs.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) {
</del><ins>+function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = true ) {
</ins><span class="cx">         global $bp;
</span><span class="cx">         
</span><span class="cx">         if ( !$user_id )
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx">         bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', time() );
</span><span class="cx">         
</span><span class="cx">         /* Only record this activity if the blog is public */
</span><del>-        if ( (int)$_POST['blog_public'] && !$no_activity ) {        
</del><ins>+        if ( (int)$_POST['blog_public'] || !$no_activity ) {
</ins><span class="cx">                 /* Record this in activity streams */
</span><span class="cx">                 bp_blogs_record_activity( array(
</span><span class="cx">                         'user_id' => $recorded_blog->user_id,
</span><span class="lines">@@ -351,10 +351,9 @@
</span><span class="cx">         
</span><span class="cx">         if ( !$user_id )
</span><span class="cx">                 $user_id = (int)$post->post_author;
</span><del>-
</del><span class="cx">         
</span><span class="cx">         /* This is to stop infinate loops with Donncha's sitewide tags plugin */
</span><del>-        if ( (int)get_site_option('tags_blog_id') == (int)$blog_id )
</del><ins>+        if ( (int)get_site_option( 'tags_blog_id' ) == (int)$blog_id )
</ins><span class="cx">                 return false;
</span><span class="cx">         
</span><span class="cx">         /* Don't record this if it's not a post */
</span><span class="lines">@@ -374,20 +373,22 @@
</span><span class="cx">                         
</span><span class="cx">                         bp_blogs_update_blogmeta( $recorded_post->blog_id, 'last_activity', time() );
</span><span class="cx">
</span><del>-                        $post_permalink = bp_post_get_permalink( $post, $blog_id );
</del><ins>+                        if ( (int)get_blog_option( $blog_id, 'blog_public' ) ) {
+                                /* Record this in activity streams */
+                                $post_permalink = bp_post_get_permalink( $post, $blog_id );
</ins><span class="cx">
</span><del>-                        $activity_content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
-                        $activity_content .= "<blockquote>" . bp_create_excerpt( $post->post_content ) . "</blockquote>";
</del><ins>+                                $activity_content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
+                                $activity_content .= "<blockquote>" . bp_create_excerpt( $post->post_content ) . "</blockquote>";
</ins><span class="cx">                         
</span><del>-                        /* Record this in activity streams */
-                        bp_blogs_record_activity( array(
-                                'user_id' => (int)$post->post_author,
-                                'content' => apply_filters( 'bp_blogs_activity_new_post', $activity_content, &$post, $post_permalink ),
-                                'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ),
-                                'component_action' => 'new_blog_post',
-                                'item_id' => $recorded_post_id,
-                                'recorded_time' => strtotime( $post->post_date )
-                        ) );
</del><ins>+                                bp_blogs_record_activity( array(
+                                        'user_id' => (int)$post->post_author,
+                                        'content' => apply_filters( 'bp_blogs_activity_new_post', $activity_content, &$post, $post_permalink ),
+                                        'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ),
+                                        'component_action' => 'new_blog_post',
+                                        'item_id' => $recorded_post_id,
+                                        'recorded_time' => strtotime( $post->post_date )
+                                ));
+                        }
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="cx">                 $existing_post = new BP_Blogs_Post( null, $blog_id, $post_id );
</span><span class="lines">@@ -407,23 +408,24 @@
</span><span class="cx">                         // Re-record the post with the new author.
</span><span class="cx">                         bp_blogs_record_post( $post_id );                                
</span><span class="cx">                 }
</span><del>-                
-                /* Now re-record the post in the activity streams */                
-                $post_permalink = bp_post_get_permalink( $post, $blog_id );
-                
</del><span class="cx">
</span><del>-                $activity_content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
-                $activity_content .= "<blockquote>" . bp_create_excerpt( $post->post_content ) . "</blockquote>";
</del><ins>+                if ( (int)get_blog_option( $blog_id, 'blog_public' ) ) {
+                        /* Now re-record the post in the activity streams */                
+                        $post_permalink = bp_post_get_permalink( $post, $blog_id );
+
+                        $activity_content = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
+                        $activity_content .= "<blockquote>" . bp_create_excerpt( $post->post_content ) . "</blockquote>";
</ins><span class="cx">                 
</span><del>-                /* Record this in activity streams */
-                bp_blogs_record_activity( array(
-                        'user_id' => (int)$post->post_author,
-                        'content' => apply_filters( 'bp_blogs_activity_new_post', $activity_content, &$post, $post_permalink ),
-                        'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ),
-                        'component_action' => 'new_blog_post',
-                        'item_id' => $existing_post->id,
-                        'recorded_time' => strtotime( $post->post_date )
-                ) );
</del><ins>+                        /* Record this in activity streams */
+                        bp_blogs_record_activity( array(
+                                'user_id' => (int)$post->post_author,
+                                'content' => apply_filters( 'bp_blogs_activity_new_post', $activity_content, &$post, $post_permalink ),
+                                'primary_link' => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ),
+                                'component_action' => 'new_blog_post',
+                                'item_id' => $existing_post->id,
+                                'recorded_time' => strtotime( $post->post_date )
+                        ) );
+                }
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         do_action( 'bp_blogs_new_blog_post', $existing_post, $is_private, $is_recorded );
</span><span class="lines">@@ -457,21 +459,24 @@
</span><span class="cx">         
</span><span class="cx">         bp_blogs_update_blogmeta( $recorded_comment->blog_id, 'last_activity', time() );
</span><span class="cx">
</span><del>-        $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id );
-        $activity_content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );                        
-        $activity_content .= '<blockquote>' . bp_create_excerpt( $comment->comment_content ) . '</blockquote>';
</del><ins>+        if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) ) {
+                /* Record in activity streams */
+                $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id );
+                $activity_content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );                        
+                $activity_content .= '<blockquote>' . bp_create_excerpt( $comment->comment_content ) . '</blockquote>';
</ins><span class="cx">
</span><del>-        /* Record this in activity streams */
-        bp_blogs_record_activity( array(
-                'user_id' => $recorded_comment->user_id,
-                'content' => apply_filters( 'bp_blogs_activity_new_comment', $activity_content, &$comment, &$recorded_comment, $comment_link ),
-                'primary_link' => apply_filters( 'bp_blogs_activity_new_comment_primary_link', $comment_link, &$comment, &$recorded_comment ),
-                'component_action' => 'new_blog_comment',
-                'item_id' => $comment_id,
-                'secondary_item_id' => $recorded_comment->blog_id,
-                'recorded_time' => $recorded_comment->date_created
-        ) );
-        
</del><ins>+                /* Record this in activity streams */
+                bp_blogs_record_activity( array(
+                        'user_id' => $recorded_comment->user_id,
+                        'content' => apply_filters( 'bp_blogs_activity_new_comment', $activity_content, &$comment, &$recorded_comment, $comment_link ),
+                        'primary_link' => apply_filters( 'bp_blogs_activity_new_comment_primary_link', $comment_link, &$comment, &$recorded_comment ),
+                        'component_action' => 'new_blog_comment',
+                        'item_id' => $comment_id,
+                        'secondary_item_id' => $recorded_comment->blog_id,
+                        'recorded_time' => $recorded_comment->date_created
+                ) );
+        }
+
</ins><span class="cx">         return $recorded_comment;
</span><span class="cx"> }
</span><span class="cx"> add_action( 'comment_post', 'bp_blogs_record_comment', 10, 2 );
</span><span class="lines">@@ -488,20 +493,23 @@
</span><span class="cx">         
</span><span class="cx">         bp_blogs_delete_activity( array( 'item_id' => $comment_id, 'secondary_item_id' => $recorded_comment->blog_id, 'component_name' => $bp->blogs->slug, 'component_action' => 'new_blog_comment' ) );
</span><span class="cx">
</span><del>-        $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id );
-        $activity_content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $recorded_comment->user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );                        
-        $activity_content .= '<blockquote>' . bp_create_excerpt( $comment->comment_content ) . '</blockquote>';
</del><ins>+        if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) ) {
+                /* Record in activity streams */
+                $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id );
+                $activity_content = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $recorded_comment->user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );                        
+                $activity_content .= '<blockquote>' . bp_create_excerpt( $comment->comment_content ) . '</blockquote>';
</ins><span class="cx">
</span><del>-        /* Record this in activity streams */
-        bp_blogs_record_activity( array(
-                'user_id' => $recorded_comment->user_id,
-                'content' => apply_filters( 'bp_blogs_activity_new_comment', $activity_content, &$comment, &$recorded_comment, $comment_link ),
-                'primary_link' => apply_filters( 'bp_blogs_activity_new_comment_primary_link', $comment_link, &$comment, &$recorded_comment ),
-                'component_action' => 'new_blog_comment',
-                'item_id' => $comment_id,
-                'secondary_item_id' => $recorded_comment->blog_id,
-                'recorded_time' => $recorded_comment->date_created
-        ) );
</del><ins>+                /* Record this in activity streams */
+                bp_blogs_record_activity( array(
+                        'user_id' => $recorded_comment->user_id,
+                        'content' => apply_filters( 'bp_blogs_activity_new_comment', $activity_content, &$comment, &$recorded_comment, $comment_link ),
+                        'primary_link' => apply_filters( 'bp_blogs_activity_new_comment_primary_link', $comment_link, &$comment, &$recorded_comment ),
+                        'component_action' => 'new_blog_comment',
+                        'item_id' => $comment_id,
+                        'secondary_item_id' => $recorded_comment->blog_id,
+                        'recorded_time' => $recorded_comment->date_created
+                ) );
+        }
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'wp_set_comment_status', 'bp_blogs_approve_comment', 10, 2 );
</span><span class="cx">
</span><span class="lines">@@ -513,7 +521,7 @@
</span><span class="cx">
</span><span class="cx"> function bp_blogs_add_user_to_blog( $user_id, $role, $blog_id ) {
</span><span class="cx">         if ( $role != 'subscriber' ) {
</span><del>-                bp_blogs_record_blog( $blog_id, $user_id, $no_activity = true );
</del><ins>+                bp_blogs_record_blog( $blog_id, $user_id );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> add_action( 'add_user_to_blog', 'bp_blogs_add_user_to_blog', 10, 3 );
</span></span></pre></div>
<a id="trunkbpcorebpcoreclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-classes.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-classes.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-core/bp-core-classes.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx">                 if ( strlen($letter) > 1 || is_numeric($letter) || !$letter )
</span><span class="cx">                         return false;
</span><span class="cx">                 
</span><del>-                like_escape($letter);
</del><ins>+                $letter = like_escape( $wpdb->escape( $letter ) );
</ins><span class="cx">
</span><span class="cx">                 $total_users_sql = apply_filters( 'bp_core_users_by_letter_count_sql', $wpdb->prepare( "SELECT DISTINCT count(u.ID) FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC", BP_XPROFILE_FULLNAME_FIELD_NAME ), $letter );
</span><span class="cx">                 $paged_users_sql = apply_filters( 'bp_core_users_by_letter_sql', $wpdb->prepare( "SELECT DISTINCT u.ID as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pf.name = %s AND pd.value LIKE '$letter%%' ORDER BY pd.value ASC{$pag_sql}", BP_XPROFILE_FULLNAME_FIELD_NAME ), $letter, $pag_sql );
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">                 if ( $limit && $page )
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">                 
</span><del>-                like_escape($search_terms);        
</del><ins>+                $search_terms = like_escape( $wpdb->escape( $search_terms ) );        
</ins><span class="cx">
</span><span class="cx">                 $total_users_sql = apply_filters( 'bp_core_search_users_count_sql', "SELECT DISTINCT count(u.ID) as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pd.value LIKE '%%$search_terms%%' ORDER BY pd.value ASC", $search_terms );
</span><span class="cx">                 $paged_users_sql = apply_filters( 'bp_core_search_users_sql', "SELECT DISTINCT u.ID as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE u.spam = 0 AND u.deleted = 0 AND u.user_status = 0 AND pd.value LIKE '%%$search_terms%%' ORDER BY pd.value ASC{$pag_sql}", $search_terms, $pag_sql );
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-core.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -65,6 +65,10 @@
</span><span class="cx"> /* Define the slug for the search page */
</span><span class="cx"> if ( !defined( 'BP_HOME_BLOG_SLUG' ) )
</span><span class="cx">         define( 'BP_HOME_BLOG_SLUG', 'blog' );
</span><ins>+        
+/* Register BuddyPress themes contained within the theme folder */
+if ( function_exists( 'register_theme_folder' ) )
+        register_theme_folder( 'buddypress/bp-themes' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /* "And now for something completely different" .... */
</span><span class="lines">@@ -625,10 +629,18 @@
</span><span class="cx">                 'position' => $position
</span><span class="cx">         );
</span><span class="cx">
</span><ins>+         /***
+         * If this nav item is hidden for the displayed user, and
+         * the logged in user is not the displayed user
+         * looking at their own profile, don't create the nav item.
+         */
+        if ( !$show_for_displayed_user && !bp_is_home() )
+                return false;
+                
</ins><span class="cx">         /***
</span><del>-         * If we are not viewing a user, and this is a root component, don't attach the
-         * default subnav function so we can display a directory or something else.
-         */
</del><ins>+          * If we are not viewing a user, and this is a root component, don't attach the
+          * default subnav function so we can display a directory or something else.
+          */
</ins><span class="cx">         if ( bp_core_is_root_component( $slug ) && !$bp->displayed_user->id )
</span><span class="cx">                 return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-classes.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-classes.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-friends/bp-friends-classes.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">                 if ( !$user_id )
</span><span class="cx">                         $user_id = $bp->loggedin_user->id;
</span><span class="cx">                 
</span><del>-                like_escape($filter);
</del><ins>+                $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                 
</span><span class="cx">                 if ( $limit && $page )
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx">         function search_users( $filter, $user_id, $limit = null, $page = null ) {
</span><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">                 
</span><del>-                like_escape($filter);
</del><ins>+                $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                 $usermeta_table = $wpdb->base_prefix . 'usermeta';
</span><span class="cx">                 $users_table = $wpdb->base_prefix . 'users';
</span><span class="cx">
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx">         function search_users_count( $filter ) {
</span><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">                 
</span><del>-                like_escape($filter);
</del><ins>+                $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                 $usermeta_table = $wpdb->prefix . 'usermeta';
</span><span class="cx">                 $users_table = $wpdb->base_prefix . 'users';
</span><span class="cx">                 
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-classes.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-classes.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-groups/bp-groups-classes.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx">                 if ( !$user_id )
</span><span class="cx">                         $user_id = $bp->displayed_user->id;
</span><span class="cx">                 
</span><del>-                like_escape($filter);
</del><ins>+                $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                 
</span><span class="cx">                 if ( $limit && $page )
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="lines">@@ -268,7 +268,7 @@
</span><span class="cx">         function search_groups( $filter, $limit = null, $page = null, $sort_by = false, $order = false ) {
</span><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">                 
</span><del>-                like_escape($filter);
</del><ins>+                $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                 
</span><span class="cx">                 if ( $limit && $page )
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="lines">@@ -462,8 +462,8 @@
</span><span class="cx">                 if ( !is_site_admin() )
</span><span class="cx">                         $hidden_sql = $wpdb->prepare( " AND status != 'hidden'");
</span><span class="cx">                 
</span><del>-                like_escape($letter);
-                                
</del><ins>+                $letter = like_escape( $wpdb->escape( $letter ) );
+
</ins><span class="cx">                 if ( $limit && $page ) {
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">                         $total_groups = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->groups->table_name} WHERE name LIKE '$letter%%' {$hidden_sql} ORDER BY name ASC" ) );
</span><span class="lines">@@ -698,7 +698,7 @@
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">
</span><span class="cx">                 if ( $filter ) {
</span><del>-                        like_escape($filter);
</del><ins>+                        $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                         $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                        
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -718,7 +718,7 @@
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">
</span><span class="cx">                 if ( $filter ) {
</span><del>-                        like_escape($filter);
</del><ins>+                        like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                         $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                        
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -738,7 +738,7 @@
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">                         
</span><span class="cx">                 if ( $filter ) {
</span><del>-                        like_escape($filter);
</del><ins>+                        $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                         $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                        
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -758,7 +758,7 @@
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">
</span><span class="cx">                 if ( $filter ) {
</span><del>-                        like_escape($filter);
</del><ins>+                        $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                         $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                        
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -778,7 +778,7 @@
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">
</span><span class="cx">                 if ( $filter ) {
</span><del>-                        like_escape($filter);
</del><ins>+                        $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                         $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                        
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -798,7 +798,7 @@
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">
</span><span class="cx">                 if ( $filter ) {
</span><del>-                        like_escape($filter);
</del><ins>+                        $filter = like_escape( $wpdb->escape( $filter ) );
</ins><span class="cx">                         $filter_sql = " AND ( g.name LIKE '{$filter}%%' OR g.description LIKE '{$filter}%%' )";                        
</span><span class="cx">                 }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-templatetags.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-templatetags.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-groups/bp-groups-templatetags.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -1649,7 +1649,7 @@
</span><span class="cx"> }
</span><span class="cx">         function bp_get_new_group_description() {
</span><span class="cx">                 global $bp;
</span><del>-                return apply_filters( 'bp_get_new_group_description', $bp->groups->current_group->name );
</del><ins>+                return apply_filters( 'bp_get_new_group_description', $bp->groups->current_group->description );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_new_group_news() {
</span><span class="lines">@@ -1657,7 +1657,7 @@
</span><span class="cx"> }
</span><span class="cx">         function bp_get_new_group_news() {
</span><span class="cx">                 global $bp;
</span><del>-                return apply_filters( 'bp_get_new_group_news', $bp->groups->current_group->name );
</del><ins>+                return apply_filters( 'bp_get_new_group_news', $bp->groups->current_group->news );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_new_group_enable_wire() {
</span></span></pre></div>
<a id="trunkbpthemesbpsnparent_incjsajaxjs"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/_inc/js/ajax.js (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/_inc/js/ajax.js        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-themes/bp-sn-parent/_inc/js/ajax.js        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -78,12 +78,12 @@
</span><span class="cx">                         var page = j(this).attr('href');
</span><span class="cx">                         page = page.split('upage=');
</span><span class="cx">                         
</span><del>-                        if ( !j("input#selected_letter").val() )
</del><ins>+                        if ( undefined === j("input#selected_letter").val() )
</ins><span class="cx">                                 var letter = '';
</span><span class="cx">                         else
</span><span class="cx">                                 var letter = j("input#selected_letter").val();
</span><span class="cx">                                                 
</span><del>-                        if ( !j("input#search_terms").val() )
</del><ins>+                        if ( undefined === j("input#search_terms").val() )
</ins><span class="cx">                                 var search_terms = '';
</span><span class="cx">                         else
</span><span class="cx">                                 var search_terms = j("input#search_terms").val();
</span><span class="lines">@@ -332,12 +332,12 @@
</span><span class="cx">                         var page = j(this).attr('href');
</span><span class="cx">                         page = page.split('gpage=');
</span><span class="cx">                         
</span><del>-                        if ( !j("input#selected_letter").val() )
</del><ins>+                        if ( undefined === j("input#selected_letter").val() )
</ins><span class="cx">                                 var letter = '';
</span><span class="cx">                         else
</span><span class="cx">                                 var letter = j("input#selected_letter").val();
</span><span class="cx">                                                 
</span><del>-                        if ( !j("input#search_terms").val() )
</del><ins>+                        if ( undefined === j("input#search_terms").val() )
</ins><span class="cx">                                 var search_terms = '';
</span><span class="cx">                         else
</span><span class="cx">                                 var search_terms = j("input#search_terms").val();
</span><span class="lines">@@ -972,36 +972,6 @@
</span><span class="cx">                 }
</span><span class="cx">         );
</span><span class="cx">
</span><del>-        j("form#status-update-form").livequery('submit',
-                function() {
-                        j.post( ajaxurl, {
-                                action: 'status_new_status',
-                                'cookie': encodeURIComponent(document.cookie),
-                                '_wpnonce': j('input#_wpnonce_add_status').val(),
-                                'status-update-input': j('#status-update-input').val()
-                        },
-                        function(response) {
-                                if ( response == "1" ) {                        
-                                        j("div#user-status").slideUp(400,
-                                                function() {
-                                                        j.post( ajaxurl, {
-                                                                action: 'status_show_status',
-                                                                'cookie': encodeURIComponent(document.cookie)
-                                                        },
-                                                        function(response) {                                
-                                                                j("div#user-status").html(response);
-                                                                j("div#user-status").slideDown(400);
-                                                                j(window).unbind('click');
-                                                        });
-                                                }
-                                        );
-                                }
-                        });
-
-                        return false;
-                }
-        );
-
</del><span class="cx">         j("a#status-clear-status").livequery('click',
</span><span class="cx">                 function() {
</span><span class="cx">                         j(this).addClass('ajax-loader');
</span><span class="lines">@@ -1093,12 +1063,12 @@
</span><span class="cx">                         var page = j(this).attr('href');
</span><span class="cx">                         page = page.split('bpage=');
</span><span class="cx">                         
</span><del>-                        if ( !j("input#selected_letter").val() )
</del><ins>+                        if ( undefined === j("input#selected_letter").val() )
</ins><span class="cx">                                 var letter = '';
</span><span class="cx">                         else
</span><span class="cx">                                 var letter = j("input#selected_letter").val();
</span><span class="cx">                                                 
</span><del>-                        if ( !j("input#search_terms").val() )
</del><ins>+                        if ( undefined === j("input#search_terms").val() )
</ins><span class="cx">                                 var search_terms = '';
</span><span class="cx">                         else
</span><span class="cx">                                 var search_terms = j("input#search_terms").val();
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentwirepostformphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/wire/post-form.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/wire/post-form.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-themes/bp-sn-parent/wire/post-form.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx">                         <?php do_action( 'bp_after_wire_post_form' ); /* Deprecated -> */ do_action( 'bp_wire_custom_wire_boxes_after' ); ?>
</span><span class="cx">                         
</span><span class="cx">                         <input type="submit" name="wire-post-submit" id="wire-post-submit" value="<?php _e( 'Post &raquo;', 'buddypress' ) ?>" />
</span><del>-                        <input type="hidden" name="bp_wire_item_id" id="bp_wire_item_id" value="<?php echo bp_get_wire_item_id() ?>" />
</del><span class="cx">
</span><span class="cx">                         <?php wp_nonce_field( 'bp_wire_post' ) ?>
</span><span class="cx">                         
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentwirepostlistphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/wire/post-list.php (2054 => 2055)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/wire/post-list.php        2009-10-23 16:23:17 UTC (rev 2054)
+++ trunk/bp-themes/bp-sn-parent/wire/post-list.php        2009-10-26 17:31:43 UTC (rev 2055)
</span><span class="lines">@@ -58,7 +58,8 @@
</span><span class="cx">                 </ul>
</span><span class="cx">                 
</span><span class="cx">                 <?php do_action( 'bp_after_wire_post_list' ) ?>
</span><del>-        
</del><ins>+
+                <input type="hidden" name="bp_wire_item_id" id="bp_wire_item_id" value="<?php echo bp_get_wire_item_id() ?>" />        
</ins><span class="cx">         </div>
</span><span class="cx">         <?php else: ?>
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>