Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/01/2011 02:42:48 PM (14 years ago)
Author:
boonebgorges
Message:

Make sure that null values are provided for topic details when the last poster on a topic has since been deleted. Ensure that 'Deleted User' text is output when necessary on forum directories. Fixes #3541.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-template.php

    r5089 r5091  
    555555        global $forum_template;
    556556
    557         if ( !$domain = bp_core_get_user_domain( $forum_template->topic->topic_last_poster, $forum_template->topic->topic_last_poster_nicename, $forum_template->topic->topic_last_poster_login ) )
     557        $domain = bp_core_get_user_domain( $forum_template->topic->topic_last_poster, $forum_template->topic->topic_last_poster_nicename, $forum_template->topic->topic_last_poster_login ) ;
     558
     559        // In the case where no user is found, bp_core_get_user_domain() may return the URL
     560        // of the Members directory
     561        if ( !$domain || $domain == bp_core_get_root_domain() . '/' . bp_get_members_root_slug() . '/' )
    558562            return __( 'Deleted User', 'buddypress' );
    559563
Note: See TracChangeset for help on using the changeset viewer.