Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/01/2011 02:42:48 PM (13 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-functions.php

    r5047 r5091  
    384384    }
    385385
     386    // Loop through to make sure that each topic has the proper values set. This covers the
     387    // case of deleted users
     388    foreach ( (array)$topics as $key => $topic ) {
     389        if ( !isset( $topic->topic_last_poster_email ) )
     390            $topics[$key]->topic_last_poster_email = '';
     391
     392        if ( !isset( $topic->topic_last_poster_nicename ) )
     393            $topics[$key]->topic_last_poster_nicename = '';
     394
     395        if ( !isset( $topic->topic_last_poster_login ) )
     396            $topics[$key]->topic_last_poster_login = '';
     397
     398        if ( !isset( $topic->topic_last_poster_displayname ) )
     399            $topics[$key]->topic_last_poster_displayname = '';
     400    }
     401
    386402    return $topics;
    387403}
Note: See TracChangeset for help on using the changeset viewer.