# 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.
Index: bp-activity-classes.php
--- bp-activity-classes.php Base (BASE)
+++ bp-activity-classes.php Locally Modified (Based On LOCAL)
@@ -113,7 +113,7 @@
 		else
 			$activities = $wpdb->get_results( $wpdb->prepare( "{$select_sql} {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}" ) );
 
-		$total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(a.id) {$from_sql} {$where_sql} ORDER BY a.date_recorded {$sort}" ) );
\ No newline at end of file
+		$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}" ) );
\ No newline at end of file
 
 		/* Get the fullnames of users so we don't have to query in the loop */
 		if ( function_exists( 'xprofile_install' ) && $activities ) {
