<!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] [2222] trunk: Fixed friendship request listing,
added bp_init and bp_core_loaded hooks.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2222</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-12-29 16:50:48 +0000 (Tue, 29 Dec 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixed friendship request listing, added bp_init and bp_core_loaded hooks.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoreactivationphp">trunk/bp-core/bp-core-activation.php</a></li>
<li><a href="#trunkbpcorebpcoreclassesphp">trunk/bp-core/bp-core-classes.php</a></li>
<li><a href="#trunkbploaderphp">trunk/bp-loader.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssinglefriendsrequestsphp">trunk/bp-themes/bp-default/members/single/friends/requests.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcoreactivationphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-activation.php (2221 => 2222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-activation.php        2009-12-28 14:11:08 UTC (rev 2221)
+++ trunk/bp-core/bp-core-activation.php        2009-12-29 16:50:48 UTC (rev 2222)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">         $message = sprintf(__("Thanks for registering! To complete the activation of your account and blog, please click the following link:\n\n%s\n\n\n\nAfter you activate, you can visit your blog here:\n\n%s", 'buddypress' ), $activate_url, clean_url("http://{$domain}{$path}" ) );
</span><span class="cx">         $subject = '[' . $from_name . '] ' . sprintf(__('Activate %s', 'buddypress' ), clean_url('http://' . $domain . $path));
</span><span class="cx">
</span><del>-        wp_mail($user_email, $subject, $message, $message_headers);
</del><ins>+        wp_mail( $user_email, $subject, $message, $message_headers );
</ins><span class="cx">
</span><span class="cx">         // Return false to stop the original WPMU function from continuing
</span><span class="cx">         return false;
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx">         $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%s\n\n", 'buddypress' ), $activate_url, clean_url("http://{$domain}{$path}" ) );
</span><span class="cx">         $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' );
</span><span class="cx">
</span><del>-        wp_mail($user_email, $subject, $message, $message_headers);
</del><ins>+        wp_mail( $user_email, $subject, $message, $message_headers );
</ins><span class="cx">
</span><span class="cx">         // Return false to stop the original WPMU function from continuing
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkbpcorebpcoreclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-classes.php (2221 => 2222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-classes.php        2009-12-28 14:11:08 UTC (rev 2221)
+++ trunk/bp-core/bp-core-classes.php        2009-12-29 16:50:48 UTC (rev 2222)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">                 if ( $this->profile_data ) {
</span><span class="cx">                         $this->user_url = bp_core_get_user_domain( $this->id, $this->profile_data['user_nicename'], $this->profile_data['user_login'] );
</span><span class="cx">                         $this->fullname = attribute_escape( $this->profile_data[BP_XPROFILE_FULLNAME_FIELD_NAME]['field_data'] );
</span><del>-                        $this->user_link = "<a href='{$this->user_url}'>{$this->fullname}</a>";
</del><ins>+                        $this->user_link = "<a href='{$this->user_url}' title='{$this->fullname}'>{$this->fullname}</a>";
</ins><span class="cx">                         $this->email = attribute_escape( $this->profile_data['user_email'] );
</span><span class="cx">                 } else {
</span><span class="cx">                         $this->user_url = bp_core_get_userurl( $this->id );
</span><span class="lines">@@ -252,7 +252,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">                 $user_sql = " AND user_id IN ( " . $wpdb->escape( $user_ids ) . " ) ";
</span><del>-                $status_sql = bp_core_get_status_sql( 'u.' );
</del><ins>+                $status_sql = bp_core_get_status_sql();
</ins><span class="cx">
</span><span class="cx">                 $total_users_sql = apply_filters( 'bp_core_get_specific_users_count_sql', $wpdb->prepare( "SELECT COUNT(DISTINCT ID) FROM " . CUSTOM_USER_TABLE . " WHERE {$status_sql} AND ID IN ( " . $wpdb->escape( $user_ids ) . " ) " ), $wpdb->escape( $user_ids ) );
</span><span class="cx">                 $paged_users_sql = apply_filters( 'bp_core_get_specific_users_count_sql', $wpdb->prepare( "SELECT DISTINCT ID as id, user_registered, user_nicename, user_login, user_email FROM " . CUSTOM_USER_TABLE . " WHERE {$status_sql} AND ID IN ( " . $wpdb->escape( $user_ids ) . " ) {$pag_sql}" ), $wpdb->escape( $user_ids ) );
</span><span class="lines">@@ -268,6 +268,7 @@
</span><span class="cx">                 /* Add additional data to the returned results */
</span><span class="cx">                 $paged_users = BP_Core_User::get_user_extras( &$paged_users, &$user_ids );
</span><span class="cx">
</span><ins>+
</ins><span class="cx">                 return array( 'users' => $paged_users, 'total' => $total_users );
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbploaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-loader.php (2221 => 2222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-loader.php        2009-12-28 14:11:08 UTC (rev 2221)
+++ trunk/bp-loader.php        2009-12-29 16:50:48 UTC (rev 2222)
</span><span class="lines">@@ -19,6 +19,8 @@
</span><span class="cx"> require_once( WP_PLUGIN_DIR . '/buddypress/bp-core.php' );
</span><span class="cx"> $deactivated = apply_filters( 'bp_deactivated_components', get_site_option( 'bp-deactivated-components' ) );
</span><span class="cx">
</span><ins>+do_action( 'bp_core_loaded' );
+
</ins><span class="cx"> /* Activity Streams */
</span><span class="cx"> if ( !isset( $deactivated['bp-activity.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-activity.php') )
</span><span class="cx">         include( BP_PLUGIN_DIR . '/bp-activity.php' );
</span><span class="lines">@@ -47,10 +49,14 @@
</span><span class="cx"> if ( !isset( $deactivated['bp-xprofile.php'] ) && file_exists( BP_PLUGIN_DIR . '/bp-xprofile.php') )
</span><span class="cx">         include( BP_PLUGIN_DIR . '/bp-xprofile.php' );
</span><span class="cx">
</span><ins>+do_action( 'bp_init' );
+
</ins><span class="cx"> /* Activation Function */
</span><span class="cx"> function bp_loader_activate() {
</span><span class="cx">         /* Force refresh theme roots. */
</span><span class="cx">         delete_site_transient( 'theme_roots' );
</span><ins>+
+        do_action( 'bp_loader_activate' );
</ins><span class="cx"> }
</span><span class="cx"> register_activation_hook( __FILE__, 'bp_loader_activate' );
</span><span class="cx">
</span><span class="lines">@@ -66,6 +72,8 @@
</span><span class="cx">         delete_site_option( 'bp-groups-db-version' );
</span><span class="cx">         delete_site_option( 'bp-messages-db-version' );
</span><span class="cx">         delete_site_option( 'bp-xprofile-db-version' );
</span><ins>+
+        do_action( 'bp_loader_deactivate' );
</ins><span class="cx"> }
</span><span class="cx"> register_deactivation_hook( __FILE__, 'bp_loader_deactivate' );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssinglefriendsrequestsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/friends/requests.php (2221 => 2222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/friends/requests.php        2009-12-28 14:11:08 UTC (rev 2221)
+++ trunk/bp-themes/bp-default/members/single/friends/requests.php        2009-12-29 16:50:48 UTC (rev 2222)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> <?php do_action( 'bp_before_friend_requests_content' ) ?>
</span><span class="cx">
</span><del>-<?php if ( bp_has_members( 'include=' . bp_get_friendship_requests() . '&page=1&per_page=0' ) ) : ?>
</del><ins>+<?php if ( bp_has_members( 'include=' . bp_get_friendship_requests() . '&per_page=0' ) ) : ?>
</ins><span class="cx">
</span><span class="cx">         <ul id="friend-list" class="item-list">
</span><span class="cx">                 <?php while ( bp_members() ) : bp_the_member(); ?>
</span></span></pre>
</div>
</div>
</body>
</html>