Skip to:
Content

BuddyPress.org

Changeset 11164


Ignore:
Timestamp:
09/28/2016 03:55:51 AM (4 years ago)
Author:
r-a-y
Message:

Groups: Add forum_id to magic properties whitelist for the BP_Groups_Group class.

Fixes an issue where the legacy forums failed to render any topics when
on a group's "Forum" page.

See related changesets r11071, r11103.

Fixes #5451.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-group.php

    r11103 r11164  
    400400        switch ( $key ) {
    401401            case 'last_activity' :
    402                 return groups_get_groupmeta( $this->id, 'last_activity' );
    403 
    404402            case 'total_member_count' :
    405                 return (int) groups_get_groupmeta( $this->id, 'total_member_count' );
     403            case 'forum_id' :
     404                $retval = groups_get_groupmeta( $this->id, $key );
     405
     406                if ( 'last_activity' !== $key ) {
     407                    $retval = (int) $retval;
     408                }
     409
     410                return $retval;
    406411
    407412            case 'admins' :
     
    449454            case 'total_member_count' :
    450455            case 'user_has_access' :
     456            case 'forum_id' :
    451457                return true;
    452458
Note: See TracChangeset for help on using the changeset viewer.