Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/06/2009 03:07:48 AM (17 years ago)
Author:
apeatling
Message:

Converted $bp as an array to $bp as an object. See this post for more info: http://buddypress.org/forums/topic.php?id=1125

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-ajax.php

    r608 r1021  
    1313        global $bp;
    1414
    15         if ( BP_Friends_Friendship::check_is_friend( $bp['loggedin_userid'], $_POST['fid'] ) == 'is_friend' ) {
    16                 if ( !friends_remove_friend( $bp['loggedin_userid'], $_POST['fid'] ) ) {
     15        if ( BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $_POST['fid'] ) == 'is_friend' ) {
     16                if ( !friends_remove_friend( $bp->loggedin_user->id, $_POST['fid'] ) ) {
    1717                        echo __("Friendship could not be canceled.", 'buddypress');
    1818                } else {
    19                         echo '<a id="friend-' . $_POST['fid'] . '" class="add" rel="add" title="' . __( 'Add Friend', 'buddypress' ) . '" href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/add-friend/' . $_POST['fid'] . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
     19                        echo '<a id="friend-' . $_POST['fid'] . '" class="add" rel="add" title="' . __( 'Add Friend', 'buddypress' ) . '" href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $_POST['fid'] . '">' . __( 'Add Friend', 'buddypress' ) . '</a>';
    2020                }
    21         } else if ( BP_Friends_Friendship::check_is_friend( $bp['loggedin_userid'], $_POST['fid'] ) == 'not_friends' ) {
    22                 if ( !friends_add_friend( $bp['loggedin_userid'], $_POST['fid'] ) ) {
     21        } else if ( BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $_POST['fid'] ) == 'not_friends' ) {
     22                if ( !friends_add_friend( $bp->loggedin_user->id, $_POST['fid'] ) ) {
    2323                        echo __("Friendship could not be requested.", 'buddypress');
    2424                } else {
    25                         echo '<a href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '" class="requested">' . __( 'Friendship Requested', 'buddypres' ) . '</a>';
    26                         //echo '<a id="friend-' . $_POST['fid'] . '" class="remove" rel="remove" title="' . __( 'Remove Friend', 'buddypress' ) . '" href="' . $bp['loggedin_domain'] . $bp['friends']['slug'] . '/remove-friend/' . $_POST['fid'] . '">' . __( 'Remove Friend', 'buddypress' ) . '</a>';
     25                        echo '<a href="' . $bp->loggedin_user->domain . $bp->friends->slug . '" class="requested">' . __( 'Friendship Requested', 'buddypres' ) . '</a>';
     26                        //echo '<a id="friend-' . $_POST['fid'] . '" class="remove" rel="remove" title="' . __( 'Remove Friend', 'buddypress' ) . '" href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $_POST['fid'] . '">' . __( 'Remove Friend', 'buddypress' ) . '</a>';
    2727                }
    2828        } else {
Note: See TracChangeset for help on using the changeset viewer.