Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/10/2012 02:43:06 PM (12 years ago)
Author:
johnjamesjacoby
Message:

Fix issue with activity and group admin bottom bulk actions not working. Fixes #4547.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-admin.php

    r6479 r6609  
    168168    // Decide whether to load the dev version of the CSS and JavaScript
    169169    $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : 'min.';
     170
     171    // Bottom bulk action hack
     172    if ( !empty( $_REQUEST['action2'] ) ) {
     173        $_REQUEST['action'] = $_REQUEST['action2'];
     174        unset( $_REQUEST['action2'] );
     175    }
    170176
    171177    // Decide whether to load the index or edit screen
     
    533539 */
    534540function bp_activity_admin_edit() {
    535     global $screen_layout_columns;
    536541
    537542    // @todo: Check if user is allowed to edit activity items
     
    564569
    565570    // Call an action for plugins to modify the activity before we display the edit form
    566     do_action_ref_array( 'bp_activity_admin_edit', array( &$activity ) );
    567 ?>
     571    do_action_ref_array( 'bp_activity_admin_edit', array( &$activity ) ); ?>
    568572
    569573    <div class="wrap">
     
    731735
    732736    // Sort array by the human-readable value
    733     natsort( $actions );
    734 ?>
     737    natsort( $actions ); ?>
    735738
    736739    <select name="bp-activities-type">
     
    788791        // Make sure we don't get any empty values in $errors
    789792        for ( $i = 0, $errors_count = count( $errors ); $i < $errors_count; $i++ ) {
    790             if ( 0 === $errors[$i] )
     793            if ( 0 === $errors[$i] ) {
    791794                unset( $errors[$i] );
     795            }
    792796        }
    793797
     
    831835
    832836    // Call an action for plugins to modify the activity before we display the edit form
    833     do_action( 'bp_activity_admin_index', $messages );
    834 ?>
     837    do_action( 'bp_activity_admin_index', $messages ); ?>
    835838
    836839    <div class="wrap">
     
    897900 */
    898901class BP_Activity_List_Table extends WP_List_Table {
     902
    899903    /**
    900904     * What type of view is being displayed? e.g. "All", "Pending", "Approved", "Spam"...
     
    10671071        extract( $this->_args );
    10681072
    1069         $this->display_tablenav( 'top' );
    1070     ?>
     1073        $this->display_tablenav( 'top' ); ?>
    10711074
    10721075        <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0">
     
    11001103    function single_row( $item ) {
    11011104        static $row_class = '';
    1102         $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
     1105
     1106        if ( empty( $row_class ) ) {
     1107            $row_class = ' class="alternate"';
     1108        } else {
     1109            $row_class = '';
     1110        }
    11031111
    11041112        echo '<tr' . $row_class . ' id="activity-' . esc_attr( $item['id'] ) . '" data-parent_id="' . esc_attr( $item['id'] ) . '" data-root_id="' . esc_attr( $item['item_id'] ) . '">';
     
    12891297
    12901298        // Get activity content - if not set, use the action
    1291         if ( ! empty( $item['content'] ) )
     1299        if ( ! empty( $item['content'] ) ) {
    12921300            $content = apply_filters_ref_array( 'bp_get_activity_content_body', array( $item['content'] ) );
    1293         else
     1301        } else {
    12941302            $content = apply_filters_ref_array( 'bp_get_activity_action', array( $item['action'] ) );
     1303        }
    12951304
    12961305        echo $content . ' ' . $this->row_actions( $actions );
Note: See TracChangeset for help on using the changeset viewer.