Changeset 4277
- Timestamp:
- 04/24/2011 12:33:51 PM (14 years ago)
- Location:
- trunk/bp-activity
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-filters.php
r4259 r4277 117 117 118 118 foreach( (array)$usernames as $username ) { 119 if ( !$user_id = username_exists( $username ) ) 119 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) ) 120 $user_id = username_exists( $username ); 121 else 122 $user_id = bp_core_get_userid_from_nicename( $username ); 123 124 if ( empty( $user_id ) ) 120 125 continue; 121 126 … … 124 129 update_user_meta( $user_id, 'bp_new_mention_count', $new_mention_count + 1 ); 125 130 126 $content = preg_replace( '/(@' . $username . '\b)/', "<a href='" . bp_core_get_user_domain( bp_core_get_userid( $username )) . "' rel='nofollow'>@$username</a>", $content );131 $content = preg_replace( '/(@' . $username . '\b)/', "<a href='" . bp_core_get_user_domain( $user_id ) . "' rel='nofollow'>@$username</a>", $content ); 127 132 } 128 133 -
trunk/bp-activity/bp-activity-functions.php
r4259 r4277 43 43 if ( $usernames = bp_activity_find_mentions( strip_tags( $activity->content ) ) ) { 44 44 foreach( (array)$usernames as $username ) { 45 if ( !$user_id = username_exists( $username ) ) 45 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) ) 46 $user_id = username_exists( $username ); 47 else 48 $user_id = bp_core_get_userid_from_nicename( $username ); 49 50 if ( empty( $user_id ) ) 46 51 continue; 47 52 -
trunk/bp-activity/bp-activity-notifications.php
r4144 r4277 21 21 22 22 foreach( (array)$usernames as $username ) { 23 if ( !$receiver_user_id = bp_core_get_userid( $username ) ) 23 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) ) 24 $receiver_user_id = bp_core_get_userid( $username ); 25 else 26 $receiver_user_id = bp_core_get_userid_from_nicename( $username ); 27 28 if ( empty( $receiver_user_id ) ) 24 29 continue; 25 30
Note: See TracChangeset
for help on using the changeset viewer.