<!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] [2826] branches/1.2:
  Fixing errors in single WP setups with blog post recording by removing all no longer used blog and comment recording functions to the back compat plugin
 .</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2826</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-03-10 12:03:43 +0000 (Wed, 10 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixing errors in single WP setups with blog post recording by removing all no longer used blog and comment recording functions to the back compat plugin.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches12bpblogsbpblogsclassesphp">branches/1.2/bp-blogs/bp-blogs-classes.php</a></li>
<li><a href="#branches12bpblogsphp">branches/1.2/bp-blogs.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches12bpblogsbpblogsclassesphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-blogs/bp-blogs-classes.php (2825 => 2826)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-blogs/bp-blogs-classes.php        2010-03-10 11:12:52 UTC (rev 2825)
+++ branches/1.2/bp-blogs/bp-blogs-classes.php        2010-03-10 12:03:43 UTC (rev 2826)
</span><span class="lines">@@ -278,17 +278,9 @@
</span><span class="cx">                 if ( empty( $blog_ids ) )
</span><span class="cx">                         return $paged_blogs;
</span><span class="cx"> 
</span><del>-                /* Fetch lastest post for each blog. */
-                $post_ids = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT p.post_id, p.blog_id FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} p LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND p.blog_id IN ( {$blog_ids} ) GROUP BY p.blog_id ORDER BY p.date_created DESC&quot; ) );
</del><ins>+                for ( $i = 0; $i &lt; count( $paged_blogs ); $i++ )
+                        $paged_blogs[$i]-&gt;latest_post = $wpdb-&gt;get_row( &quot;SELECT post_title, guid FROM {$wpdb-&gt;base_prefix}&quot; . $paged_blogs[$i]-&gt;blog_id . &quot;_posts WHERE post_status = 'publish' AND post_type = 'post' AND id != 1 ORDER BY id DESC LIMIT 1&quot; );
</ins><span class="cx"> 
</span><del>-                for ( $i = 0; $i &lt; count( $paged_blogs ); $i++ ) {
-                        foreach ( (array)$post_ids as $post ) {
-                                if ( $post-&gt;blog_id == $paged_blogs[$i]-&gt;blog_id ) {
-                                        $paged_blogs[$i]-&gt;latest_post = $wpdb-&gt;get_row( &quot;SELECT post_title, guid FROM {$wpdb-&gt;base_prefix}&quot; . $post-&gt;blog_id . &quot;_posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY id DESC LIMIT 1&quot; );
-                                }
-                        }
-                }
-
</del><span class="cx">                 /* Fetch the blog description for each blog (as it may be empty we can't fetch it in the main query). */
</span><span class="cx">                 $blog_descs = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT blog_id, meta_value as description FROM {$bp-&gt;blogs-&gt;table_name_blogmeta} WHERE meta_key = 'description' AND blog_id IN ( {$blog_ids} )&quot; ) );
</span><span class="cx"> 
</span><span class="lines">@@ -315,398 +307,4 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* DEPRECATED - Post DB recording is scheduled for removal. Please use the activity stream to fetch a user's posts. */
-Class BP_Blogs_Post {
-        var $id;
-        var $user_id;
-        var $blog_id;
-        var $post_id;
-        var $date_created;
-
-        function bp_blogs_post( $id = null, $blog_id = null, $post_id = null ) {
-                global $bp, $wpdb;
-
-                if ( $id || ( !$id &amp;&amp; $blog_id &amp;&amp; $post_id ) ) {
-                        $this-&gt;id = $id;
-                        $this-&gt;blog_id = $blog_id;
-                        $this-&gt;post_id = $post_id;
-                        $this-&gt;populate();
-                }
-        }
-
-        function populate() {
-                global $wpdb, $bp;
-
-                if ( $this-&gt;id )
-                        $post = $wpdb-&gt;get_row( $wpdb-&gt;prepare( &quot;SELECT * FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE id = %d&quot;, $this-&gt;id ) );
-                else
-                        $post = $wpdb-&gt;get_row( $wpdb-&gt;prepare( &quot;SELECT * FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE blog_id = %d AND post_id = %d&quot;, $this-&gt;blog_id, $this-&gt;post_id ) );
-
-                $this-&gt;id = $post-&gt;id;
-                $this-&gt;user_id = $post-&gt;user_id;
-                $this-&gt;blog_id = $post-&gt;blog_id;
-                $this-&gt;post_id = $post-&gt;post_id;
-                $this-&gt;date_created = $post-&gt;date_created;
-        }
-
-        function save() {
-                global $wpdb, $bp;
-
-                $this-&gt;post_id = apply_filters( 'bp_blogs_post_id_before_save', $this-&gt;post_id, $this-&gt;id );
-                $this-&gt;blog_id = apply_filters( 'bp_blogs_post_blog_id_before_save', $this-&gt;blog_id, $this-&gt;id );
-                $this-&gt;user_id = apply_filters( 'bp_blogs_post_user_id_before_save', $this-&gt;user_id, $this-&gt;id );
-                $this-&gt;date_created = apply_filters( 'bp_blogs_post_date_created_before_save', $this-&gt;date_created, $this-&gt;id );
-
-                do_action( 'bp_blogs_post_before_save', $this );
-
-                if ( $this-&gt;id ) {
-                        // Update
-                        $sql = $wpdb-&gt;prepare( &quot;UPDATE {$bp-&gt;blogs-&gt;table_name_blog_posts} SET post_id = %d, blog_id = %d, user_id = %d, date_created = FROM_UNIXTIME(%d) WHERE id = %d&quot;, $this-&gt;post_id, $this-&gt;blog_id, $this-&gt;user_id, $this-&gt;date_created, $this-&gt;id );
-                } else {
-                        // Save
-                        $sql = $wpdb-&gt;prepare( &quot;INSERT INTO {$bp-&gt;blogs-&gt;table_name_blog_posts} ( post_id, blog_id, user_id, date_created ) VALUES ( %d, %d, %d, FROM_UNIXTIME(%d) )&quot;, $this-&gt;post_id, $this-&gt;blog_id, $this-&gt;user_id, $this-&gt;date_created );
-                }
-
-                if ( !$wpdb-&gt;query($sql) )
-                        return false;
-
-                do_action( 'bp_blogs_post_after_save', $this );
-
-                if ( $this-&gt;id )
-                        return $this-&gt;id;
-                else
-                        return $wpdb-&gt;insert_id;
-        }
-
-        /* Static Functions */
-
-        function delete( $post_id, $blog_id ) {
-                global $wpdb, $bp, $current_user;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE blog_id = %d AND post_id = %d&quot;, $blog_id, $post_id ) );
-        }
-
-        function delete_oldest( $user_id = null ) {
-                global $wpdb, $bp;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $current_user-&gt;ID;
-
-                return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE user_id = %d ORDER BY date_created ASC LIMIT 1&quot;, $user_id ) );
-        }
-
-        function delete_posts_for_user( $user_id = null ) {
-                global $wpdb, $bp;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $bp-&gt;loggedin_user-&gt;id;
-
-                return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE user_id = %d&quot;, $user_id ) );
-        }
-
-        function delete_posts_for_blog( $blog_id ) {
-                global $wpdb, $bp;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE blog_id = %d&quot;, $blog_id ) );
-        }
-
-        function get_latest_posts( $blog_id = null, $limit = 5 ) {
-                global $wpdb, $bp;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( $blog_id )
-                        $blog_sql = $wpdb-&gt;prepare( &quot; AND p.blog_id = %d&quot;, $blog_id );
-
-                $post_ids = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT DISTINCT p.post_id, p.blog_id FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} p LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 $blog_sql ORDER BY p.date_created DESC LIMIT $limit&quot; ) );
-
-                for ( $i = 0; $i &lt; count($post_ids); $i++ ) {
-                        $posts[$i] = BP_Blogs_Post::fetch_post_content($post_ids[$i]);
-                }
-
-                return $posts;
-        }
-
-        function get_posts_for_user( $user_id = null ) {
-                global $bp, $wpdb;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $bp-&gt;displayed_user-&gt;id;
-
-                // Show a logged in user their posts on private blogs, but not anyone else.
-                if ( !bp_is_my_profile() ) {
-                        $post_ids = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT p.post_id, p.blog_id FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} p LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND p.user_id = %d ORDER BY p.date_created DESC&quot;, $user_id) );
-                        $total_post_count = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(p.post_id) FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} p LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND p.user_id = %d&quot;, $user_id) );
-                } else {
-                        $post_ids = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT p.post_id, p.blog_id FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} p LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND p.user_id = %d ORDER BY p.date_created DESC&quot;, $user_id) );
-
-                        $total_post_count = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(p.post_id) FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} p LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND p.user_id = %d&quot;, $user_id) );
-                }
-
-                for ( $i = 0; $i &lt; count($post_ids); $i++ ) {
-                        $posts[$i] = BP_Blogs_Post::fetch_post_content($post_ids[$i]);
-                }
-
-                return array( 'posts' =&gt; $posts, 'count' =&gt; $total_post_count );
-        }
-
-        function fetch_post_content( $post_object ) {
-                // TODO: switch_to_blog() calls are expensive and this needs to be changed.
-                switch_to_blog( $post_object-&gt;blog_id );
-                $post = get_post($post_object-&gt;post_id);
-                $post-&gt;blog_id = $post_object-&gt;blog_id;
-                restore_current_blog();
-
-                return $post;
-        }
-
-        function get_total_recorded_for_user( $user_id = null ) {
-                global $bp, $wpdb;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $current_user-&gt;ID;
-
-                return $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(post_id) FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE user_id = %d&quot;, $user_id ) );
-        }
-
-        function is_recorded( $post_id, $blog_id, $user_id = null ) {
-                global $bp, $wpdb, $current_user;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $current_user-&gt;ID;
-
-                return $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT post_id FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE post_id = %d AND blog_id = %d AND user_id = %d&quot;, $post_id, $blog_id, $user_id ) );
-        }
-
-        function total_post_count( $blog_id ) {
-                global $bp, $wpdb;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$blog_id )
-                        return false;
-
-                return $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(post_id) FROM {$bp-&gt;blogs-&gt;table_name_blog_posts} WHERE blog_id = %d&quot;, $blog_id ) );
-        }
-
-        function get_all() {
-                global $bp, $wpdb;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                return $wpdb-&gt;get_col( $wpdb-&gt;prepare( &quot;SELECT post_id, blog_id FROM &quot; . $bp-&gt;blogs-&gt;table_name_blog_posts ) );
-        }
-
-}
-
-/* DEPRECATED - Comment DB recording is scheduled for removal. Please use the activity stream to fetch a user's comments. */
-Class BP_Blogs_Comment {
-        var $id;
-        var $user_id;
-        var $blog_id;
-        var $comment_id;
-        var $comment_post_id;
-        var $date_created;
-
-        function bp_blogs_comment( $id = false, $blog_id = false, $comment_id = false ) {
-                global $bp, $wpdb;
-
-                if ( !$user_id )
-                        $user_id = $bp-&gt;displayed_user-&gt;id;
-
-                if ( $id || ( !$id &amp;&amp; $blog_id &amp;&amp; $comment_id ) ) {
-                        $this-&gt;id = $id;
-                        $this-&gt;blog_id = $blog_id;
-                        $this-&gt;comment_id = $comment_id;
-                        $this-&gt;populate();
-                }
-        }
-
-        function populate() {
-                global $wpdb, $bp;
-
-                if ( $this-&gt;id )
-                        $comment = $wpdb-&gt;get_row( $wpdb-&gt;prepare( &quot;SELECT * FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} WHERE id = %d&quot;, $this-&gt;id ) );
-                else
-                        $comment = $wpdb-&gt;get_row( $wpdb-&gt;prepare( &quot;SELECT * FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} WHERE blog_id = %d AND comment_id = %d&quot;, (int)$this-&gt;blog_id, (int)$this-&gt;comment_id ) );
-
-                $this-&gt;comment_id = $comment-&gt;comment_id;
-                $this-&gt;user_id = $comment-&gt;user_id;
-                $this-&gt;blog_id = $comment-&gt;blog_id;
-                $this-&gt;comment_post_id = $comment-&gt;comment_post_id;
-                $this-&gt;date_created = $comment-&gt;date_created;
-        }
-
-        function save() {
-                global $wpdb, $bp;
-
-                $this-&gt;comment_id = apply_filters( 'bp_blogs_comment_id_before_save', $this-&gt;comment_id, $this-&gt;id );
-                $this-&gt;comment_post_id = apply_filters( 'bp_blogs_comment_post_id_before_save', $this-&gt;comment_post_id, $this-&gt;id );
-                $this-&gt;blog_id = apply_filters( 'bp_blogs_comment_blog_id_before_save', $this-&gt;blog_id, $this-&gt;id );
-                $this-&gt;user_id = apply_filters( 'bp_blogs_comment_user_id_before_save', $this-&gt;user_id, $this-&gt;id );
-                $this-&gt;date_created = apply_filters( 'bp_blogs_comment_date_created_before_save', $this-&gt;date_created, $this-&gt;id );
-
-                do_action( 'bp_blogs_comment_before_save', $this );
-
-                if ( $this-&gt;id ) {
-                        // Update
-                        $sql = $wpdb-&gt;prepare( &quot;UPDATE {$bp-&gt;blogs-&gt;table_name_blog_comments} SET comment_id = %d, comment_post_id = %d, blog_id = %d, user_id = %d, date_created = FROM_UNIXTIME(%d) WHERE id = %d&quot;, $this-&gt;comment_id, $this-&gt;comment_post_id, $this-&gt;blog_id, $this-&gt;user_id, $this-&gt;date_created, $this-&gt;id );
-                } else {
-                        // Save
-                        $sql = $wpdb-&gt;prepare( &quot;INSERT INTO {$bp-&gt;blogs-&gt;table_name_blog_comments} ( comment_id, comment_post_id, blog_id, user_id, date_created ) VALUES ( %d, %d, %d, %d, FROM_UNIXTIME(%d) )&quot;, $this-&gt;comment_id, $this-&gt;comment_post_id, $this-&gt;blog_id, $this-&gt;user_id, $this-&gt;date_created );
-                }
-
-                if ( !$wpdb-&gt;query($sql) )
-                        return false;
-
-                do_action( 'bp_blogs_comment_after_save', $this );
-
-                if ( $this-&gt;id )
-                        return $this-&gt;id;
-                else
-                        return $wpdb-&gt;insert_id;
-        }
-
-        /* Static Functions */
-
-        function delete( $comment_id, $blog_id ) {
-                global $wpdb, $bp, $current_user;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} WHERE comment_id = %d AND blog_id = %d&quot;, $comment_id, $blog_id ) );
-        }
-
-        function delete_oldest( $user_id = null ) {
-                global $wpdb, $bp, $current_user;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $current_user-&gt;ID;
-
-                return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} WHERE user_id = %d ORDER BY date_created ASC LIMIT 1&quot;, $user_id ) );
-        }
-
-        function delete_comments_for_user( $user_id = null ) {
-                global $wpdb, $bp;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $bp-&gt;loggedin_user-&gt;id;
-
-                return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} WHERE user_id = %d&quot;, $user_id ) );
-        }
-
-        function delete_comments_for_blog( $blog_id ) {
-                global $wpdb, $bp;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} WHERE blog_id = %d&quot;, $blog_id ) );
-        }
-
-        function get_comments_for_user( $user_id = null ) {
-                global $bp, $wpdb;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $bp-&gt;displayed_user-&gt;id;
-
-                // Show the logged in user their comments on hidden blogs, but not to anyone else.
-                if ( !bp_is_my_profile() ) {
-                        $comment_ids = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT c.comment_id, c.blog_id FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} c LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON c.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND c.user_id = %d ORDER BY c.date_created ASC&quot;, $user_id) );
-                        $total_comment_count = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(c.comment_id) FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} c LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON c.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND c.user_id = %d&quot;, $user_id) );
-                } else {
-                        $comment_ids = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT c.comment_id, c.blog_id FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} c LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON c.blog_id = b.blog_id WHERE b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND c.user_id = %d ORDER BY c.date_created ASC&quot;, $user_id) );
-
-                        $total_comment_count = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(c.comment_id) FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} c LEFT JOIN {$wpdb-&gt;base_prefix}blogs b ON c.blog_id = b.blog_id WHERE b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND c.user_id = %d&quot;, $user_id) );
-                }
-
-                for ( $i = 0; $i &lt; count($comment_ids); $i++ )
-                        $comments[$i] = BP_Blogs_Comment::fetch_comment_content($comment_ids[$i]);
-
-                return array( 'comments' =&gt; $comments, 'count' =&gt; $total_comment_count );
-        }
-
-        function fetch_comment_content( $comment_object ) {
-                switch_to_blog($comment_object-&gt;blog_id);
-                $comment = get_comment($comment_object-&gt;comment_id);
-                $comment-&gt;blog_id = $comment_object-&gt;blog_id;
-                $comment-&gt;post = &amp;get_post( $comment-&gt;comment_post_ID );
-                restore_current_blog();
-
-                return $comment;
-        }
-
-        function get_total_recorded_for_user( $user_id = null ) {
-                global $bp, $wpdb, $current_user;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $current_user-&gt;ID;
-
-                return $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(comment_id) FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} WHERE user_id = %d&quot;, $user_id ) );
-        }
-
-        function total_comment_count( $blog_id, $post_id ) {
-                global $bp, $wpdb;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( $post_id )
-                        $post_sql = $wpdb-&gt;prepare( &quot; AND comment_post_id = %d&quot;, $post_id );
-
-                return $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(comment_id) WHERE blog_id = %d{$post_sql}&quot;, $blog_id ) );
-        }
-
-
-        function is_recorded( $comment_id, $comment_post_id, $blog_id, $user_id = null ) {
-                global $bp, $wpdb, $current_user;
-
-                if ( !$bp-&gt;blogs )
-                        bp_blogs_setup_globals();
-
-                if ( !$user_id )
-                        $user_id = $current_user-&gt;ID;
-
-                return $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT comment_id FROM {$bp-&gt;blogs-&gt;table_name_blog_comments} WHERE comment_id = %d AND blog_id = %d AND comment_post_id = %d AND user_id = %d&quot;, $comment_id, $blog_id, $comment_post_id, $user_id ) );
-        }
-
-}
-
</del><span class="cx"> ?&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branches12bpblogsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-blogs.php (2825 => 2826)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-blogs.php        2010-03-10 11:12:52 UTC (rev 2825)
+++ branches/1.2/bp-blogs.php        2010-03-10 12:03:43 UTC (rev 2826)
</span><span class="lines">@@ -27,30 +27,6 @@
</span><span class="cx">                                 KEY blog_id (blog_id)
</span><span class="cx">                          ) {$charset_collate};&quot;;
</span><span class="cx"> 
</span><del>-        $sql[] = &quot;CREATE TABLE {$bp-&gt;blogs-&gt;table_name_blog_posts} (
-                                  id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-                                user_id bigint(20) NOT NULL,
-                                blog_id bigint(20) NOT NULL,
-                                post_id bigint(20) NOT NULL,
-                                date_created datetime NOT NULL,
-                                KEY user_id (user_id),
-                                KEY blog_id (blog_id),
-                                KEY post_id (post_id)
-                         ) {$charset_collate};&quot;;
-
-        $sql[] = &quot;CREATE TABLE {$bp-&gt;blogs-&gt;table_name_blog_comments} (
-                                  id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
-                                user_id bigint(20) NOT NULL,
-                                blog_id bigint(20) NOT NULL,
-                                comment_id bigint(20) NOT NULL,
-                                comment_post_id bigint(20) NOT NULL,
-                                date_created datetime NOT NULL,
-                                KEY user_id (user_id),
-                                KEY blog_id (blog_id),
-                                KEY comment_id (comment_id),
-                                KEY comment_post_id (comment_post_id)
-                         ) {$charset_collate};&quot;;
-
</del><span class="cx">         $sql[] = &quot;CREATE TABLE {$bp-&gt;blogs-&gt;table_name_blogmeta} (
</span><span class="cx">                                 id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
</span><span class="cx">                                 blog_id bigint(20) NOT NULL,
</span><span class="lines">@@ -93,8 +69,6 @@
</span><span class="cx">         $bp-&gt;blogs-&gt;id = 'blogs';
</span><span class="cx"> 
</span><span class="cx">         $bp-&gt;blogs-&gt;table_name = $wpdb-&gt;base_prefix . 'bp_user_blogs';
</span><del>-        $bp-&gt;blogs-&gt;table_name_blog_posts = $wpdb-&gt;base_prefix . 'bp_user_blogs_posts';
-        $bp-&gt;blogs-&gt;table_name_blog_comments = $wpdb-&gt;base_prefix . 'bp_user_blogs_comments';
</del><span class="cx">         $bp-&gt;blogs-&gt;table_name_blogmeta = $wpdb-&gt;base_prefix . 'bp_user_blogs_blogmeta';
</span><span class="cx">         $bp-&gt;blogs-&gt;format_notification_function = 'bp_blogs_format_notifications';
</span><span class="cx">         $bp-&gt;blogs-&gt;slug = BP_BLOGS_SLUG;
</span><span class="lines">@@ -182,16 +156,6 @@
</span><span class="cx">         bp_core_load_template( apply_filters( 'bp_blogs_template_my_blogs', 'members/single/home' ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function bp_blogs_screen_recent_posts() {
-        do_action( 'bp_blogs_screen_recent_posts' );
-        bp_core_load_template( apply_filters( 'bp_blogs_template_recent_posts', 'members/single/home' ) );
-}
-
-function bp_blogs_screen_recent_comments() {
-        do_action( 'bp_blogs_screen_recent_comments' );
-        bp_core_load_template( apply_filters( 'bp_blogs_template_recent_comments', 'members/single/home' ) );
-}
-
</del><span class="cx"> function bp_blogs_screen_create_a_blog() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><span class="lines">@@ -330,7 +294,6 @@
</span><span class="cx">         return apply_filters( 'bp_blogs_get_blogs', BP_Blogs_Blog::get( $type, $per_page, $page, $user_id, $search_terms ), &amp;$params );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> function bp_blogs_record_existing_blogs() {
</span><span class="cx">         global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="lines">@@ -402,7 +365,7 @@
</span><span class="cx">         if ( !$user_id )
</span><span class="cx">                 $user_id = (int)$post-&gt;post_author;
</span><span class="cx"> 
</span><del>-        /* This is to stop infinate loops with Donncha's sitewide tags plugin */
</del><ins>+        /* This is to stop infinite loops with Donncha's sitewide tags plugin */
</ins><span class="cx">         if ( (int)$bp-&gt;site_options['tags_blog_id'] == (int)$blog_id )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="lines">@@ -410,59 +373,11 @@
</span><span class="cx">         if ( $post-&gt;post_type != 'post' )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        if ( !$is_recorded = BP_Blogs_Post::is_recorded( $post_id, $blog_id, $user_id ) ) {
-                if ( 'publish' == $post-&gt;post_status &amp;&amp; '' == $post-&gt;post_password ) {
</del><ins>+        if ( 'publish' == $post-&gt;post_status &amp;&amp; '' == $post-&gt;post_password ) {
+                bp_blogs_update_blogmeta( $recorded_post-&gt;blog_id, 'last_activity', gmdate( &quot;Y-m-d H:i:s&quot; ) );
</ins><span class="cx"> 
</span><del>-                        /* If we're on a multiblog install, record this post */
-                        if ( bp_core_is_multisite() ) {
-                                $recorded_post = new BP_Blogs_Post;
-                                $recorded_post-&gt;user_id = $user_id;
-                                $recorded_post-&gt;blog_id = $blog_id;
-                                $recorded_post-&gt;post_id = $post_id;
-                                $recorded_post-&gt;date_created = strtotime( $post-&gt;post_date );
-
-                                $recorded_post_id = $recorded_post-&gt;save();
-
-                                bp_blogs_update_blogmeta( $recorded_post-&gt;blog_id, 'last_activity', gmdate( &quot;Y-m-d H:i:s&quot; ) );
-                        }
-
-                        if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
-                                /* Record this in activity streams */
-                                $post_permalink = get_permalink( $post_id );
-
-                                $activity_action = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post-&gt;post_author ), '&lt;a href=&quot;' . $post_permalink . '&quot;&gt;' . $post-&gt;post_title . '&lt;/a&gt;' );
-                                $activity_content = $post-&gt;post_content;
-
-                                bp_blogs_record_activity( array(
-                                        'user_id' =&gt; (int)$post-&gt;post_author,
-                                        'action' =&gt; apply_filters( 'bp_blogs_activity_new_post_action', $activity_action, &amp;$post, $post_permalink ),
-                                        'content' =&gt; apply_filters( 'bp_blogs_activity_new_post_content', $activity_content, &amp;$post, $post_permalink ),
-                                        'primary_link' =&gt; apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink, $post_id ),
-                                        'type' =&gt; 'new_blog_post',
-                                        'item_id' =&gt; $blog_id,
-                                        'secondary_item_id' =&gt; $post_id,
-                                        'recorded_time' =&gt; $post-&gt;post_date_gmt
-                                ));
-                        }
-                }
-        } else {
-                $existing_post = new BP_Blogs_Post( null, $blog_id, $post_id );
-
-                /* Delete the recorded post if the status is not published or it is password protected */
-                if ( 'publish' != $post-&gt;post_status || '' != $post-&gt;post_password ) {
-                        return bp_blogs_remove_post( $post_id, $blog_id, $existing_post );
-
-                /* If the post author has changed, delete the post and re-add it. */
-                } else if ( (int)$existing_post-&gt;user_id != (int)$post-&gt;post_author ) {
-                        // Delete the existing recorded post
-                        bp_blogs_remove_post( $post_id, $blog_id, $existing_post );
-
-                        // Re-record the post with the new author.
-                        bp_blogs_record_post( $post_id );
-                }
-
</del><span class="cx">                 if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
</span><del>-                        /* Now re-record the post in the activity streams */
</del><ins>+                        /* Record this in activity streams */
</ins><span class="cx">                         $post_permalink = get_permalink( $post_id );
</span><span class="cx"> 
</span><span class="cx">                         $activity_action = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post-&gt;post_author ), '&lt;a href=&quot;' . $post_permalink . '&quot;&gt;' . $post-&gt;post_title . '&lt;/a&gt;' );
</span><span class="lines">@@ -477,20 +392,18 @@
</span><span class="cx">                                 'item_id' =&gt; $blog_id,
</span><span class="cx">                                 'secondary_item_id' =&gt; $post_id,
</span><span class="cx">                                 'recorded_time' =&gt; $post-&gt;post_date_gmt
</span><del>-                        ) );
</del><ins>+                        ));
</ins><span class="cx">                 }
</span><del>-        }
</del><ins>+        } else
+                bp_blogs_remove_post( $post_id, $blog_id );
</ins><span class="cx"> 
</span><del>-        do_action( 'bp_blogs_new_blog_post', $existing_post, $is_private, $is_recorded );
</del><ins>+        do_action( 'bp_blogs_new_blog_post', $post_id, $post, $user_id );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'save_post', 'bp_blogs_record_post', 10, 2 );
</span><span class="cx"> 
</span><del>-function bp_blogs_record_comment( $comment_id, $is_approved ) {
</del><ins>+function bp_blogs_record_comment( $comment_id, $is_approved = true ) {
</ins><span class="cx">         global $wpdb, $bp;
</span><span class="cx"> 
</span><del>-        if ( !$is_approved )
-                return false;
-
</del><span class="cx">         $comment = get_comment($comment_id);
</span><span class="cx">         $comment-&gt;post = get_post( $comment-&gt;comment_post_ID );
</span><span class="cx"> 
</span><span class="lines">@@ -505,20 +418,6 @@
</span><span class="cx">         if ( !empty( $post-&gt;post_password ) )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        /* If we're on a multiblog install, record this post */
-        if ( bp_core_is_multisite() ) {
-                $recorded_comment = new BP_Blogs_Comment;
-                $recorded_comment-&gt;user_id = $user_id;
-                $recorded_comment-&gt;blog_id = $wpdb-&gt;blogid;
-                $recorded_comment-&gt;comment_id = $comment_id;
-                $recorded_comment-&gt;comment_post_id = $comment-&gt;comment_post_ID;
-                $recorded_comment-&gt;date_created = strtotime( $comment-&gt;comment_date_gmt );
-
-                $recorded_commment_id = $recorded_comment-&gt;save();
-
-                bp_blogs_update_blogmeta( $recorded_comment-&gt;blog_id, 'last_activity', gmdate( &quot;Y-m-d H:i:s&quot; ) );
-        }
-
</del><span class="cx">         if ( (int)get_blog_option( $recorded_comment-&gt;blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
</span><span class="cx">                 /* Record in activity streams */
</span><span class="cx">                 $comment_link = get_permalink( $comment-&gt;comment_post_ID ) . '#comment-' . $comment_id;
</span><span class="lines">@@ -541,6 +440,7 @@
</span><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><ins>+add_action( 'edit_comment', 'bp_blogs_record_comment', 10 );
</ins><span class="cx"> 
</span><span class="cx"> function bp_blogs_manage_comment( $comment_id, $comment_status ) {
</span><span class="cx">         if ( 'spam' == $comment_status || 'hold' == $comment_status || 'delete' == $comment_status || 'trash' == $comment_status )
</span><span class="lines">@@ -600,7 +500,7 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'remove_user_from_blog', 'bp_blogs_remove_blog_for_user', 10, 2 );
</span><span class="cx"> 
</span><del>-function bp_blogs_remove_post( $post_id, $blog_id = false, $existing_post = false ) {
</del><ins>+function bp_blogs_remove_post( $post_id, $blog_id = false ) {
</ins><span class="cx">         global $current_blog, $bp;
</span><span class="cx"> 
</span><span class="cx">         $post_id = (int)$post_id;
</span><span class="lines">@@ -608,12 +508,6 @@
</span><span class="cx">         if ( !$blog_id )
</span><span class="cx">                 $blog_id = (int)$current_blog-&gt;blog_id;
</span><span class="cx"> 
</span><del>-        if ( !$existing_post )
-                $existing_post = new BP_Blogs_Post( null, $blog_id, $post_id );
-
-        // Delete post from the bp_blogs table
-        BP_Blogs_Post::delete( $post_id, $blog_id );
-
</del><span class="cx">         // Delete activity stream item
</span><span class="cx">         bp_blogs_delete_activity( array( 'item_id' =&gt; $blog_id, 'secondary_item_id' =&gt; $post_id, 'component' =&gt; $bp-&gt;blogs-&gt;slug, 'type' =&gt; 'new_blog_post' ) );
</span><span class="cx"> 
</span><span class="lines">@@ -624,9 +518,6 @@
</span><span class="cx"> function bp_blogs_remove_comment( $comment_id ) {
</span><span class="cx">         global $wpdb, $bp;
</span><span class="cx"> 
</span><del>-        $recorded_comment = new BP_Blogs_Comment( false, $wpdb-&gt;blogid, $comment_id );
-        BP_Blogs_Comment::delete( $comment_id, $wpdb-&gt;blogid );
-
</del><span class="cx">         // Delete activity stream item
</span><span class="cx">         bp_blogs_delete_activity( array( 'item_id' =&gt; $wpdb-&gt;blogid , 'secondary_item_id' =&gt; $comment_id, 'type' =&gt; 'new_blog_comment' ) );
</span><span class="cx"> 
</span><span class="lines">@@ -662,8 +553,6 @@
</span><span class="cx"> 
</span><span class="cx">         /* If this is regular blog, delete all data for that blog. */
</span><span class="cx">         BP_Blogs_Blog::delete_blog_for_all( $blog_id );
</span><del>-        BP_Blogs_Post::delete_posts_for_blog( $blog_id );
-        BP_Blogs_Comment::delete_comments_for_blog( $blog_id );
</del><span class="cx"> 
</span><span class="cx">         // Delete activity stream item
</span><span class="cx">         bp_blogs_delete_activity( array( 'item_id' =&gt; $blog_id, 'component' =&gt; $bp-&gt;blogs-&gt;slug, 'type' =&gt; false ) );
</span><span class="lines">@@ -676,25 +565,6 @@
</span><span class="cx">         return BP_Blogs_Blog::get_blogs_for_user( $user_id, $show_hidden );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* DEPRECATED - scheduled for removal. Please use the activity stream with a 'new_blog_post' filter. */
-function bp_blogs_get_posts_for_user( $user_id ) {
-        return BP_Blogs_Post::get_posts_for_user( $user_id );
-}
-
-/* DEPRECATED - scheduled for removal. Please use the activity stream with a 'new_blog_comment' filter. */
-function bp_blogs_get_comments_for_user( $user_id ) {
-        return BP_Blogs_Comment::get_comments_for_user( $user_id );
-}
-
-function bp_blogs_get_latest_posts( $blog_id = null, $limit = 5 ) {
-        global $bp;
-
-        if ( !is_numeric( $limit ) )
-                $limit = 5;
-
-        return BP_Blogs_Post::get_latest_posts( $blog_id, $limit );
-}
-
</del><span class="cx"> function bp_blogs_get_all_blogs( $limit = null, $page = null ) {
</span><span class="cx">         return BP_Blogs_Blog::get_all( $limit, $page );
</span><span class="cx"> }
</span><span class="lines">@@ -703,18 +573,6 @@
</span><span class="cx">         return BP_Blogs_Blog::get( 'random', $limit, $page );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function bp_blogs_get_all_posts( $limit = null, $page = null ) {
-        return BP_Blogs_Post::get_all( $limit, $page );
-}
-
-function bp_blogs_total_post_count( $blog_id ) {
-        return BP_Blogs_Post::total_post_count( $blog_id );
-}
-
-function bp_blogs_total_comment_count( $blog_id, $post_id = false ) {
-        return BP_Blogs_Post::total_comment_count( $blog_id, $post_id );
-}
-
</del><span class="cx"> function bp_blogs_is_blog_hidden( $blog_id ) {
</span><span class="cx">         return BP_Blogs_Blog::is_hidden( $blog_id );
</span><span class="cx"> }
</span><span class="lines">@@ -833,8 +691,6 @@
</span><span class="cx"> function bp_blogs_remove_data( $user_id ) {
</span><span class="cx">         /* If this is regular blog, delete all data for that blog. */
</span><span class="cx">         BP_Blogs_Blog::delete_blogs_for_user( $user_id );
</span><del>-        BP_Blogs_Post::delete_posts_for_user( $user_id );
-        BP_Blogs_Comment::delete_comments_for_user( $user_id );
</del><span class="cx"> 
</span><span class="cx">         do_action( 'bp_blogs_remove_data', $user_id );
</span><span class="cx"> }
</span><span class="lines">@@ -866,36 +722,9 @@
</span><span class="cx">         wp_cache_delete( 'bp_total_blogs', 'bp' );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function bp_blogs_clear_post_object_cache( $blog_id, $post_id, $user_id ) {
-        wp_cache_delete( 'bp_user_posts_' . $user_id, 'bp' );
-}
-
-function bp_blogs_format_clear_post_cache( $recorded_post_obj ) {
-        bp_blogs_clear_post_object_cache( false, false, $recorded_post_obj-&gt;user_id );
-
-        /* Clear the sitewide activity cache */
-        wp_cache_delete( 'sitewide_activity', 'bp' );
-}
-
-function bp_blogs_clear_comment_object_cache( $blog_id, $comment_id, $user_id ) {
-        wp_cache_delete( 'bp_user_comments_' . $user_id, 'bp' );
-}
-
-function bp_blogs_format_clear_comment_cache( $recorded_comment_obj ) {
-        bp_blogs_clear_comment_object_cache( false, false, $recorded_comment_obj-&gt;user_id );
-
-        /* Clear the sitewide activity cache */
-        wp_cache_delete( 'sitewide_activity', 'bp' );
-}
-
</del><span class="cx"> // List actions to clear object caches on
</span><span class="cx"> add_action( 'bp_blogs_remove_blog_for_user', 'bp_blogs_clear_blog_object_cache', 10, 2 );
</span><del>-add_action( 'bp_blogs_remove_post', 'bp_blogs_clear_post_object_cache', 10, 3 );
-add_action( 'bp_blogs_remove_comment', 'bp_blogs_clear_comment_object_cache', 10, 3 );
-
</del><span class="cx"> add_action( 'bp_blogs_new_blog', 'bp_blogs_format_clear_blog_cache', 10, 2 );
</span><del>-add_action( 'bp_blogs_new_blog_post', 'bp_blogs_format_clear_post_cache', 10, 2 );
-add_action( 'bp_blogs_new_blog_comment', 'bp_blogs_format_clear_comment_cache', 10, 2 );
</del><span class="cx"> 
</span><span class="cx"> // List actions to clear super cached pages on, if super cache is installed
</span><span class="cx"> add_action( 'bp_blogs_remove_data_for_blog', 'bp_core_clear_cache' );
</span></span></pre>
</div>
</div>

</body>
</html>