<!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" />
<title>[BuddyPress][4647] trunk: Audit the usage of $bp->friends->slug.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>4647</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-07-12 02:11:01 +0000 (Tue, 12 Jul 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Audit the usage of $bp->friends->slug. See #3325.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityactionsphp">trunk/bp-activity/bp-activity-actions.php</a></li>
<li><a href="#trunkbpactivitybpactivityloaderphp">trunk/bp-activity/bp-activity-loader.php</a></li>
<li><a href="#trunkbpfriendsbpfriendsactionsphp">trunk/bp-friends/bp-friends-actions.php</a></li>
<li><a href="#trunkbpfriendsbpfriendsactivityphp">trunk/bp-friends/bp-friends-activity.php</a></li>
<li><a href="#trunkbpfriendsbpfriendsloaderphp">trunk/bp-friends/bp-friends-loader.php</a></li>
<li><a href="#trunkbpfriendsbpfriendstemplatephp">trunk/bp-friends/bp-friends-template.php</a></li>
<li><a href="#trunkbpmembersbpmembersbuddybarphp">trunk/bp-members/bp-members-buddybar.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incajaxphp">trunk/bp-themes/bp-default/_inc/ajax.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-actions.php (4646 => 4647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-actions.php        2011-07-12 01:52:18 UTC (rev 4646)
+++ trunk/bp-activity/bp-activity-actions.php        2011-07-12 02:11:01 UTC (rev 4647)
</span><span class="lines">@@ -267,7 +267,7 @@
</span><span class="cx"> function bp_activity_action_friends_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx">
</span><del>-        if ( !bp_is_active( 'friends' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( $bp->friends->slug ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
</del><ins>+        if ( !bp_is_active( 'friends' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( bp_get_friends_slug() ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $wp_query->is_404 = false;
</span></span></pre></div>
<a id="trunkbpactivitybpactivityloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-loader.php (4646 => 4647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-loader.php        2011-07-12 01:52:18 UTC (rev 4646)
+++ trunk/bp-activity/bp-activity-loader.php        2011-07-12 02:11:01 UTC (rev 4647)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">                 if ( bp_is_active( 'friends' ) ) {
</span><span class="cx">                         $sub_nav[] = array(
</span><span class="cx">                                 'name' => __( 'Friends', 'buddypress' ),
</span><del>-                                'slug' => $bp->friends->slug,
</del><ins>+                                'slug' => bp_get_friends_slug(),
</ins><span class="cx">                                 'parent_url' => $activity_link,
</span><span class="cx">                                 'parent_slug' => $this->slug,
</span><span class="cx">                                 'screen_function' => 'bp_activity_screen_friends',
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendsactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-actions.php (4646 => 4647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-actions.php        2011-07-12 01:52:18 UTC (rev 4646)
+++ trunk/bp-friends/bp-friends-actions.php        2011-07-12 02:11:01 UTC (rev 4647)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> function friends_action_add_friend() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( $bp->current_component != $bp->friends->slug || $bp->current_action != 'add-friend' )
</del><ins>+        if ( !bp_is_friends_component() || !bp_is_current_action( 'add-friend' ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $potential_friend_id = $bp->action_variables[0];
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> function friends_action_remove_friend() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( $bp->current_component != $bp->friends->slug || $bp->current_action != 'remove-friend' )
</del><ins>+        if ( !bp_is_friends_component() || !bp_is_current_action( 'remove-friend' ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $potential_friend_id = $bp->action_variables[0];
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendsactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-activity.php (4646 => 4647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-activity.php        2011-07-12 01:52:18 UTC (rev 4646)
+++ trunk/bp-friends/bp-friends-activity.php        2011-07-12 02:11:01 UTC (rev 4647)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx">                         break;
</span><span class="cx">
</span><span class="cx">                 case 'friendship_request':
</span><del>-                        $link = bp_loggedin_user_domain() . $bp->friends->slug . '/requests?new';
</del><ins>+                        $link = bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests?new';
</ins><span class="cx">                         
</span><span class="cx">                         // Set up the string and the filter
</span><span class="cx">                         if ( (int)$total_items > 1 ) {
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-loader.php (4646 => 4647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-loader.php        2011-07-12 01:52:18 UTC (rev 4646)
+++ trunk/bp-friends/bp-friends-loader.php        2011-07-12 02:11:01 UTC (rev 4647)
</span><span class="lines">@@ -102,16 +102,16 @@
</span><span class="cx">                         'item_css_id' => $bp->friends->id
</span><span class="cx">                 );
</span><span class="cx">
</span><del>-                $friends_link = trailingslashit( $bp->loggedin_user->domain . $bp->friends->slug );
</del><ins>+                $friends_link = trailingslashit( $bp->loggedin_user->domain . bp_get_friends_slug() );
</ins><span class="cx">
</span><span class="cx">                 // Add the subnav items to the friends nav item
</span><span class="cx">                 $sub_nav[] = array(
</span><del>-                        'name' => __( 'Friendships', 'buddypress' ),
-                        'slug' => 'my-friends',
-                        'parent_url' => $friends_link,
-                        'parent_slug' => $bp->friends->slug,
</del><ins>+                        'name' => __( 'Friendships', 'buddypress' ),
+                        'slug' => 'my-friends',
+                        'parent_url' => $friends_link,
+                        'parent_slug' => bp_get_friends_slug(),
</ins><span class="cx">                         'screen_function' => 'friends_screen_my_friends',
</span><del>-                        'position' => 10,
</del><ins>+                        'position' => 10,
</ins><span class="cx">                         'item_css_id' => 'friends-my-friends'
</span><span class="cx">                 );
</span><span class="cx">
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx">                         'name' => __( 'Requests', 'buddypress' ),
</span><span class="cx">                         'slug' => 'requests',
</span><span class="cx">                         'parent_url' => $friends_link,
</span><del>-                        'parent_slug' => $bp->friends->slug,
</del><ins>+                        'parent_slug' => bp_get_friends_slug(),
</ins><span class="cx">                         'screen_function' => 'friends_screen_requests',
</span><span class="cx">                         'position' => 20,
</span><span class="cx">                         'user_has_access' => bp_is_my_profile()
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-template.php (4646 => 4647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-template.php        2011-07-12 01:52:18 UTC (rev 4646)
+++ trunk/bp-friends/bp-friends-template.php        2011-07-12 02:11:01 UTC (rev 4647)
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx"> function bp_friends_header_tabs() {
</span><span class="cx">         global $bp; ?>
</span><span class="cx">
</span><del>-        <li<?php if ( !isset($bp->action_variables[0]) || 'recently-active' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
-        <li<?php if ( 'newest' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
-        <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>/my-friends/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
</del><ins>+        <li<?php if ( !isset($bp->action_variables[0]) || 'recently-active' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
+        <li<?php if ( 'newest' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
+        <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
</ins><span class="cx">
</span><span class="cx"> <?php
</span><span class="cx">         do_action( 'friends_header_tabs' );
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">         } ?>
</span><span class="cx">
</span><span class="cx">         <div class="info-group">
</span><del>-                <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?> (<?php echo BP_Friends_Friendship::total_friend_count( $bp->displayed_user->id ) ?>) <span><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>"><?php _e('See All', 'buddypress') ?> &rarr;</a></span></h4>
</del><ins>+                <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?> (<?php echo BP_Friends_Friendship::total_friend_count( $bp->displayed_user->id ) ?>) <span><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>"><?php _e('See All', 'buddypress') ?> &rarr;</a></span></h4>
</ins><span class="cx">
</span><span class="cx">                 <?php if ( $friend_ids ) { ?>
</span><span class="cx">
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx"> function bp_friend_search_form() {
</span><span class="cx">         global $friends_template, $bp;
</span><span class="cx">
</span><del>-        $action = $bp->displayed_user->domain . $bp->friends->slug . '/my-friends/search/';
</del><ins>+        $action = $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/search/';
</ins><span class="cx">         $label = __( 'Filter Friends', 'buddypress' ); ?>
</span><span class="cx">
</span><span class="cx">                 <form action="<?php echo $action ?>" id="friend-search-form" method="post">
</span><span class="lines">@@ -307,7 +307,7 @@
</span><span class="cx">                                         'block_self' => true,
</span><span class="cx">                                         'wrapper_class' => 'friendship-button pending',
</span><span class="cx">                                         'wrapper_id' => 'friendship-button-' . $potential_friend_id,
</span><del>-                                        'link_href' => trailingslashit( $bp->loggedin_user->domain . $bp->friends->slug . '/requests' ),
</del><ins>+                                        'link_href' => trailingslashit( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests' ),
</ins><span class="cx">                                         'link_text' => __( 'Friendship Requested', 'buddypress' ),
</span><span class="cx">                                         'link_title' => __( 'Friendship Requested', 'buddypress' ),
</span><span class="cx">                                         'link_class' => 'friendship-button pending requested'
</span><span class="lines">@@ -322,7 +322,7 @@
</span><span class="cx">                                         'block_self' => false,
</span><span class="cx">                                         'wrapper_class' => 'friendship-button is_friend',
</span><span class="cx">                                         'wrapper_id' => 'friendship-button-' . $potential_friend_id,
</span><del>-                                        'link_href' => wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
</del><ins>+                                        'link_href' => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
</ins><span class="cx">                                         'link_text' => __( 'Cancel Friendship', 'buddypress' ),
</span><span class="cx">                                         'link_title' => __( 'Cancel Friendship', 'buddypress' ),
</span><span class="cx">                                         'link_id' => 'friend-' . $potential_friend_id,
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx">                                         'block_self' => true,
</span><span class="cx">                                         'wrapper_class' => 'friendship-button not_friends',
</span><span class="cx">                                         'wrapper_id' => 'friendship-button-' . $potential_friend_id,
</span><del>-                                        'link_href' => wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),
</del><ins>+                                        'link_href' => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),
</ins><span class="cx">                                         'link_text' => __( 'Add Friend', 'buddypress' ),
</span><span class="cx">                                         'link_title' => __( 'Add Friend', 'buddypress' ),
</span><span class="cx">                                         'link_id' => 'friend-' . $potential_friend_id,
</span><span class="lines">@@ -397,7 +397,7 @@
</span><span class="cx">                         wp_cache_set( 'friendship_id_' . $members_template->member->id . '_' . $bp->loggedin_user->id, $friendship_id, 'bp' );
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) );
</del><ins>+                return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_friend_reject_request_link() {
</span><span class="lines">@@ -411,7 +411,7 @@
</span><span class="cx">                         wp_cache_set( 'friendship_id_' . $members_template->member->id . '_' . $bp->loggedin_user->id, $friendship_id, 'bp' );
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) );
</del><ins>+                return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_total_friend_count( $user_id = 0 ) {
</span></span></pre></div>
<a id="trunkbpmembersbpmembersbuddybarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-buddybar.php (4646 => 4647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-buddybar.php        2011-07-12 01:52:18 UTC (rev 4646)
+++ trunk/bp-members/bp-members-buddybar.php        2011-07-12 02:11:01 UTC (rev 4647)
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">                         <?php if ( bp_is_active( 'friends' ) ) : ?>
</span><span class="cx">
</span><span class="cx">                                 <li>
</span><del>-                                        <a href="<?php echo trailingslashit( $bp->displayed_user->domain . $bp->friends->slug ); ?>"><?php _e( 'Friends', 'buddypress' ); ?></a>
</del><ins>+                                        <a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() ); ?>"><?php _e( 'Friends', 'buddypress' ); ?></a>
</ins><span class="cx">                                         <ul>
</span><span class="cx">                                                 <li><a href="<?php bp_members_component_link( 'friends', 'admin', array( 'clear' => 'friendships' ), true ); ?>" class="confirm"><?php printf( __( "Remove %s's Friendships", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
</span><span class="cx">                                                 <li><a href="<?php bp_members_component_link( 'friends', 'admin', array( 'clear' => 'requests' ), true ); ?>" class="confirm"><?php printf( __( "Clear %s's Friend Requests", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/ajax.php (4646 => 4647)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/ajax.php        2011-07-12 01:52:18 UTC (rev 4646)
+++ trunk/bp-themes/bp-default/_inc/ajax.php        2011-07-12 02:11:01 UTC (rev 4647)
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx">                 if ( !friends_remove_friend( $bp->loggedin_user->id, $_POST['fid'] ) ) {
</span><span class="cx">                         echo __("Friendship could not be canceled.", 'buddypress');
</span><span class="cx">                 } else {
</span><del>-                        echo '<a id="friend-' . $_POST['fid'] . '" class="add" rel="add" title="' . __( 'Add Friend', 'buddypress' ) . '" href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $_POST['fid'], 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
</del><ins>+                        echo '<a id="friend-' . $_POST['fid'] . '" class="add" rel="add" title="' . __( 'Add Friend', 'buddypress' ) . '" href="' . wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/add-friend/' . $_POST['fid'], 'friends_add_friend' ) . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">         } else if ( 'not_friends' == BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $_POST['fid'] ) ) {
</span><span class="lines">@@ -422,7 +422,7 @@
</span><span class="cx">                 if ( !friends_add_friend( $bp->loggedin_user->id, $_POST['fid'] ) ) {
</span><span class="cx">                         echo __("Friendship could not be requested.", 'buddypress');
</span><span class="cx">                 } else {
</span><del>-                        echo '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/requests" class="requested">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
</del><ins>+                        echo '<a href="' . $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests" class="requested">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
</ins><span class="cx">                 }
</span><span class="cx">         } else {
</span><span class="cx">                 echo __( 'Request Pending', 'buddypress' );
</span></span></pre>
</div>
</div>
</body>
</html>