Skip to:
Content

BuddyPress.org

Ticket #6465: 6465.02.patch

File 6465.02.patch, 3.6 KB (added by imath, 11 years ago)
  • src/bp-activity/bp-activity-admin.php

    diff --git src/bp-activity/bp-activity-admin.php src/bp-activity/bp-activity-admin.php
    index 2599573..8736be8 100644
    class BP_Activity_List_Table extends WP_List_Table {  
    11971197                        $this->get_columns(),
    11981198                        array(),
    11991199                        $this->get_sortable_columns(),
     1200                        $this->get_primary_column_name(),
    12001201                );
    12011202
    12021203                return $this->_column_headers;
    … … class BP_Activity_List_Table extends WP_List_Table {  
    12191220        function display() {
    12201221                $this->display_tablenav( 'top' ); ?>
    12211222
    1222                 <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0">
     1223                <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0">
    12231224                        <thead>
    12241225                                <tr>
    12251226                                        <?php $this->print_column_headers(); ?>
    … … class BP_Activity_List_Table extends WP_List_Table {  
    17301731
    17311732                return $tree;
    17321733        }
     1734
     1735        /**
     1736         * Get name of default primary column
     1737         *
     1738         * @since BuddyPress (2.4.0)
     1739         * @access protected
     1740         *
     1741         * @return string
     1742         */
     1743        protected function get_default_primary_column_name() {
     1744                return 'author';
     1745        }
    17331746}
  • src/bp-groups/bp-groups-admin.php

    diff --git src/bp-groups/bp-groups-admin.php src/bp-groups/bp-groups-admin.php
    index 19b88d8..ba3c916 100644
    class BP_Groups_List_Table extends WP_List_Table {  
    12931293                        $this->get_columns(),
    12941294                        array(),
    12951295                        $this->get_sortable_columns(),
     1296                        $this->get_primary_column_name(),
    12961297                );
    12971298
    12981299                return $this->_column_headers;
    … … class BP_Groups_List_Table extends WP_List_Table {  
    13151316        public function display() {
    13161317                $this->display_tablenav( 'top' ); ?>
    13171318
    1318                 <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0">
     1319                <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0">
    13191320                        <thead>
    13201321                                <tr>
    13211322                                        <?php $this->print_column_headers(); ?>
    … … class BP_Groups_List_Table extends WP_List_Table {  
    17041705                 */
    17051706                return apply_filters( 'bp_groups_admin_get_group_custom_column', '', $column_name, $item );
    17061707        }
     1708
     1709        /**
     1710         * Get name of default primary column
     1711         *
     1712         * @since BuddyPress (2.4.0)
     1713         * @access protected
     1714         *
     1715         * @return string
     1716         */
     1717        protected function get_default_primary_column_name() {
     1718                /* comment column is mapped to Group's name */
     1719                return 'comment';
     1720        }
    17071721}
  • src/bp-members/admin/bp-members-admin-classes.php

    diff --git src/bp-members/admin/bp-members-admin-classes.php src/bp-members/admin/bp-members-admin-classes.php
    index e32baff..a5242ab 100644
    class BP_Members_List_Table extends WP_Users_List_Table {  
    206206        public function display_rows() {
    207207                $style = '';
    208208                foreach ( $this->items as $userid => $signup_object ) {
     209                        // Avoid a notice error appearing since 4.3
     210                        if ( isset( $signup_object->id ) ) {
     211                                $signup_object->ID = $signup_object->id;
     212                        }
     213
    209214                        $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
    210215                        echo "\n\t" . $this->single_row( $signup_object, $style );
    211216                }
    … … class BP_Members_MS_List_Table extends WP_MS_Users_List_Table {  
    569574        public function display_rows() {
    570575                $style = '';
    571576                foreach ( $this->items as $userid => $signup_object ) {
     577                        // Avoid a notice error appearing since 4.3
     578                        if ( isset( $signup_object->id ) ) {
     579                                $signup_object->ID = $signup_object->id;
     580                        }
     581
    572582                        $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
    573583                        echo "\n\t" . $this->single_row( $signup_object, $style );
    574584                }