Skip to:
Content

BuddyPress.org

Ticket #1768: activity_query_fix.patch

File activity_query_fix.patch, 1.2 KB (added by MrMaz, 15 years ago)
  • bp-activity-classes.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: \\UBU\www\sandbox2\public_html\wp-content\plugins\buddypress\bp-activity
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    113113                else
    114114                        $activities = $wpdb->get_results( $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}" ) );
    115115
    116                 $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(a.id) {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort}" ) );
    117  No newline at end of file
     116                $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(a.id) FROM {$bp->activity->table_name} a {$where_sql} ORDER BY a.date_recorded {$sort}" ) );
     117 No newline at end of file
    118118
    119119                /* Get the fullnames of users so we don't have to query in the loop */