BuddyPress - Version 1.7.2

Version Description

See: http://codex.buddypress.org/releases/version-1-7-2/

Download this release

Release Info

Developer johnjamesjacoby
Plugin Icon 128x128 BuddyPress
Version 1.7.2
Comparing to
See all releases

Code changes from version 1.7.1 to 1.7.2

bp-activity/bp-activity-classes.php CHANGED
@@ -170,7 +170,7 @@ class BP_Activity_Activity {
170
  // Searching
171
  if ( $search_terms ) {
172
  $search_terms = $wpdb->escape( $search_terms );
173
- $where_conditions['search_sql'] = "a.content LIKE '%%" . like_escape( $search_terms ) . "%%'";
174
  }
175
 
176
  // Filtering
@@ -238,15 +238,11 @@ class BP_Activity_Activity {
238
  $total_activities = $wpdb->get_var( $total_activities_sql );
239
 
240
  // Get the fullnames of users so we don't have to query in the loop
241
- $activity_user_ids = array();
242
- if ( bp_is_active( 'xprofile' ) && $activities ) {
243
- foreach ( (array) $activities as $activity ) {
244
- if ( (int) $activity->user_id )
245
- $activity_user_ids[] = $activity->user_id;
246
- }
247
 
248
- $activity_user_ids = implode( ',', array_unique( (array) $activity_user_ids ) );
249
- if ( !empty( $activity_user_ids ) ) {
250
  if ( $names = $wpdb->get_results( "SELECT user_id, value AS user_fullname FROM {$bp->profile->table_name_data} WHERE field_id = 1 AND user_id IN ({$activity_user_ids})" ) ) {
251
  foreach ( (array) $names as $name )
252
  $tmp_names[$name->user_id] = $name->user_fullname;
@@ -319,10 +315,10 @@ class BP_Activity_Activity {
319
  $where_args[] = $wpdb->prepare( "type = %s", $type );
320
 
321
  if ( !empty( $item_id ) )
322
- $where_args[] = $wpdb->prepare( "item_id = %s", $item_id );
323
 
324
  if ( !empty( $secondary_item_id ) )
325
- $where_args[] = $wpdb->prepare( "secondary_item_id = %s", $secondary_item_id );
326
 
327
  if ( !empty( $action ) )
328
  $where_args[] = $wpdb->prepare( "action = %s", $action );
@@ -384,10 +380,10 @@ class BP_Activity_Activity {
384
  $where_args[] = $wpdb->prepare( "primary_link = %s", $primary_link );
385
 
386
  if ( !empty( $item_id ) )
387
- $where_args[] = $wpdb->prepare( "item_id = %s", $item_id );
388
 
389
  if ( !empty( $secondary_item_id ) )
390
- $where_args[] = $wpdb->prepare( "secondary_item_id = %s", $secondary_item_id );
391
 
392
  if ( !empty( $date_recorded ) )
393
  $where_args[] = $wpdb->prepare( "date_recorded = %s", $date_recorded );
@@ -416,24 +412,18 @@ class BP_Activity_Activity {
416
  return $activity_ids;
417
  }
418
 
419
- function delete_activity_item_comments( $activity_ids ) {
420
  global $bp, $wpdb;
421
 
422
- if ( is_array( $activity_ids ) )
423
- $activity_ids = implode ( ',', array_map( 'absint', $activity_ids ) );
424
- else
425
- $activity_ids = implode ( ',', array_map( 'absint', explode ( ',', $activity_ids ) ) );
426
 
427
  return $wpdb->query( "DELETE FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND item_id IN ({$activity_ids})" );
428
  }
429
 
430
- function delete_activity_meta_entries( $activity_ids ) {
431
  global $bp, $wpdb;
432
 
433
- if ( is_array( $activity_ids ) )
434
- $activity_ids = implode ( ',', array_map( 'absint', $activity_ids ) );
435
- else
436
- $activity_ids = implode ( ',', array_map( 'absint', explode ( ',', $activity_ids ) ) );
437
 
438
  return $wpdb->query( "DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids})" );
439
  }
170
  // Searching
171
  if ( $search_terms ) {
172
  $search_terms = $wpdb->escape( $search_terms );
173
+ $where_conditions['search_sql'] = "a.content LIKE '%%" . esc_sql( like_escape( $search_terms ) ) . "%%'";
174
  }
175
 
176
  // Filtering
238
  $total_activities = $wpdb->get_var( $total_activities_sql );
239
 
240
  // Get the fullnames of users so we don't have to query in the loop
241
+ if ( bp_is_active( 'xprofile' ) && !empty( $activities ) ) {
242
+ $activity_user_ids = wp_list_pluck( $activities, 'user_id' );
243
+ $activity_user_ids = implode( ',', wp_parse_id_list( $activity_user_ids ) );
 
 
 
244
 
245
+ if ( !empty( $activity_user_ids ) ) {
 
246
  if ( $names = $wpdb->get_results( "SELECT user_id, value AS user_fullname FROM {$bp->profile->table_name_data} WHERE field_id = 1 AND user_id IN ({$activity_user_ids})" ) ) {
247
  foreach ( (array) $names as $name )
248
  $tmp_names[$name->user_id] = $name->user_fullname;
315
  $where_args[] = $wpdb->prepare( "type = %s", $type );
316
 
317
  if ( !empty( $item_id ) )
318
+ $where_args[] = $wpdb->prepare( "item_id = %d", $item_id );
319
 
320
  if ( !empty( $secondary_item_id ) )
321
+ $where_args[] = $wpdb->prepare( "secondary_item_id = %d", $secondary_item_id );
322
 
323
  if ( !empty( $action ) )
324
  $where_args[] = $wpdb->prepare( "action = %s", $action );
380
  $where_args[] = $wpdb->prepare( "primary_link = %s", $primary_link );
381
 
382
  if ( !empty( $item_id ) )
383
+ $where_args[] = $wpdb->prepare( "item_id = %d", $item_id );
384
 
385
  if ( !empty( $secondary_item_id ) )
386
+ $where_args[] = $wpdb->prepare( "secondary_item_id = %d", $secondary_item_id );
387
 
388
  if ( !empty( $date_recorded ) )
389
  $where_args[] = $wpdb->prepare( "date_recorded = %s", $date_recorded );
412
  return $activity_ids;
413
  }
414
 
415
+ function delete_activity_item_comments( $activity_ids = array() ) {
416
  global $bp, $wpdb;
417
 
418
+ $activity_ids = implode( ',', wp_parse_id_list( $activity_ids ) );
 
 
 
419
 
420
  return $wpdb->query( "DELETE FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND item_id IN ({$activity_ids})" );
421
  }
422
 
423
+ function delete_activity_meta_entries( $activity_ids = array() ) {
424
  global $bp, $wpdb;
425
 
426
+ $activity_ids = implode( ',', wp_parse_id_list( $activity_ids ) );
 
 
 
427
 
428
  return $wpdb->query( "DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids})" );
429
  }
bp-blogs/bp-blogs-activity.php CHANGED
@@ -23,10 +23,14 @@ function bp_blogs_register_activity_actions() {
23
  global $bp;
24
 
25
  // Bail if activity is not active
26
- if ( ! bp_is_active( 'activity' ) )
27
  return false;
 
 
 
 
 
28
 
29
- bp_activity_set_action( $bp->blogs->id, 'new_blog', __( 'New site created', 'buddypress' ) );
30
  bp_activity_set_action( $bp->blogs->id, 'new_blog_post', __( 'New post published', 'buddypress' ) );
31
  bp_activity_set_action( $bp->blogs->id, 'new_blog_comment', __( 'New post comment posted', 'buddypress' ) );
32
 
23
  global $bp;
24
 
25
  // Bail if activity is not active
26
+ if ( ! bp_is_active( 'activity' ) ) {
27
  return false;
28
+ }
29
+
30
+ if ( is_multisite() ) {
31
+ bp_activity_set_action( $bp->blogs->id, 'new_blog', __( 'New site created', 'buddypress' ) );
32
+ }
33
 
 
34
  bp_activity_set_action( $bp->blogs->id, 'new_blog_post', __( 'New post published', 'buddypress' ) );
35
  bp_activity_set_action( $bp->blogs->id, 'new_blog_comment', __( 'New post comment posted', 'buddypress' ) );
36
 
bp-blogs/bp-blogs-classes.php CHANGED
@@ -109,7 +109,7 @@ class BP_Blogs_Blog {
109
  }
110
 
111
  if ( !empty( $search_terms ) ) {
112
- $filter = like_escape( $wpdb->escape( $search_terms ) );
113
  $paged_blogs = $wpdb->get_results( "SELECT b.blog_id, b.user_id as admin_user_id, u.user_email as admin_user_email, wb.domain, wb.path, bm.meta_value as last_activity, bm2.meta_value as name FROM {$bp->blogs->table_name} b, {$bp->blogs->table_name_blogmeta} bm, {$bp->blogs->table_name_blogmeta} bm2, {$wpdb->base_prefix}blogs wb, {$wpdb->users} u WHERE b.blog_id = wb.blog_id AND b.user_id = u.ID AND b.blog_id = bm.blog_id AND b.blog_id = bm2.blog_id AND wb.archived = '0' AND wb.spam = 0 AND wb.mature = 0 AND wb.deleted = 0 {$hidden_sql} AND bm.meta_key = 'last_activity' AND bm2.meta_key = 'name' AND bm2.meta_value LIKE '%%$filter%%' {$user_sql} GROUP BY b.blog_id {$order_sql} {$pag_sql}" );
114
  $total_blogs = $wpdb->get_var( "SELECT COUNT(DISTINCT b.blog_id) FROM {$bp->blogs->table_name} b, {$wpdb->base_prefix}blogs wb, {$bp->blogs->table_name_blogmeta} bm, {$bp->blogs->table_name_blogmeta} bm2 WHERE b.blog_id = wb.blog_id AND bm.blog_id = b.blog_id AND bm2.blog_id = b.blog_id AND wb.archived = '0' AND wb.spam = 0 AND wb.mature = 0 AND wb.deleted = 0 {$hidden_sql} AND bm.meta_key = 'name' AND bm2.meta_key = 'description' AND ( bm.meta_value LIKE '%%$filter%%' || bm2.meta_value LIKE '%%$filter%%' ) {$user_sql}" );
115
  } else {
@@ -119,10 +119,9 @@ class BP_Blogs_Blog {
119
 
120
  $blog_ids = array();
121
  foreach ( (array) $paged_blogs as $blog ) {
122
- $blog_ids[] = $blog->blog_id;
123
  }
124
 
125
- $blog_ids = $wpdb->escape( join( ',', (array) $blog_ids ) );
126
  $paged_blogs = BP_Blogs_Blog::get_blog_extras( $paged_blogs, $blog_ids, $type );
127
 
128
  return array( 'blogs' => $paged_blogs, 'total' => $total_blogs );
@@ -211,8 +210,9 @@ class BP_Blogs_Blog {
211
  function search_blogs( $filter, $limit = null, $page = null ) {
212
  global $wpdb, $bp;
213
 
214
- $filter = like_escape( $wpdb->escape( $filter ) );
215
 
 
216
  if ( !bp_current_user_can( 'bp_moderate' ) )
217
  $hidden_sql = "AND wb.public = 1";
218
 
@@ -241,8 +241,9 @@ class BP_Blogs_Blog {
241
  function get_by_letter( $letter, $limit = null, $page = null ) {
242
  global $bp, $wpdb;
243
 
244
- $letter = like_escape( $wpdb->escape( $letter ) );
245
 
 
246
  if ( !bp_current_user_can( 'bp_moderate' ) )
247
  $hidden_sql = "AND wb.public = 1";
248
 
@@ -261,6 +262,8 @@ class BP_Blogs_Blog {
261
  if ( empty( $blog_ids ) )
262
  return $paged_blogs;
263
 
 
 
264
  for ( $i = 0, $count = count( $paged_blogs ); $i < $count; ++$i ) {
265
  $blog_prefix = $wpdb->get_blog_prefix( $paged_blogs[$i]->blog_id );
266
  $paged_blogs[$i]->latest_post = $wpdb->get_row( "SELECT ID, post_content, post_title, post_excerpt, guid FROM {$blog_prefix}posts WHERE post_status = 'publish' AND post_type = 'post' AND id != 1 ORDER BY id DESC LIMIT 1" );
109
  }
110
 
111
  if ( !empty( $search_terms ) ) {
112
+ $filter = esc_sql( like_escape( $search_terms ) );
113
  $paged_blogs = $wpdb->get_results( "SELECT b.blog_id, b.user_id as admin_user_id, u.user_email as admin_user_email, wb.domain, wb.path, bm.meta_value as last_activity, bm2.meta_value as name FROM {$bp->blogs->table_name} b, {$bp->blogs->table_name_blogmeta} bm, {$bp->blogs->table_name_blogmeta} bm2, {$wpdb->base_prefix}blogs wb, {$wpdb->users} u WHERE b.blog_id = wb.blog_id AND b.user_id = u.ID AND b.blog_id = bm.blog_id AND b.blog_id = bm2.blog_id AND wb.archived = '0' AND wb.spam = 0 AND wb.mature = 0 AND wb.deleted = 0 {$hidden_sql} AND bm.meta_key = 'last_activity' AND bm2.meta_key = 'name' AND bm2.meta_value LIKE '%%$filter%%' {$user_sql} GROUP BY b.blog_id {$order_sql} {$pag_sql}" );
114
  $total_blogs = $wpdb->get_var( "SELECT COUNT(DISTINCT b.blog_id) FROM {$bp->blogs->table_name} b, {$wpdb->base_prefix}blogs wb, {$bp->blogs->table_name_blogmeta} bm, {$bp->blogs->table_name_blogmeta} bm2 WHERE b.blog_id = wb.blog_id AND bm.blog_id = b.blog_id AND bm2.blog_id = b.blog_id AND wb.archived = '0' AND wb.spam = 0 AND wb.mature = 0 AND wb.deleted = 0 {$hidden_sql} AND bm.meta_key = 'name' AND bm2.meta_key = 'description' AND ( bm.meta_value LIKE '%%$filter%%' || bm2.meta_value LIKE '%%$filter%%' ) {$user_sql}" );
115
  } else {
119
 
120
  $blog_ids = array();
121
  foreach ( (array) $paged_blogs as $blog ) {
122
+ $blog_ids[] = (int) $blog->blog_id;
123
  }
124
 
 
125
  $paged_blogs = BP_Blogs_Blog::get_blog_extras( $paged_blogs, $blog_ids, $type );
126
 
127
  return array( 'blogs' => $paged_blogs, 'total' => $total_blogs );
210
  function search_blogs( $filter, $limit = null, $page = null ) {
211
  global $wpdb, $bp;
212
 
213
+ $filter = esc_sql( like_escape( $filter ) );
214
 
215
+ $hidden_sql = '';
216
  if ( !bp_current_user_can( 'bp_moderate' ) )
217
  $hidden_sql = "AND wb.public = 1";
218
 
241
  function get_by_letter( $letter, $limit = null, $page = null ) {
242
  global $bp, $wpdb;
243
 
244
+ $letter = esc_sql( like_escape( $letter ) );
245
 
246
+ $hidden_sql = '';
247
  if ( !bp_current_user_can( 'bp_moderate' ) )
248
  $hidden_sql = "AND wb.public = 1";
249
 
262
  if ( empty( $blog_ids ) )
263
  return $paged_blogs;
264
 
265
+ $blog_ids = implode( ',', wp_parse_id_list( $blog_ids ) );
266
+
267
  for ( $i = 0, $count = count( $paged_blogs ); $i < $count; ++$i ) {
268
  $blog_prefix = $wpdb->get_blog_prefix( $paged_blogs[$i]->blog_id );
269
  $paged_blogs[$i]->latest_post = $wpdb->get_row( "SELECT ID, post_content, post_title, post_excerpt, guid FROM {$blog_prefix}posts WHERE post_status = 'publish' AND post_type = 'post' AND id != 1 ORDER BY id DESC LIMIT 1" );
bp-core/bp-core-cache.php CHANGED
@@ -92,12 +92,7 @@ function bp_update_meta_cache( $args = array() ) {
92
  $object_column = $object_type . '_id';
93
  }
94
 
95
- if ( !is_array( $object_ids ) ) {
96
- $object_ids = preg_replace( '|[^0-9,]|', '', $object_ids );
97
- $object_ids = explode( ',', $object_ids );
98
- }
99
-
100
- $object_ids = array_map( 'intval', $object_ids );
101
 
102
  $cache = array();
103
 
92
  $object_column = $object_type . '_id';
93
  }
94
 
95
+ $object_ids = wp_parse_id_list( $object_ids );
 
 
 
 
 
96
 
97
  $cache = array();
98
 
bp-core/bp-core-classes.php CHANGED
@@ -301,7 +301,7 @@ class BP_User_Query {
301
  // @todo remove need for bp_is_active() check
302
  if ( empty( $include ) && ! empty( $user_id ) && bp_is_active( 'friends' ) ) {
303
  $friend_ids = friends_get_friend_user_ids( $user_id );
304
- $friend_ids = $wpdb->escape( implode( ',', (array) $friend_ids ) );
305
 
306
  if ( ! empty( $friend_ids ) ) {
307
  $sql['where'][] = "u.{$this->uid_name} IN ({$friend_ids})";
@@ -803,6 +803,7 @@ class BP_Core_User {
803
  }
804
 
805
  if ( !empty( $exclude ) ) {
 
806
  $sql['where_exclude'] = "AND u.ID NOT IN ({$exclude})";
807
  }
808
 
@@ -812,20 +813,13 @@ class BP_Core_User {
812
  $sql['where_users'] = "AND 0 = 1";
813
  } else {
814
  if ( !empty( $include ) ) {
815
- if ( is_array( $include ) ) {
816
- $uids = $wpdb->escape( implode( ',', (array) $include ) );
817
- } else {
818
- $uids = $wpdb->escape( $include );
819
- }
820
-
821
- if ( !empty( $uids ) ) {
822
- $sql['where_users'] = "AND u.ID IN ({$uids})";
823
- }
824
  } elseif ( !empty( $user_id ) && bp_is_active( 'friends' ) ) {
825
  $friend_ids = friends_get_friend_user_ids( $user_id );
826
- $friend_ids = $wpdb->escape( implode( ',', (array) $friend_ids ) );
827
 
828
  if ( !empty( $friend_ids ) ) {
 
829
  $sql['where_friends'] = "AND u.ID IN ({$friend_ids})";
830
 
831
  // User has no friends, return false since there will be no users to fetch.
@@ -836,7 +830,7 @@ class BP_Core_User {
836
  }
837
 
838
  if ( !empty( $search_terms ) && bp_is_active( 'xprofile' ) ) {
839
- $search_terms = like_escape( $wpdb->escape( $search_terms ) );
840
  $sql['where_searchterms'] = "AND spd.value LIKE '%%$search_terms%%'";
841
  }
842
 
@@ -911,8 +905,6 @@ class BP_Core_User {
911
  $user_ids[] = $user->id;
912
  }
913
 
914
- $user_ids = $wpdb->escape( join( ',', (array) $user_ids ) );
915
-
916
  // Add additional data to the returned results
917
  $paged_users = BP_Core_User::get_user_extras( $paged_users, $user_ids, $type );
918
  }
@@ -953,10 +945,15 @@ class BP_Core_User {
953
  }
954
  }
955
 
956
- $letter = like_escape( $wpdb->escape( $letter ) );
957
  $status_sql = bp_core_get_status_sql( 'u.' );
958
 
959
- $exclude_sql = ( !empty( $exclude ) ) ? " AND u.ID NOT IN ({$exclude})" : "";
 
 
 
 
 
960
 
961
  $total_users_sql = apply_filters( 'bp_core_users_by_letter_count_sql', $wpdb->prepare( "SELECT COUNT(DISTINCT u.ID) FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '{$letter}%%' ORDER BY pd.value ASC", bp_xprofile_fullname_field_name() ) );
962
  $paged_users_sql = apply_filters( 'bp_core_users_by_letter_sql', $wpdb->prepare( "SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.user_email FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '{$letter}%%' ORDER BY pd.value ASC{$pag_sql}", bp_xprofile_fullname_field_name() ) );
@@ -973,9 +970,7 @@ class BP_Core_User {
973
  */
974
  $user_ids = array();
975
  foreach ( (array) $paged_users as $user )
976
- $user_ids[] = $user->id;
977
-
978
- $user_ids = $wpdb->escape( join( ',', (array) $user_ids ) );
979
 
980
  // Add additional data to the returned results
981
  if ( $populate_extras ) {
@@ -1003,10 +998,11 @@ class BP_Core_User {
1003
  if ( $limit && $page )
1004
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
1005
 
 
1006
  $status_sql = bp_core_get_status_sql();
1007
 
1008
- $total_users_sql = apply_filters( 'bp_core_get_specific_users_count_sql', "SELECT COUNT(DISTINCT ID) FROM {$wpdb->users} WHERE {$status_sql} AND ID IN ( " . $wpdb->escape( $user_ids ) . " ) " );
1009
- $paged_users_sql = apply_filters( 'bp_core_get_specific_users_count_sql', "SELECT DISTINCT ID as id, user_registered, user_nicename, user_login, user_email FROM {$wpdb->users} WHERE {$status_sql} AND ID IN ( " . $wpdb->escape( $user_ids ) . " ) {$pag_sql}" );
1010
 
1011
  $total_users = $wpdb->get_var( $total_users_sql );
1012
  $paged_users = $wpdb->get_results( $paged_users_sql );
@@ -1045,7 +1041,7 @@ class BP_Core_User {
1045
  $user_ids = array();
1046
  $pag_sql = $limit && $page ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * intval( $limit ) ), intval( $limit ) ) : '';
1047
 
1048
- $search_terms = like_escape( $wpdb->escape( $search_terms ) );
1049
  $status_sql = bp_core_get_status_sql( 'u.' );
1050
 
1051
  $total_users_sql = apply_filters( 'bp_core_search_users_count_sql', "SELECT COUNT(DISTINCT u.ID) as id FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE {$status_sql} AND pd.value LIKE '%%{$search_terms}%%' ORDER BY pd.value ASC", $search_terms );
@@ -1061,8 +1057,6 @@ class BP_Core_User {
1061
  foreach ( (array) $paged_users as $user )
1062
  $user_ids[] = $user->id;
1063
 
1064
- $user_ids = $wpdb->escape( join( ',', (array) $user_ids ) );
1065
-
1066
  // Add additional data to the returned results
1067
  if ( $populate_extras )
1068
  $paged_users = BP_Core_User::get_user_extras( $paged_users, $user_ids );
@@ -1089,6 +1083,9 @@ class BP_Core_User {
1089
  if ( empty( $user_ids ) )
1090
  return $paged_users;
1091
 
 
 
 
1092
  // Fetch the user's full name
1093
  if ( bp_is_active( 'xprofile' ) && 'alphabetical' != $type ) {
1094
  $names = $wpdb->get_results( $wpdb->prepare( "SELECT pd.user_id as id, pd.value as fullname FROM {$bp->profile->table_name_fields} pf, {$bp->profile->table_name_data} pd WHERE pf.id = pd.field_id AND pf.name = %s AND pd.user_id IN ( {$user_ids} )", bp_xprofile_fullname_field_name() ) );
301
  // @todo remove need for bp_is_active() check
302
  if ( empty( $include ) && ! empty( $user_id ) && bp_is_active( 'friends' ) ) {
303
  $friend_ids = friends_get_friend_user_ids( $user_id );
304
+ $friend_ids = implode( ',', wp_parse_id_list( $friend_ids ) );
305
 
306
  if ( ! empty( $friend_ids ) ) {
307
  $sql['where'][] = "u.{$this->uid_name} IN ({$friend_ids})";
803
  }
804
 
805
  if ( !empty( $exclude ) ) {
806
+ $exclude = implode( ',', wp_parse_id_list( $exclude ) );
807
  $sql['where_exclude'] = "AND u.ID NOT IN ({$exclude})";
808
  }
809
 
813
  $sql['where_users'] = "AND 0 = 1";
814
  } else {
815
  if ( !empty( $include ) ) {
816
+ $include = implode( ',', wp_parse_id_list( $include ) );
817
+ $sql['where_users'] = "AND u.ID IN ({$include})";
 
 
 
 
 
 
 
818
  } elseif ( !empty( $user_id ) && bp_is_active( 'friends' ) ) {
819
  $friend_ids = friends_get_friend_user_ids( $user_id );
 
820
 
821
  if ( !empty( $friend_ids ) ) {
822
+ $friend_ids = implode( ',', wp_parse_id_list( $friend_ids ) );
823
  $sql['where_friends'] = "AND u.ID IN ({$friend_ids})";
824
 
825
  // User has no friends, return false since there will be no users to fetch.
830
  }
831
 
832
  if ( !empty( $search_terms ) && bp_is_active( 'xprofile' ) ) {
833
+ $search_terms = esc_sql( like_escape( $search_terms ) );
834
  $sql['where_searchterms'] = "AND spd.value LIKE '%%$search_terms%%'";
835
  }
836
 
905
  $user_ids[] = $user->id;
906
  }
907
 
 
 
908
  // Add additional data to the returned results
909
  $paged_users = BP_Core_User::get_user_extras( $paged_users, $user_ids, $type );
910
  }
945
  }
946
  }
947
 
948
+ $letter = esc_sql( like_escape( $letter ) );
949
  $status_sql = bp_core_get_status_sql( 'u.' );
950
 
951
+ if ( !empty( $exclude ) ) {
952
+ $exclude = implode( ',', wp_parse_id_list( $r['exclude'] ) );
953
+ $exclude_sql = " AND u.id NOT IN ({$exclude})";
954
+ } else {
955
+ $exclude_sql = '';
956
+ }
957
 
958
  $total_users_sql = apply_filters( 'bp_core_users_by_letter_count_sql', $wpdb->prepare( "SELECT COUNT(DISTINCT u.ID) FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '{$letter}%%' ORDER BY pd.value ASC", bp_xprofile_fullname_field_name() ) );
959
  $paged_users_sql = apply_filters( 'bp_core_users_by_letter_sql', $wpdb->prepare( "SELECT DISTINCT u.ID as id, u.user_registered, u.user_nicename, u.user_login, u.user_email FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id LEFT JOIN {$bp->profile->table_name_fields} pf ON pd.field_id = pf.id WHERE {$status_sql} AND pf.name = %s {$exclude_sql} AND pd.value LIKE '{$letter}%%' ORDER BY pd.value ASC{$pag_sql}", bp_xprofile_fullname_field_name() ) );
970
  */
971
  $user_ids = array();
972
  foreach ( (array) $paged_users as $user )
973
+ $user_ids[] = (int) $user->id;
 
 
974
 
975
  // Add additional data to the returned results
976
  if ( $populate_extras ) {
998
  if ( $limit && $page )
999
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
1000
 
1001
+ $user_ids = implode( ',', wp_parse_id_list( $user_ids ) );
1002
  $status_sql = bp_core_get_status_sql();
1003
 
1004
+ $total_users_sql = apply_filters( 'bp_core_get_specific_users_count_sql', "SELECT COUNT(DISTINCT ID) FROM {$wpdb->users} WHERE {$status_sql} AND ID IN ({$user_ids})" );
1005
+ $paged_users_sql = apply_filters( 'bp_core_get_specific_users_count_sql', "SELECT DISTINCT ID as id, user_registered, user_nicename, user_login, user_email FROM {$wpdb->users} WHERE {$status_sql} AND ID IN ({$user_ids}) {$pag_sql}" );
1006
 
1007
  $total_users = $wpdb->get_var( $total_users_sql );
1008
  $paged_users = $wpdb->get_results( $paged_users_sql );
1041
  $user_ids = array();
1042
  $pag_sql = $limit && $page ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * intval( $limit ) ), intval( $limit ) ) : '';
1043
 
1044
+ $search_terms = esc_sql( like_escape( $search_terms ) );
1045
  $status_sql = bp_core_get_status_sql( 'u.' );
1046
 
1047
  $total_users_sql = apply_filters( 'bp_core_search_users_count_sql', "SELECT COUNT(DISTINCT u.ID) as id FROM {$wpdb->users} u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE {$status_sql} AND pd.value LIKE '%%{$search_terms}%%' ORDER BY pd.value ASC", $search_terms );
1057
  foreach ( (array) $paged_users as $user )
1058
  $user_ids[] = $user->id;
1059
 
 
 
1060
  // Add additional data to the returned results
1061
  if ( $populate_extras )
1062
  $paged_users = BP_Core_User::get_user_extras( $paged_users, $user_ids );
1083
  if ( empty( $user_ids ) )
1084
  return $paged_users;
1085
 
1086
+ // Sanitize user IDs
1087
+ $user_ids = implode( ',', wp_parse_id_list( $user_ids ) );
1088
+
1089
  // Fetch the user's full name
1090
  if ( bp_is_active( 'xprofile' ) && 'alphabetical' != $type ) {
1091
  $names = $wpdb->get_results( $wpdb->prepare( "SELECT pd.user_id as id, pd.value as fullname FROM {$bp->profile->table_name_fields} pf, {$bp->profile->table_name_data} pd WHERE pf.id = pd.field_id AND pf.name = %s AND pd.user_id IN ( {$user_ids} )", bp_xprofile_fullname_field_name() ) );
bp-core/bp-core-filters.php CHANGED
@@ -130,7 +130,7 @@ function bp_core_filter_comments( $comments, $post_id ) {
130
  if ( empty( $user_ids ) )
131
  return $comments;
132
 
133
- $user_ids = implode( ',', $user_ids );
134
 
135
  if ( !$userdata = $wpdb->get_results( "SELECT ID as user_id, user_login, user_nicename FROM {$wpdb->users} WHERE ID IN ({$user_ids})" ) )
136
  return $comments;
130
  if ( empty( $user_ids ) )
131
  return $comments;
132
 
133
+ $user_ids = implode( ',', wp_parse_id_list( $user_ids ) );
134
 
135
  if ( !$userdata = $wpdb->get_results( "SELECT ID as user_id, user_login, user_nicename FROM {$wpdb->users} WHERE ID IN ({$user_ids})" ) )
136
  return $comments;
bp-core/bp-core-functions.php CHANGED
@@ -141,7 +141,7 @@ function bp_core_get_directory_pages() {
141
  // Always get page data from the root blog, except on multiblog mode, when it comes
142
  // from the current blog
143
  $posts_table_name = bp_is_multiblog_mode() ? $wpdb->posts : $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts';
144
- $page_ids_sql = implode( ',', (array) $page_ids );
145
  $page_names = $wpdb->get_results( "SELECT ID, post_name, post_parent, post_title FROM {$posts_table_name} WHERE ID IN ({$page_ids_sql}) AND post_status = 'publish' " );
146
 
147
  foreach ( (array) $page_ids as $component_id => $page_id ) {
141
  // Always get page data from the root blog, except on multiblog mode, when it comes
142
  // from the current blog
143
  $posts_table_name = bp_is_multiblog_mode() ? $wpdb->posts : $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts';
144
+ $page_ids_sql = implode( ',', wp_parse_id_list( $page_ids ) );
145
  $page_names = $wpdb->get_results( "SELECT ID, post_name, post_parent, post_title FROM {$posts_table_name} WHERE ID IN ({$page_ids_sql}) AND post_status = 'publish' " );
146
 
147
  foreach ( (array) $page_ids as $component_id => $page_id ) {
bp-friends/bp-friends-classes.php CHANGED
@@ -144,7 +144,7 @@ class BP_Friends_Friendship {
144
  if ( empty( $user_id ) )
145
  $user_id = bp_loggedin_user_id();
146
 
147
- $filter = like_escape( $wpdb->escape( $filter ) );
148
 
149
  if ( !empty( $limit ) && !empty( $page ) )
150
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
@@ -153,7 +153,7 @@ class BP_Friends_Friendship {
153
  return false;
154
 
155
  // Get all the user ids for the current user's friends.
156
- $fids = implode( ',', $friend_ids );
157
 
158
  if ( empty( $fids ) )
159
  return false;
@@ -198,6 +198,8 @@ class BP_Friends_Friendship {
198
  function get_bulk_last_active( $user_ids ) {
199
  global $wpdb;
200
 
 
 
201
  return $wpdb->get_results( $wpdb->prepare( "SELECT meta_value as last_activity, user_id FROM {$wpdb->usermeta} WHERE meta_key = %s AND user_id IN ( {$user_ids} ) ORDER BY meta_value DESC", bp_get_user_meta_key( 'last_activity' ) ) );
202
  }
203
 
@@ -222,7 +224,7 @@ class BP_Friends_Friendship {
222
  function search_users( $filter, $user_id, $limit = null, $page = null ) {
223
  global $wpdb, $bp;
224
 
225
- $filter = like_escape( $wpdb->escape( $filter ) );
226
 
227
  $usermeta_table = $wpdb->base_prefix . 'usermeta';
228
  $users_table = $wpdb->base_prefix . 'users';
@@ -248,7 +250,7 @@ class BP_Friends_Friendship {
248
  function search_users_count( $filter ) {
249
  global $wpdb, $bp;
250
 
251
- $filter = like_escape( $wpdb->escape( $filter ) );
252
 
253
  $usermeta_table = $wpdb->prefix . 'usermeta';
254
  $users_table = $wpdb->base_prefix . 'users';
@@ -274,6 +276,8 @@ class BP_Friends_Friendship {
274
  if ( !bp_is_active( 'xprofile' ) )
275
  return false;
276
 
 
 
277
  return $wpdb->get_results( $wpdb->prepare( "SELECT user_id FROM {$bp->profile->table_name_data} pd, {$bp->profile->table_name_fields} pf WHERE pf.id = pd.field_id AND pf.name = %s AND pd.user_id IN ( {$user_ids} ) ORDER BY pd.value ASC", bp_xprofile_fullname_field_name() ) );
278
  }
279
 
144
  if ( empty( $user_id ) )
145
  $user_id = bp_loggedin_user_id();
146
 
147
+ $filter = esc_sql( like_escape( $filter ) );
148
 
149
  if ( !empty( $limit ) && !empty( $page ) )
150
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
153
  return false;
154
 
155
  // Get all the user ids for the current user's friends.
156
+ $fids = implode( ',', wp_parse_id_list( $friend_ids ) );
157
 
158
  if ( empty( $fids ) )
159
  return false;
198
  function get_bulk_last_active( $user_ids ) {
199
  global $wpdb;
200
 
201
+ $user_ids = implode( ',', wp_parse_id_list( $user_ids ) );
202
+
203
  return $wpdb->get_results( $wpdb->prepare( "SELECT meta_value as last_activity, user_id FROM {$wpdb->usermeta} WHERE meta_key = %s AND user_id IN ( {$user_ids} ) ORDER BY meta_value DESC", bp_get_user_meta_key( 'last_activity' ) ) );
204
  }
205
 
224
  function search_users( $filter, $user_id, $limit = null, $page = null ) {
225
  global $wpdb, $bp;
226
 
227
+ $filter = esc_sql( like_escape( $filter ) );
228
 
229
  $usermeta_table = $wpdb->base_prefix . 'usermeta';
230
  $users_table = $wpdb->base_prefix . 'users';
250
  function search_users_count( $filter ) {
251
  global $wpdb, $bp;
252
 
253
+ $filter = esc_sql( like_escape( $filter ) );
254
 
255
  $usermeta_table = $wpdb->prefix . 'usermeta';
256
  $users_table = $wpdb->base_prefix . 'users';
276
  if ( !bp_is_active( 'xprofile' ) )
277
  return false;
278
 
279
+ $user_ids = implode( ',', wp_parse_id_list( $user_ids ) );
280
+
281
  return $wpdb->get_results( $wpdb->prepare( "SELECT user_id FROM {$bp->profile->table_name_data} pd, {$bp->profile->table_name_fields} pf WHERE pf.id = pd.field_id AND pf.name = %s AND pd.user_id IN ( {$user_ids} ) ORDER BY pd.value ASC", bp_xprofile_fullname_field_name() ) );
282
  }
283
 
bp-groups/bp-groups-activity.php CHANGED
@@ -16,13 +16,20 @@ if ( !defined( 'ABSPATH' ) ) exit;
16
  function groups_register_activity_actions() {
17
  global $bp;
18
 
19
- if ( !bp_is_active( 'activity' ) )
20
  return false;
 
21
 
22
  bp_activity_set_action( $bp->groups->id, 'created_group', __( 'Created a group', 'buddypress' ) );
23
  bp_activity_set_action( $bp->groups->id, 'joined_group', __( 'Joined a group', 'buddypress' ) );
24
- bp_activity_set_action( $bp->groups->id, 'new_forum_topic', __( 'New group forum topic', 'buddypress' ) );
25
- bp_activity_set_action( $bp->groups->id, 'new_forum_post', __( 'New group forum post', 'buddypress' ) );
 
 
 
 
 
 
26
 
27
  do_action( 'groups_register_activity_actions' );
28
  }
16
  function groups_register_activity_actions() {
17
  global $bp;
18
 
19
+ if ( ! bp_is_active( 'activity' ) ) {
20
  return false;
21
+ }
22
 
23
  bp_activity_set_action( $bp->groups->id, 'created_group', __( 'Created a group', 'buddypress' ) );
24
  bp_activity_set_action( $bp->groups->id, 'joined_group', __( 'Joined a group', 'buddypress' ) );
25
+
26
+ // These actions are for the legacy forums
27
+ // Since the bbPress plugin also shares the same 'forums' identifier, we also
28
+ // check for the legacy forums loader class to be extra cautious
29
+ if ( bp_is_active( 'forums' ) && class_exists( 'BP_Forums_Component' ) ) {
30
+ bp_activity_set_action( $bp->groups->id, 'new_forum_topic', __( 'New group forum topic', 'buddypress' ) );
31
+ bp_activity_set_action( $bp->groups->id, 'new_forum_post', __( 'New group forum post', 'buddypress' ) );
32
+ }
33
 
34
  do_action( 'groups_register_activity_actions' );
35
  }
bp-groups/bp-groups-classes.php CHANGED
@@ -173,7 +173,7 @@ class BP_Groups_Group {
173
 
174
  // Fetch the user IDs of all the members of the group
175
  $user_ids = BP_Groups_Member::get_group_member_ids( $this->id );
176
- $user_id_str = implode( ',', (array) $user_ids );
177
 
178
  // Modify group count usermeta for members
179
  $wpdb->query( "UPDATE {$wpdb->usermeta} SET meta_value = meta_value - 1 WHERE meta_key = 'total_group_count' AND user_id IN ( {$user_id_str} )" );
@@ -221,7 +221,7 @@ class BP_Groups_Group {
221
  if ( empty( $user_id ) )
222
  $user_id = bp_displayed_user_id();
223
 
224
- $filter = like_escape( $wpdb->escape( $filter ) );
225
 
226
  if ( !empty( $limit ) && !empty( $page ) )
227
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
@@ -232,7 +232,7 @@ class BP_Groups_Group {
232
  if ( empty( $gids['groups'] ) )
233
  return false;
234
 
235
- $gids = implode( ',', $gids['groups'] );
236
 
237
  $paged_groups = $wpdb->get_results( "SELECT id as group_id FROM {$bp->groups->table_name} WHERE ( name LIKE '{$filter}%%' OR description LIKE '{$filter}%%' ) AND id IN ({$gids}) {$pag_sql}" );
238
  $total_groups = $wpdb->get_var( "SELECT COUNT(id) FROM {$bp->groups->table_name} WHERE ( name LIKE '{$filter}%%' OR description LIKE '{$filter}%%' ) AND id IN ({$gids})" );
@@ -240,18 +240,21 @@ class BP_Groups_Group {
240
  return array( 'groups' => $paged_groups, 'total' => $total_groups );
241
  }
242
 
 
 
 
243
  function search_groups( $filter, $limit = null, $page = null, $sort_by = false, $order = false ) {
244
  global $wpdb, $bp;
245
 
246
- $filter = like_escape( $wpdb->escape( $filter ) );
247
 
248
  if ( !empty( $limit ) && !empty( $page ) )
249
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
250
 
251
  if ( !empty( $sort_by ) && !empty( $order ) ) {
252
- $sort_by = $wpdb->escape( $sort_by );
253
- $order = $wpdb->escape( $order );
254
- $order_sql = "ORDER BY $sort_by $order";
255
  }
256
 
257
  if ( !bp_current_user_can( 'bp_moderate' ) )
@@ -363,7 +366,7 @@ class BP_Groups_Group {
363
  $sql['hidden'] = " AND g.status != 'hidden'";
364
 
365
  if ( !empty( $search_terms ) ) {
366
- $search_terms = like_escape( $wpdb->escape( $search_terms ) );
367
  $sql['search'] = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
368
  }
369
 
@@ -371,18 +374,14 @@ class BP_Groups_Group {
371
  $sql['user'] = $wpdb->prepare( " AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $user_id );
372
 
373
  if ( !empty( $include ) ) {
374
- if ( is_array( $include ) )
375
- $include = implode( ',', $include );
376
-
377
- $include = $wpdb->escape( $include );
378
  $sql['include'] = " AND g.id IN ({$include})";
379
  }
380
 
381
  if ( !empty( $exclude ) ) {
382
- if ( is_array( $exclude ) )
383
- $exclude = implode( ',', $exclude );
384
-
385
- $exclude = $wpdb->escape( $exclude );
386
  $sql['exclude'] = " AND g.id NOT IN ({$exclude})";
387
  }
388
 
@@ -479,17 +478,18 @@ class BP_Groups_Group {
479
  $hidden_sql = " AND g.status != 'hidden'";
480
 
481
  if ( !empty( $search_terms ) ) {
482
- $search_terms = like_escape( $wpdb->escape( $search_terms ) );
483
  $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
484
  }
485
 
486
  if ( !empty( $exclude ) ) {
487
- $exclude = $wpdb->escape( $exclude );
 
488
  $exclude_sql = " AND g.id NOT IN ({$exclude})";
489
  }
490
 
491
  if ( !empty( $user_id ) ) {
492
- $user_id = $wpdb->escape( $user_id );
493
  $paged_groups = $wpdb->get_results( "SELECT DISTINCT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bp->groups->table_name_members} m, {$bbdb->forums} f, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND (gm3.meta_key = 'forum_id' AND gm3.meta_value = f.forum_id) AND f.topics > 0 {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql} ORDER BY f.topics DESC {$pag_sql}" );
494
  $total_groups = $wpdb->get_var( "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bbdb->forums} f, {$bp->groups->table_name} g WHERE g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND (gm3.meta_key = 'forum_id' AND gm3.meta_value = f.forum_id) AND f.topics > 0 {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql}" );
495
  } else {
@@ -520,12 +520,13 @@ class BP_Groups_Group {
520
  $hidden_sql = " AND g.status != 'hidden'";
521
 
522
  if ( !empty( $search_terms ) ) {
523
- $search_terms = like_escape( $wpdb->escape( $search_terms ) );
524
  $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
525
  }
526
 
527
  if ( !empty( $exclude ) ) {
528
- $exclude = $wpdb->escape( $exclude );
 
529
  $exclude_sql = " AND g.id NOT IN ({$exclude})";
530
  }
531
 
@@ -562,14 +563,15 @@ class BP_Groups_Group {
562
  }
563
 
564
  if ( !empty( $exclude ) ) {
565
- $exclude = $wpdb->escape( $exclude );
 
566
  $exclude_sql = " AND g.id NOT IN ({$exclude})";
567
  }
568
 
569
  if ( !bp_current_user_can( 'bp_moderate' ) )
570
  $hidden_sql = " AND status != 'hidden'";
571
 
572
- $letter = like_escape( $wpdb->escape( $letter ) );
573
 
574
  if ( !empty( $limit ) && !empty( $page ) ) {
575
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
@@ -601,12 +603,13 @@ class BP_Groups_Group {
601
  $hidden_sql = "AND g.status != 'hidden'";
602
 
603
  if ( !empty( $search_terms ) ) {
604
- $search_terms = like_escape( $wpdb->escape( $search_terms ) );
605
  $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
606
  }
607
 
608
  if ( !empty( $exclude ) ) {
609
- $exclude = $wpdb->escape( $exclude );
 
610
  $exclude_sql = " AND g.id NOT IN ({$exclude})";
611
  }
612
 
@@ -634,6 +637,9 @@ class BP_Groups_Group {
634
  if ( empty( $group_ids ) )
635
  return $paged_groups;
636
 
 
 
 
637
  // Fetch the logged in users status within each group
638
  $user_status = $wpdb->get_col( $wpdb->prepare( "SELECT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id IN ( {$group_ids} ) AND is_confirmed = 1 AND is_banned = 0", bp_loggedin_user_id() ) );
639
  for ( $i = 0, $count = count( $paged_groups ); $i < $count; ++$i ) {
@@ -735,8 +741,8 @@ class BP_Groups_Group {
735
  $sql['from'] = "FROM {$bbdb->topics} AS t INNER JOIN {$bp->groups->table_name_groupmeta} AS gm ON t.forum_id = gm.meta_value INNER JOIN {$bp->groups->table_name} AS g ON gm.group_id = g.id";
736
  $sql['where'] = "WHERE gm.meta_key = 'forum_id' {$status_sql} AND t.topic_status = '0' AND t.topic_sticky != '2'";
737
 
738
- if ( $search_terms ) {
739
- $st = like_escape( $search_terms );
740
  $sql['where'] .= " AND ( t.topic_title LIKE '%{$st}%' )";
741
  }
742
 
@@ -997,7 +1003,7 @@ class BP_Groups_Member {
997
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
998
 
999
  if ( !empty( $filter ) ) {
1000
- $filter = like_escape( $wpdb->escape( $filter ) );
1001
  $filter_sql = " AND ( g.name LIKE '%%{$filter}%%' OR g.description LIKE '%%{$filter}%%' )";
1002
  }
1003
 
@@ -1019,7 +1025,7 @@ class BP_Groups_Member {
1019
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
1020
 
1021
  if ( !empty( $filter ) ) {
1022
- $filter = like_escape( $wpdb->escape( $filter ) );
1023
  $filter_sql = " AND ( g.name LIKE '%%{$filter}%%' OR g.description LIKE '%%{$filter}%%' )";
1024
  }
1025
 
@@ -1041,7 +1047,7 @@ class BP_Groups_Member {
1041
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
1042
 
1043
  if ( !empty( $filter ) ) {
1044
- $filter = like_escape( $wpdb->escape( $filter ) );
1045
  $filter_sql = " AND ( g.name LIKE '%%{$filter}%%' OR g.description LIKE '%%{$filter}%%' )";
1046
  }
1047
 
@@ -1072,7 +1078,13 @@ class BP_Groups_Member {
1072
 
1073
  $pag_sql = ( !empty( $limit ) && !empty( $page ) ) ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ) : '';
1074
 
1075
- $exclude_sql = !empty( $exclude ) ? $wpdb->prepare( " AND g.id NOT IN (%s)", $exclude ) : '';
 
 
 
 
 
 
1076
 
1077
  $paged_groups = $wpdb->get_results( $wpdb->prepare( "SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = %d {$exclude_sql} ORDER BY m.date_modified ASC {$pag_sql}", $user_id ) );
1078
  $total_groups = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = %d {$exclude_sql} ORDER BY date_modified ASC", $user_id ) );
@@ -1175,14 +1187,14 @@ class BP_Groups_Member {
1175
  return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND is_banned = 0 AND inviter_id = 0", $user_id, $group_id ) );
1176
  }
1177
 
1178
- function get_random_groups( $user_id, $total_groups = 5 ) {
1179
  global $wpdb, $bp;
1180
 
1181
  // If the user is logged in and viewing their random groups, we can show hidden and private groups
1182
  if ( bp_is_my_profile() ) {
1183
- return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND is_confirmed = 1 AND is_banned = 0 ORDER BY rand() LIMIT $total_groups", $user_id ) );
1184
  } else {
1185
- return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT m.group_id FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND g.status != 'hidden' AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0 ORDER BY rand() LIMIT $total_groups", $user_id ) );
1186
  }
1187
  }
1188
 
@@ -1227,7 +1239,8 @@ class BP_Groups_Member {
1227
 
1228
  $exclude_sql = '';
1229
  if ( !empty( $exclude ) ) {
1230
- $exclude = implode( ',', wp_parse_id_list( $exclude ) );
 
1231
  $exclude_sql = " AND m.user_id NOT IN ({$exclude})";
1232
  }
1233
 
@@ -1251,7 +1264,7 @@ class BP_Groups_Member {
1251
  foreach ( (array) $members as $user )
1252
  $user_ids[] = $user->user_id;
1253
 
1254
- $user_ids = $wpdb->escape( join( ',', (array) $user_ids ) );
1255
 
1256
  if ( bp_is_active( 'friends' ) ) {
1257
  $friend_status = $wpdb->get_results( $wpdb->prepare( "SELECT initiator_user_id, friend_user_id, is_confirmed FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d AND friend_user_id IN ( {$user_ids} ) ) OR (initiator_user_id IN ( {$user_ids} ) AND friend_user_id = %d )", bp_loggedin_user_id(), bp_loggedin_user_id() ) );
173
 
174
  // Fetch the user IDs of all the members of the group
175
  $user_ids = BP_Groups_Member::get_group_member_ids( $this->id );
176
+ $user_id_str = esc_sql( implode( ',', wp_parse_id_list( $user_ids ) ) );
177
 
178
  // Modify group count usermeta for members
179
  $wpdb->query( "UPDATE {$wpdb->usermeta} SET meta_value = meta_value - 1 WHERE meta_key = 'total_group_count' AND user_id IN ( {$user_id_str} )" );
221
  if ( empty( $user_id ) )
222
  $user_id = bp_displayed_user_id();
223
 
224
+ $filter = esc_sql( like_escape( $filter ) );
225
 
226
  if ( !empty( $limit ) && !empty( $page ) )
227
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
232
  if ( empty( $gids['groups'] ) )
233
  return false;
234
 
235
+ $gids = esc_sql( implode( ',', wp_parse_id_list( $gids['groups'] ) ) );
236
 
237
  $paged_groups = $wpdb->get_results( "SELECT id as group_id FROM {$bp->groups->table_name} WHERE ( name LIKE '{$filter}%%' OR description LIKE '{$filter}%%' ) AND id IN ({$gids}) {$pag_sql}" );
238
  $total_groups = $wpdb->get_var( "SELECT COUNT(id) FROM {$bp->groups->table_name} WHERE ( name LIKE '{$filter}%%' OR description LIKE '{$filter}%%' ) AND id IN ({$gids})" );
240
  return array( 'groups' => $paged_groups, 'total' => $total_groups );
241
  }
242
 
243
+ /**
244
+ * @todo Deprecate in favor of get()
245
+ */
246
  function search_groups( $filter, $limit = null, $page = null, $sort_by = false, $order = false ) {
247
  global $wpdb, $bp;
248
 
249
+ $filter = esc_sql( like_escape( $filter ) );
250
 
251
  if ( !empty( $limit ) && !empty( $page ) )
252
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
253
 
254
  if ( !empty( $sort_by ) && !empty( $order ) ) {
255
+ $sort_by = esc_sql( $sort_by );
256
+ $order = esc_sql( $order );
257
+ $order_sql = "ORDER BY {$sort_by} {$order}";
258
  }
259
 
260
  if ( !bp_current_user_can( 'bp_moderate' ) )
366
  $sql['hidden'] = " AND g.status != 'hidden'";
367
 
368
  if ( !empty( $search_terms ) ) {
369
+ $search_terms = esc_sql( like_escape( $search_terms ) );
370
  $sql['search'] = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
371
  }
372
 
374
  $sql['user'] = $wpdb->prepare( " AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $user_id );
375
 
376
  if ( !empty( $include ) ) {
377
+ $include = wp_parse_id_list( $r['include'] );
378
+ $include = $wpdb->escape( implode( ',', $include ) );
 
 
379
  $sql['include'] = " AND g.id IN ({$include})";
380
  }
381
 
382
  if ( !empty( $exclude ) ) {
383
+ $exclude = wp_parse_id_list( $r['exclude'] );
384
+ $exclude = $wpdb->escape( implode( ',', $exclude ) );
 
 
385
  $sql['exclude'] = " AND g.id NOT IN ({$exclude})";
386
  }
387
 
478
  $hidden_sql = " AND g.status != 'hidden'";
479
 
480
  if ( !empty( $search_terms ) ) {
481
+ $search_terms = esc_sql( like_escape( $search_terms ) );
482
  $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
483
  }
484
 
485
  if ( !empty( $exclude ) ) {
486
+ $exclude = wp_parse_id_list( $exclude );
487
+ $exclude = $wpdb->escape( implode( ',', $exclude ) );
488
  $exclude_sql = " AND g.id NOT IN ({$exclude})";
489
  }
490
 
491
  if ( !empty( $user_id ) ) {
492
+ $user_id = absint( $wpdb->escape( $user_id ) );
493
  $paged_groups = $wpdb->get_results( "SELECT DISTINCT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bp->groups->table_name_members} m, {$bbdb->forums} f, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND (gm3.meta_key = 'forum_id' AND gm3.meta_value = f.forum_id) AND f.topics > 0 {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql} ORDER BY f.topics DESC {$pag_sql}" );
494
  $total_groups = $wpdb->get_var( "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bbdb->forums} f, {$bp->groups->table_name} g WHERE g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND (gm3.meta_key = 'forum_id' AND gm3.meta_value = f.forum_id) AND f.topics > 0 {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql}" );
495
  } else {
520
  $hidden_sql = " AND g.status != 'hidden'";
521
 
522
  if ( !empty( $search_terms ) ) {
523
+ $search_terms = esc_sql( like_escape( $search_terms ) );
524
  $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
525
  }
526
 
527
  if ( !empty( $exclude ) ) {
528
+ $exclude = wp_parse_id_list( $exclude );
529
+ $exclude = $wpdb->escape( implode( ',', $exclude ) );
530
  $exclude_sql = " AND g.id NOT IN ({$exclude})";
531
  }
532
 
563
  }
564
 
565
  if ( !empty( $exclude ) ) {
566
+ $exclude = wp_parse_id_list( $exclude );
567
+ $exclude = $wpdb->escape( implode( ',', $exclude ) );
568
  $exclude_sql = " AND g.id NOT IN ({$exclude})";
569
  }
570
 
571
  if ( !bp_current_user_can( 'bp_moderate' ) )
572
  $hidden_sql = " AND status != 'hidden'";
573
 
574
+ $letter = esc_sql( like_escape( $letter ) );
575
 
576
  if ( !empty( $limit ) && !empty( $page ) ) {
577
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
603
  $hidden_sql = "AND g.status != 'hidden'";
604
 
605
  if ( !empty( $search_terms ) ) {
606
+ $search_terms = esc_sql( like_escape( $search_terms ) );
607
  $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
608
  }
609
 
610
  if ( !empty( $exclude ) ) {
611
+ $exclude = wp_parse_id_list( $exclude );
612
+ $exclude = $wpdb->escape( implode( ',', $exclude ) );
613
  $exclude_sql = " AND g.id NOT IN ({$exclude})";
614
  }
615
 
637
  if ( empty( $group_ids ) )
638
  return $paged_groups;
639
 
640
+ // Sanitize group IDs
641
+ $group_ids = implode( ',', wp_parse_id_list( $group_ids ) );
642
+
643
  // Fetch the logged in users status within each group
644
  $user_status = $wpdb->get_col( $wpdb->prepare( "SELECT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id IN ( {$group_ids} ) AND is_confirmed = 1 AND is_banned = 0", bp_loggedin_user_id() ) );
645
  for ( $i = 0, $count = count( $paged_groups ); $i < $count; ++$i ) {
741
  $sql['from'] = "FROM {$bbdb->topics} AS t INNER JOIN {$bp->groups->table_name_groupmeta} AS gm ON t.forum_id = gm.meta_value INNER JOIN {$bp->groups->table_name} AS g ON gm.group_id = g.id";
742
  $sql['where'] = "WHERE gm.meta_key = 'forum_id' {$status_sql} AND t.topic_status = '0' AND t.topic_sticky != '2'";
743
 
744
+ if ( !empty( $search_terms ) ) {
745
+ $st = esc_sql( like_escape( $search_terms ) );
746
  $sql['where'] .= " AND ( t.topic_title LIKE '%{$st}%' )";
747
  }
748
 
1003
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
1004
 
1005
  if ( !empty( $filter ) ) {
1006
+ $filter = esc_sql( like_escape( $filter ) );
1007
  $filter_sql = " AND ( g.name LIKE '%%{$filter}%%' OR g.description LIKE '%%{$filter}%%' )";
1008
  }
1009
 
1025
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
1026
 
1027
  if ( !empty( $filter ) ) {
1028
+ $filter = esc_sql( like_escape( $filter ) );
1029
  $filter_sql = " AND ( g.name LIKE '%%{$filter}%%' OR g.description LIKE '%%{$filter}%%' )";
1030
  }
1031
 
1047
  $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
1048
 
1049
  if ( !empty( $filter ) ) {
1050
+ $filter = esc_sql( like_escape( $filter ) );
1051
  $filter_sql = " AND ( g.name LIKE '%%{$filter}%%' OR g.description LIKE '%%{$filter}%%' )";
1052
  }
1053
 
1078
 
1079
  $pag_sql = ( !empty( $limit ) && !empty( $page ) ) ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ) : '';
1080
 
1081
+ if ( !empty( $exclude ) ) {
1082
+ $exclude = wp_parse_id_list( $exclude );
1083
+ $exclude = $wpdb->escape( implode( ',', $exclude ) );
1084
+ $exclude_sql = " AND g.id NOT IN ({$exclude})";
1085
+ } else {
1086
+ $exclude_sql = '';
1087
+ }
1088
 
1089
  $paged_groups = $wpdb->get_results( $wpdb->prepare( "SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = %d {$exclude_sql} ORDER BY m.date_modified ASC {$pag_sql}", $user_id ) );
1090
  $total_groups = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = %d {$exclude_sql} ORDER BY date_modified ASC", $user_id ) );
1187
  return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND is_banned = 0 AND inviter_id = 0", $user_id, $group_id ) );
1188
  }
1189
 
1190
+ function get_random_groups( $user_id = 0, $total_groups = 5 ) {
1191
  global $wpdb, $bp;
1192
 
1193
  // If the user is logged in and viewing their random groups, we can show hidden and private groups
1194
  if ( bp_is_my_profile() ) {
1195
+ return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND is_confirmed = 1 AND is_banned = 0 ORDER BY rand() LIMIT %d", $user_id, $total_groups ) );
1196
  } else {
1197
+ return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT m.group_id FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND g.status != 'hidden' AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0 ORDER BY rand() LIMIT %d", $user_id, $total_groups ) );
1198
  }
1199
  }
1200
 
1239
 
1240
  $exclude_sql = '';
1241
  if ( !empty( $exclude ) ) {
1242
+ $exclude = wp_parse_id_list( $exclude );
1243
+ $exclude = $wpdb->escape( implode( ',', $exclude ) );
1244
  $exclude_sql = " AND m.user_id NOT IN ({$exclude})";
1245
  }
1246
 
1264
  foreach ( (array) $members as $user )
1265
  $user_ids[] = $user->user_id;
1266
 
1267
+ $user_ids = implode( ',', wp_parse_id_list( $user_ids ) );
1268
 
1269
  if ( bp_is_active( 'friends' ) ) {
1270
  $friend_status = $wpdb->get_results( $wpdb->prepare( "SELECT initiator_user_id, friend_user_id, is_confirmed FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d AND friend_user_id IN ( {$user_ids} ) ) OR (initiator_user_id IN ( {$user_ids} ) AND friend_user_id = %d )", bp_loggedin_user_id(), bp_loggedin_user_id() ) );
bp-languages/buddypress.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: BuddyPress \n"
6
  "Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
7
- "POT-Creation-Date: 2013-04-26 13:36:03+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -464,7 +464,7 @@ msgid "<span>%1$s</span> &mdash; %2$s"
464
  msgstr ""
465
 
466
  #: bp-activity/bp-activity-classes.php:120
467
- #: bp-activity/bp-activity-template.php:120 bp-groups/bp-groups-classes.php:313
468
  #: bp-groups/bp-groups-template.php:114
469
  msgid "Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details."
470
  msgstr ""
@@ -547,8 +547,8 @@ msgstr ""
547
 
548
  #: bp-activity/bp-activity-loader.php:190
549
  #: bp-activity/bp-activity-loader.php:285 bp-core/bp-core-template.php:246
550
- #: bp-groups/bp-groups-activity.php:143 bp-groups/bp-groups-activity.php:179
551
- #: bp-groups/bp-groups-activity.php:215 bp-groups/bp-groups-activity.php:251
552
  #: bp-groups/bp-groups-admin.php:35 bp-groups/bp-groups-admin.php:36
553
  #: bp-groups/bp-groups-admin.php:622 bp-groups/bp-groups-loader.php:517
554
  #: bp-groups/bp-groups-screens.php:893 bp-groups/bp-groups-screens.php:999
@@ -864,15 +864,15 @@ msgstr ""
864
  msgid "Site Wide Activity Feed"
865
  msgstr ""
866
 
867
- #: bp-blogs/bp-blogs-activity.php:29
868
  msgid "New site created"
869
  msgstr ""
870
 
871
- #: bp-blogs/bp-blogs-activity.php:30
872
  msgid "New post published"
873
  msgstr ""
874
 
875
- #: bp-blogs/bp-blogs-activity.php:31
876
  msgid "New post comment posted"
877
  msgstr ""
878
 
@@ -1532,7 +1532,7 @@ msgstr ""
1532
  #: bp-core/bp-core-admin.php:408 bp-core/bp-core-template.php:243
1533
  #: bp-core/bp-core-widgets.php:111 bp-groups/bp-groups-admin.php:764
1534
  #: bp-groups/bp-groups-template.php:1454 bp-members/bp-members-loader.php:24
1535
- #: bp-members/bp-members-screens.php:327
1536
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:231
1537
  #: bp-themes/bp-default/groups/single/admin.php:231
1538
  msgid "Members"
@@ -1823,12 +1823,12 @@ msgstr ""
1823
  msgid "%s Directory"
1824
  msgstr ""
1825
 
1826
- #: bp-core/bp-core-filters.php:365 bp-members/bp-members-screens.php:428
1827
  #: bp-themes/bp-default/registration/register.php:23
1828
  msgid "Create an Account"
1829
  msgstr ""
1830
 
1831
- #: bp-core/bp-core-filters.php:369 bp-members/bp-members-screens.php:436
1832
  #: bp-themes/bp-default/registration/activate.php:13
1833
  msgid "Activate your Account"
1834
  msgstr ""
@@ -2693,75 +2693,75 @@ msgstr ""
2693
  msgid "You successfully left the group."
2694
  msgstr ""
2695
 
2696
- #: bp-groups/bp-groups-activity.php:22
2697
  msgid "Created a group"
2698
  msgstr ""
2699
 
2700
- #: bp-groups/bp-groups-activity.php:23
2701
  msgid "Joined a group"
2702
  msgstr ""
2703
 
2704
- #: bp-groups/bp-groups-activity.php:24
2705
  msgid "New group forum topic"
2706
  msgstr ""
2707
 
2708
- #: bp-groups/bp-groups-activity.php:25
2709
  msgid "New group forum post"
2710
  msgstr ""
2711
 
2712
- #: bp-groups/bp-groups-activity.php:101
2713
  msgid "%1$d new membership requests for the group \"%2$s\""
2714
  msgstr ""
2715
 
2716
- #: bp-groups/bp-groups-activity.php:106
2717
  msgid "Group Membership Requests"
2718
  msgstr ""
2719
 
2720
- #: bp-groups/bp-groups-activity.php:115 bp-groups/bp-groups-activity.php:120
2721
  msgid "%s requests group membership"
2722
  msgstr ""
2723
 
2724
- #: bp-groups/bp-groups-activity.php:138
2725
  msgid "%d accepted group membership requests"
2726
  msgstr ""
2727
 
2728
- #: bp-groups/bp-groups-activity.php:151
2729
  msgid "Membership for group \"%s\" accepted"
2730
  msgstr ""
2731
 
2732
- #: bp-groups/bp-groups-activity.php:174
2733
  msgid "%d rejected group membership requests"
2734
  msgstr ""
2735
 
2736
- #: bp-groups/bp-groups-activity.php:187
2737
  msgid "Membership for group \"%s\" rejected"
2738
  msgstr ""
2739
 
2740
- #: bp-groups/bp-groups-activity.php:210
2741
  msgid "You were promoted to an admin in %d groups"
2742
  msgstr ""
2743
 
2744
- #: bp-groups/bp-groups-activity.php:223
2745
  msgid "You were promoted to an admin in the group \"%s\""
2746
  msgstr ""
2747
 
2748
- #: bp-groups/bp-groups-activity.php:246
2749
  msgid "You were promoted to a mod in %d groups"
2750
  msgstr ""
2751
 
2752
- #: bp-groups/bp-groups-activity.php:259
2753
  msgid "You were promoted to a mod in the group \"%s\""
2754
  msgstr ""
2755
 
2756
- #: bp-groups/bp-groups-activity.php:283
2757
  msgid "You have %d new group invitations"
2758
  msgstr ""
2759
 
2760
- #: bp-groups/bp-groups-activity.php:287
2761
  msgid "Group Invites"
2762
  msgstr ""
2763
 
2764
- #: bp-groups/bp-groups-activity.php:295
2765
  msgid "You have an invitation to the group: %s"
2766
  msgstr ""
2767
 
@@ -3117,11 +3117,11 @@ msgstr ""
3117
  msgid "Group Avatar"
3118
  msgstr ""
3119
 
3120
- #: bp-groups/bp-groups-classes.php:878
3121
  msgid "Group Mod"
3122
  msgstr ""
3123
 
3124
- #: bp-groups/bp-groups-classes.php:884 bp-groups/bp-groups-functions.php:121
3125
  msgid "Group Admin"
3126
  msgstr ""
3127
 
@@ -3913,12 +3913,12 @@ msgstr ""
3913
  msgid "Your account is now active!"
3914
  msgstr ""
3915
 
3916
- #: bp-members/bp-members-screens.php:431
3917
  #: bp-themes/bp-default/registration/register.php:253
3918
  msgid "Sign Up Complete!"
3919
  msgstr ""
3920
 
3921
- #: bp-members/bp-members-screens.php:439
3922
  #: bp-themes/bp-default/registration/activate.php:11
3923
  msgid "Account Activated"
3924
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: BuddyPress \n"
6
  "Report-Msgid-Bugs-To: http://wppolyglots.wordpress.com\n"
7
+ "POT-Creation-Date: 2013-05-15 18:35:23+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
464
  msgstr ""
465
 
466
  #: bp-activity/bp-activity-classes.php:120
467
+ #: bp-activity/bp-activity-template.php:120 bp-groups/bp-groups-classes.php:316
468
  #: bp-groups/bp-groups-template.php:114
469
  msgid "Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details."
470
  msgstr ""
547
 
548
  #: bp-activity/bp-activity-loader.php:190
549
  #: bp-activity/bp-activity-loader.php:285 bp-core/bp-core-template.php:246
550
+ #: bp-groups/bp-groups-activity.php:150 bp-groups/bp-groups-activity.php:186
551
+ #: bp-groups/bp-groups-activity.php:222 bp-groups/bp-groups-activity.php:258
552
  #: bp-groups/bp-groups-admin.php:35 bp-groups/bp-groups-admin.php:36
553
  #: bp-groups/bp-groups-admin.php:622 bp-groups/bp-groups-loader.php:517
554
  #: bp-groups/bp-groups-screens.php:893 bp-groups/bp-groups-screens.php:999
864
  msgid "Site Wide Activity Feed"
865
  msgstr ""
866
 
867
+ #: bp-blogs/bp-blogs-activity.php:31
868
  msgid "New site created"
869
  msgstr ""
870
 
871
+ #: bp-blogs/bp-blogs-activity.php:34
872
  msgid "New post published"
873
  msgstr ""
874
 
875
+ #: bp-blogs/bp-blogs-activity.php:35
876
  msgid "New post comment posted"
877
  msgstr ""
878
 
1532
  #: bp-core/bp-core-admin.php:408 bp-core/bp-core-template.php:243
1533
  #: bp-core/bp-core-widgets.php:111 bp-groups/bp-groups-admin.php:764
1534
  #: bp-groups/bp-groups-template.php:1454 bp-members/bp-members-loader.php:24
1535
+ #: bp-members/bp-members-screens.php:329
1536
  #: bp-templates/bp-legacy/buddypress/groups/single/admin.php:231
1537
  #: bp-themes/bp-default/groups/single/admin.php:231
1538
  msgid "Members"
1823
  msgid "%s Directory"
1824
  msgstr ""
1825
 
1826
+ #: bp-core/bp-core-filters.php:365 bp-members/bp-members-screens.php:430
1827
  #: bp-themes/bp-default/registration/register.php:23
1828
  msgid "Create an Account"
1829
  msgstr ""
1830
 
1831
+ #: bp-core/bp-core-filters.php:369 bp-members/bp-members-screens.php:438
1832
  #: bp-themes/bp-default/registration/activate.php:13
1833
  msgid "Activate your Account"
1834
  msgstr ""
2693
  msgid "You successfully left the group."
2694
  msgstr ""
2695
 
2696
+ #: bp-groups/bp-groups-activity.php:23
2697
  msgid "Created a group"
2698
  msgstr ""
2699
 
2700
+ #: bp-groups/bp-groups-activity.php:24
2701
  msgid "Joined a group"
2702
  msgstr ""
2703
 
2704
+ #: bp-groups/bp-groups-activity.php:30
2705
  msgid "New group forum topic"
2706
  msgstr ""
2707
 
2708
+ #: bp-groups/bp-groups-activity.php:31
2709
  msgid "New group forum post"
2710
  msgstr ""
2711
 
2712
+ #: bp-groups/bp-groups-activity.php:108
2713
  msgid "%1$d new membership requests for the group \"%2$s\""
2714
  msgstr ""
2715
 
2716
+ #: bp-groups/bp-groups-activity.php:113
2717
  msgid "Group Membership Requests"
2718
  msgstr ""
2719
 
2720
+ #: bp-groups/bp-groups-activity.php:122 bp-groups/bp-groups-activity.php:127
2721
  msgid "%s requests group membership"
2722
  msgstr ""
2723
 
2724
+ #: bp-groups/bp-groups-activity.php:145
2725
  msgid "%d accepted group membership requests"
2726
  msgstr ""
2727
 
2728
+ #: bp-groups/bp-groups-activity.php:158
2729
  msgid "Membership for group \"%s\" accepted"
2730
  msgstr ""
2731
 
2732
+ #: bp-groups/bp-groups-activity.php:181
2733
  msgid "%d rejected group membership requests"
2734
  msgstr ""
2735
 
2736
+ #: bp-groups/bp-groups-activity.php:194
2737
  msgid "Membership for group \"%s\" rejected"
2738
  msgstr ""
2739
 
2740
+ #: bp-groups/bp-groups-activity.php:217
2741
  msgid "You were promoted to an admin in %d groups"
2742
  msgstr ""
2743
 
2744
+ #: bp-groups/bp-groups-activity.php:230
2745
  msgid "You were promoted to an admin in the group \"%s\""
2746
  msgstr ""
2747
 
2748
+ #: bp-groups/bp-groups-activity.php:253
2749
  msgid "You were promoted to a mod in %d groups"
2750
  msgstr ""
2751
 
2752
+ #: bp-groups/bp-groups-activity.php:266
2753
  msgid "You were promoted to a mod in the group \"%s\""
2754
  msgstr ""
2755
 
2756
+ #: bp-groups/bp-groups-activity.php:290
2757
  msgid "You have %d new group invitations"
2758
  msgstr ""
2759
 
2760
+ #: bp-groups/bp-groups-activity.php:294
2761
  msgid "Group Invites"
2762
  msgstr ""
2763
 
2764
+ #: bp-groups/bp-groups-activity.php:302
2765
  msgid "You have an invitation to the group: %s"
2766
  msgstr ""
2767
 
3117
  msgid "Group Avatar"
3118
  msgstr ""
3119
 
3120
+ #: bp-groups/bp-groups-classes.php:884
3121
  msgid "Group Mod"
3122
  msgstr ""
3123
 
3124
+ #: bp-groups/bp-groups-classes.php:890 bp-groups/bp-groups-functions.php:121
3125
  msgid "Group Admin"
3126
  msgstr ""
3127
 
3913
  msgid "Your account is now active!"
3914
  msgstr ""
3915
 
3916
+ #: bp-members/bp-members-screens.php:433
3917
  #: bp-themes/bp-default/registration/register.php:253
3918
  msgid "Sign Up Complete!"
3919
  msgstr ""
3920
 
3921
+ #: bp-members/bp-members-screens.php:441
3922
  #: bp-themes/bp-default/registration/activate.php:11
3923
  msgid "Account Activated"
3924
  msgstr ""
bp-loader.php CHANGED
@@ -16,7 +16,7 @@
16
  * Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
17
  * Author: The BuddyPress Community
18
  * Author URI: http://buddypress.org/community/members/
19
- * Version: 1.7.1
20
  * Text Domain: buddypress
21
  * Domain Path: /bp-languages/
22
  * License: GPLv2 or later (license.txt)
@@ -278,7 +278,7 @@ class BuddyPress {
278
 
279
  /** Versions **********************************************************/
280
 
281
- $this->version = '1.7.1';
282
  $this->db_version = 6080;
283
 
284
  /** Loading ***********************************************************/
16
  * Description: Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress.
17
  * Author: The BuddyPress Community
18
  * Author URI: http://buddypress.org/community/members/
19
+ * Version: 1.7.2
20
  * Text Domain: buddypress
21
  * Domain Path: /bp-languages/
22
  * License: GPLv2 or later (license.txt)
278
 
279
  /** Versions **********************************************************/
280
 
281
+ $this->version = '1.7.2';
282
  $this->db_version = 6080;
283
 
284
  /** Loading ***********************************************************/
bp-members/bp-members-screens.php CHANGED
@@ -308,6 +308,8 @@ class BP_Members_Theme_Compat {
308
  if ( bp_is_active( 'activity' ) && bp_is_single_activity() )
309
  return;
310
 
 
 
311
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
312
  add_filter( 'bp_replace_the_content', array( $this, 'single_dummy_content' ) );
313
 
308
  if ( bp_is_active( 'activity' ) && bp_is_single_activity() )
309
  return;
310
 
311
+ do_action( 'bp_members_screen_display_profile' );
312
+
313
  add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
314
  add_filter( 'bp_replace_the_content', array( $this, 'single_dummy_content' ) );
315
 
bp-messages/js/autocomplete/license.bgiframe.txt CHANGED
@@ -1,20 +1,20 @@
1
- Copyright 2010, Brandon Aaron (http://brandonaaron.net/)
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright 2010, Brandon Aaron (http://brandonaaron.net/)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
bp-templates/bp-legacy/buddypress-functions.php CHANGED
@@ -414,7 +414,7 @@ function bp_legacy_theme_ajax_querystring( $query_string, $object ) {
414
 
415
  // If page and search_terms have been passed via the AJAX post request, use those.
416
  if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
417
- $qs[] = 'page=' . $_POST['page'];
418
 
419
  $object_search_text = bp_get_search_default_text( $object );
420
  if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
414
 
415
  // If page and search_terms have been passed via the AJAX post request, use those.
416
  if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
417
+ $qs[] = 'page=' . absint( $_POST['page'] );
418
 
419
  $object_search_text = bp_get_search_default_text( $object );
420
  if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
bp-templates/bp-legacy/js/buddypress.js CHANGED
@@ -899,7 +899,7 @@ jq(document).ready( function() {
899
  });
900
 
901
  /* Add / Remove friendship buttons */
902
- jq(".friendship-button a").on('click', function() {
903
  jq(this).parent().addClass('loading');
904
  var fid = jq(this).attr('id');
905
  fid = fid.split('-');
@@ -949,7 +949,7 @@ jq(document).ready( function() {
949
 
950
  /** Group Join / Leave Buttons **************************************/
951
 
952
- jq(".group-button a").on('click', function() {
953
  var gid = jq(this).parent().attr('id');
954
  gid = gid.split('-');
955
  gid = gid[1];
899
  });
900
 
901
  /* Add / Remove friendship buttons */
902
+ jq('#members-dir-list').on('click', '.friendship-button a', function() {
903
  jq(this).parent().addClass('loading');
904
  var fid = jq(this).attr('id');
905
  fid = fid.split('-');
949
 
950
  /** Group Join / Leave Buttons **************************************/
951
 
952
+ jq('#groups-dir-list').on('click', '.group-button a', function() {
953
  var gid = jq(this).parent().attr('id');
954
  gid = gid.split('-');
955
  gid = gid[1];
bp-themes/bp-default/_inc/ajax.php CHANGED
@@ -124,7 +124,7 @@ function bp_dtheme_ajax_querystring( $query_string, $object ) {
124
 
125
  // If page and search_terms have been passed via the AJAX post request, use those.
126
  if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
127
- $qs[] = 'page=' . $_POST['page'];
128
 
129
  $object_search_text = bp_get_search_default_text( $object );
130
  if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
124
 
125
  // If page and search_terms have been passed via the AJAX post request, use those.
126
  if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] )
127
+ $qs[] = 'page=' . absint( $_POST['page'] );
128
 
129
  $object_search_text = bp_get_search_default_text( $object );
130
  if ( ! empty( $_POST['search_terms'] ) && $object_search_text != $_POST['search_terms'] && 'false' != $_POST['search_terms'] && 'undefined' != $_POST['search_terms'] )
bp-themes/bp-default/license.txt CHANGED
@@ -1,280 +1,280 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
- 675 Mass Ave, Cambridge, MA 02139, USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Library General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
- Thus, it is not the intent of this section to claim rights or contest
124
- your rights to work written entirely by you; rather, the intent is to
125
- exercise the right to control the distribution of derivative or
126
- collective works based on the Program.
127
-
128
- In addition, mere aggregation of another work not based on the Program
129
- with the Program (or with a work based on the Program) on a volume of
130
- a storage or distribution medium does not bring the other work under
131
- the scope of this License.
132
-
133
- 3. You may copy and distribute the Program (or a work based on it,
134
- under Section 2) in object code or executable form under the terms of
135
- Sections 1 and 2 above provided that you also do one of the following:
136
-
137
- a) Accompany it with the complete corresponding machine-readable
138
- source code, which must be distributed under the terms of Sections
139
- 1 and 2 above on a medium customarily used for software interchange; or,
140
-
141
- b) Accompany it with a written offer, valid for at least three
142
- years, to give any third party, for a charge no more than your
143
- cost of physically performing source distribution, a complete
144
- machine-readable copy of the corresponding source code, to be
145
- distributed under the terms of Sections 1 and 2 above on a medium
146
- customarily used for software interchange; or,
147
-
148
- c) Accompany it with the information you received as to the offer
149
- to distribute corresponding source code. (This alternative is
150
- allowed only for noncommercial distribution and only if you
151
- received the program in object code or executable form with such
152
- an offer, in accord with Subsection b above.)
153
-
154
- The source code for a work means the preferred form of the work for
155
- making modifications to it. For an executable work, complete source
156
- code means all the source code for all modules it contains, plus any
157
- associated interface definition files, plus the scripts used to
158
- control compilation and installation of the executable. However, as a
159
- special exception, the source code distributed need not include
160
- anything that is normally distributed (in either source or binary
161
- form) with the major components (compiler, kernel, and so on) of the
162
- operating system on which the executable runs, unless that component
163
- itself accompanies the executable.
164
-
165
- If distribution of executable or object code is made by offering
166
- access to copy from a designated place, then offering equivalent
167
- access to copy the source code from the same place counts as
168
- distribution of the source code, even though third parties are not
169
- compelled to copy the source along with the object code.
170
-
171
- 4. You may not copy, modify, sublicense, or distribute the Program
172
- except as expressly provided under this License. Any attempt
173
- otherwise to copy, modify, sublicense or distribute the Program is
174
- void, and will automatically terminate your rights under this License.
175
- However, parties who have received copies, or rights, from you under
176
- this License will not have their licenses terminated so long as such
177
- parties remain in full compliance.
178
-
179
- 5. You are not required to accept this License, since you have not
180
- signed it. However, nothing else grants you permission to modify or
181
- distribute the Program or its derivative works. These actions are
182
- prohibited by law if you do not accept this License. Therefore, by
183
- modifying or distributing the Program (or any work based on the
184
- Program), you indicate your acceptance of this License to do so, and
185
- all its terms and conditions for copying, distributing or modifying
186
- the Program or works based on it.
187
-
188
- 6. Each time you redistribute the Program (or any work based on the
189
- Program), the recipient automatically receives a license from the
190
- original licensor to copy, distribute or modify the Program subject to
191
- these terms and conditions. You may not impose any further
192
- restrictions on the recipients' exercise of the rights granted herein.
193
- You are not responsible for enforcing compliance by third parties to
194
- this License.
195
-
196
- 7. If, as a consequence of a court judgment or allegation of patent
197
- infringement or for any other reason (not limited to patent issues),
198
- conditions are imposed on you (whether by court order, agreement or
199
- otherwise) that contradict the conditions of this License, they do not
200
- excuse you from the conditions of this License. If you cannot
201
- distribute so as to satisfy simultaneously your obligations under this
202
- License and any other pertinent obligations, then as a consequence you
203
- may not distribute the Program at all. For example, if a patent
204
- license would not permit royalty-free redistribution of the Program by
205
- all those who receive copies directly or indirectly through you, then
206
- the only way you could satisfy both it and this License would be to
207
- refrain entirely from distribution of the Program.
208
-
209
- If any portion of this section is held invalid or unenforceable under
210
- any particular circumstance, the balance of the section is intended to
211
- apply and the section as a whole is intended to apply in other
212
- circumstances.
213
-
214
- It is not the purpose of this section to induce you to infringe any
215
- patents or other property right claims or to contest validity of any
216
- such claims; this section has the sole purpose of protecting the
217
- integrity of the free software distribution system, which is
218
- implemented by public license practices. Many people have made
219
- generous contributions to the wide range of software distributed
220
- through that system in reliance on consistent application of that
221
- system; it is up to the author/donor to decide if he or she is willing
222
- to distribute software through any other system and a licensee cannot
223
- impose that choice.
224
-
225
- This section is intended to make thoroughly clear what is believed to
226
- be a consequence of the rest of this License.
227
-
228
- 8. If the distribution and/or use of the Program is restricted in
229
- certain countries either by patents or by copyrighted interfaces, the
230
- original copyright holder who places the Program under this License
231
- may add an explicit geographical distribution limitation excluding
232
- those countries, so that distribution is permitted only in or among
233
- countries not thus excluded. In such case, this License incorporates
234
- the limitation as if written in the body of this License.
235
-
236
- 9. The Free Software Foundation may publish revised and/or new versions
237
- of the General Public License from time to time. Such new versions will
238
- be similar in spirit to the present version, but may differ in detail to
239
- address new problems or concerns.
240
-
241
- Each version is given a distinguishing version number. If the Program
242
- specifies a version number of this License which applies to it and "any
243
- later version", you have the option of following the terms and conditions
244
- either of that version or of any later version published by the Free
245
- Software Foundation. If the Program does not specify a version number of
246
- this License, you may choose any version ever published by the Free Software
247
- Foundation.
248
-
249
- 10. If you wish to incorporate parts of the Program into other free
250
- programs whose distribution conditions are different, write to the author
251
- to ask for permission. For software which is copyrighted by the Free
252
- Software Foundation, write to the Free Software Foundation; we sometimes
253
- make exceptions for this. Our decision will be guided by the two goals
254
- of preserving the free status of all derivatives of our free software and
255
- of promoting the sharing and reuse of software generally.
256
-
257
- NO WARRANTY
258
-
259
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
260
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
261
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
262
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
263
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
264
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
265
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
266
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
267
- REPAIR OR CORRECTION.
268
-
269
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
270
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
271
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
272
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
273
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
274
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
275
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
276
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
277
- POSSIBILITY OF SUCH DAMAGES.
278
-
279
- END OF TERMS AND CONDITIONS
280
-
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
+ 675 Mass Ave, Cambridge, MA 02139, USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Library General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+ Thus, it is not the intent of this section to claim rights or contest
124
+ your rights to work written entirely by you; rather, the intent is to
125
+ exercise the right to control the distribution of derivative or
126
+ collective works based on the Program.
127
+
128
+ In addition, mere aggregation of another work not based on the Program
129
+ with the Program (or with a work based on the Program) on a volume of
130
+ a storage or distribution medium does not bring the other work under
131
+ the scope of this License.
132
+
133
+ 3. You may copy and distribute the Program (or a work based on it,
134
+ under Section 2) in object code or executable form under the terms of
135
+ Sections 1 and 2 above provided that you also do one of the following:
136
+
137
+ a) Accompany it with the complete corresponding machine-readable
138
+ source code, which must be distributed under the terms of Sections
139
+ 1 and 2 above on a medium customarily used for software interchange; or,
140
+
141
+ b) Accompany it with a written offer, valid for at least three
142
+ years, to give any third party, for a charge no more than your
143
+ cost of physically performing source distribution, a complete
144
+ machine-readable copy of the corresponding source code, to be
145
+ distributed under the terms of Sections 1 and 2 above on a medium
146
+ customarily used for software interchange; or,
147
+
148
+ c) Accompany it with the information you received as to the offer
149
+ to distribute corresponding source code. (This alternative is
150
+ allowed only for noncommercial distribution and only if you
151
+ received the program in object code or executable form with such
152
+ an offer, in accord with Subsection b above.)
153
+
154
+ The source code for a work means the preferred form of the work for
155
+ making modifications to it. For an executable work, complete source
156
+ code means all the source code for all modules it contains, plus any
157
+ associated interface definition files, plus the scripts used to
158
+ control compilation and installation of the executable. However, as a
159
+ special exception, the source code distributed need not include
160
+ anything that is normally distributed (in either source or binary
161
+ form) with the major components (compiler, kernel, and so on) of the
162
+ operating system on which the executable runs, unless that component
163
+ itself accompanies the executable.
164
+
165
+ If distribution of executable or object code is made by offering
166
+ access to copy from a designated place, then offering equivalent
167
+ access to copy the source code from the same place counts as
168
+ distribution of the source code, even though third parties are not
169
+ compelled to copy the source along with the object code.
170
+
171
+ 4. You may not copy, modify, sublicense, or distribute the Program
172
+ except as expressly provided under this License. Any attempt
173
+ otherwise to copy, modify, sublicense or distribute the Program is
174
+ void, and will automatically terminate your rights under this License.
175
+ However, parties who have received copies, or rights, from you under
176
+ this License will not have their licenses terminated so long as such
177
+ parties remain in full compliance.
178
+
179
+ 5. You are not required to accept this License, since you have not
180
+ signed it. However, nothing else grants you permission to modify or
181
+ distribute the Program or its derivative works. These actions are
182
+ prohibited by law if you do not accept this License. Therefore, by
183
+ modifying or distributing the Program (or any work based on the
184
+ Program), you indicate your acceptance of this License to do so, and
185
+ all its terms and conditions for copying, distributing or modifying
186
+ the Program or works based on it.
187
+
188
+ 6. Each time you redistribute the Program (or any work based on the
189
+ Program), the recipient automatically receives a license from the
190
+ original licensor to copy, distribute or modify the Program subject to
191
+ these terms and conditions. You may not impose any further
192
+ restrictions on the recipients' exercise of the rights granted herein.
193
+ You are not responsible for enforcing compliance by third parties to
194
+ this License.
195
+
196
+ 7. If, as a consequence of a court judgment or allegation of patent
197
+ infringement or for any other reason (not limited to patent issues),
198
+ conditions are imposed on you (whether by court order, agreement or
199
+ otherwise) that contradict the conditions of this License, they do not
200
+ excuse you from the conditions of this License. If you cannot
201
+ distribute so as to satisfy simultaneously your obligations under this
202
+ License and any other pertinent obligations, then as a consequence you
203
+ may not distribute the Program at all. For example, if a patent
204
+ license would not permit royalty-free redistribution of the Program by
205
+ all those who receive copies directly or indirectly through you, then
206
+ the only way you could satisfy both it and this License would be to
207
+ refrain entirely from distribution of the Program.
208
+
209
+ If any portion of this section is held invalid or unenforceable under
210
+ any particular circumstance, the balance of the section is intended to
211
+ apply and the section as a whole is intended to apply in other
212
+ circumstances.
213
+
214
+ It is not the purpose of this section to induce you to infringe any
215
+ patents or other property right claims or to contest validity of any
216
+ such claims; this section has the sole purpose of protecting the
217
+ integrity of the free software distribution system, which is
218
+ implemented by public license practices. Many people have made
219
+ generous contributions to the wide range of software distributed
220
+ through that system in reliance on consistent application of that
221
+ system; it is up to the author/donor to decide if he or she is willing
222
+ to distribute software through any other system and a licensee cannot
223
+ impose that choice.
224
+
225
+ This section is intended to make thoroughly clear what is believed to
226
+ be a consequence of the rest of this License.
227
+
228
+ 8. If the distribution and/or use of the Program is restricted in
229
+ certain countries either by patents or by copyrighted interfaces, the
230
+ original copyright holder who places the Program under this License
231
+ may add an explicit geographical distribution limitation excluding
232
+ those countries, so that distribution is permitted only in or among
233
+ countries not thus excluded. In such case, this License incorporates
234
+ the limitation as if written in the body of this License.
235
+
236
+ 9. The Free Software Foundation may publish revised and/or new versions
237
+ of the General Public License from time to time. Such new versions will
238
+ be similar in spirit to the present version, but may differ in detail to
239
+ address new problems or concerns.
240
+
241
+ Each version is given a distinguishing version number. If the Program
242
+ specifies a version number of this License which applies to it and "any
243
+ later version", you have the option of following the terms and conditions
244
+ either of that version or of any later version published by the Free
245
+ Software Foundation. If the Program does not specify a version number of
246
+ this License, you may choose any version ever published by the Free Software
247
+ Foundation.
248
+
249
+ 10. If you wish to incorporate parts of the Program into other free
250
+ programs whose distribution conditions are different, write to the author
251
+ to ask for permission. For software which is copyrighted by the Free
252
+ Software Foundation, write to the Free Software Foundation; we sometimes
253
+ make exceptions for this. Our decision will be guided by the two goals
254
+ of preserving the free status of all derivatives of our free software and
255
+ of promoting the sharing and reuse of software generally.
256
+
257
+ NO WARRANTY
258
+
259
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
260
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
261
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
262
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
263
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
264
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
265
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
266
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
267
+ REPAIR OR CORRECTION.
268
+
269
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
270
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
271
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
272
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
273
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
274
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
275
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
276
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
277
+ POSSIBILITY OF SUCH DAMAGES.
278
+
279
+ END OF TERMS AND CONDITIONS
280
+
bp-themes/bp-default/readme.txt CHANGED
@@ -1,22 +1,22 @@
1
- --- BuddyPress Default ---
2
- Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
3
-
4
-
5
- --- Installation ---
6
- The theme is bundled with BuddyPress. After activating the plugin, BuddyPress Default will be added to the "Appearance > Themes" menu in your WordPress admin area.
7
-
8
-
9
- --- About BuddyPress ---
10
- Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress. BuddyPress will let users register on your site and start creating profiles, posting messages, making connections, creating and interacting in groups and much more.
11
-
12
- For help with BuddyPress Default, or for more information about BuddyPress, please visit http://buddypress.org/.
13
-
14
-
15
- --- Building a BuddyPress theme ---
16
- If you want to make a custom theme based on BuddyPress Default, DO NOT copy and edit it. By doing this you will make updates and maintenance much harder for yourself. Instead, please review this codex page for instructions on how to build a BuddyPress child theme:
17
-
18
- http://codex.buddypress.org/how-to-guides/building-a-buddypress-child-theme/
19
-
20
-
21
- --- Changelog ---
22
  A list of changes is available at http://codex.buddypress.org/theme-development/bp-default-theme-changelog/.
1
+ --- BuddyPress Default ---
2
+ Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
3
+
4
+
5
+ --- Installation ---
6
+ The theme is bundled with BuddyPress. After activating the plugin, BuddyPress Default will be added to the "Appearance > Themes" menu in your WordPress admin area.
7
+
8
+
9
+ --- About BuddyPress ---
10
+ Social networking in a box. Build a social network for your company, school, sports team or niche community all based on the power and flexibility of WordPress. BuddyPress will let users register on your site and start creating profiles, posting messages, making connections, creating and interacting in groups and much more.
11
+
12
+ For help with BuddyPress Default, or for more information about BuddyPress, please visit http://buddypress.org/.
13
+
14
+
15
+ --- Building a BuddyPress theme ---
16
+ If you want to make a custom theme based on BuddyPress Default, DO NOT copy and edit it. By doing this you will make updates and maintenance much harder for yourself. Instead, please review this codex page for instructions on how to build a BuddyPress child theme:
17
+
18
+ http://codex.buddypress.org/how-to-guides/building-a-buddypress-child-theme/
19
+
20
+
21
+ --- Changelog ---
22
  A list of changes is available at http://codex.buddypress.org/theme-development/bp-default-theme-changelog/.
bp-themes/bp-default/rtl.css CHANGED
@@ -2,7 +2,7 @@
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
- * Version: 1.7.1
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
+ * Version: 1.7.2
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
bp-themes/bp-default/style.css CHANGED
@@ -2,7 +2,7 @@
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
- * Version: 1.7.1
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
2
  * Theme Name: BuddyPress Default
3
  * Theme URI: http://buddypress.org/extend/themes/
4
  * Description: Clean and stylish, BuddyPress Default lets you build a social network straight out of the box. Make it yours with a custom menu, header image, and background. Along with five widgetized areas (one in the sidebar, four in the footer), BP-Default supports featured images (as custom header images on posts and pages) and is furnished with an optional one-column page template that removes the sidebar, and a stylesheet for the admin Visual Editor.
5
+ * Version: 1.7.2
6
  * Author: the BuddyPress team
7
  * Author URI: http://buddypress.org
8
  * License: GNU General Public License
bp-xprofile/bp-xprofile-classes.php CHANGED
@@ -1131,7 +1131,7 @@ class BP_XProfile_ProfileData {
1131
  $user_ids = bp_displayed_user_id();
1132
 
1133
  if ( is_array( $user_ids ) ) {
1134
- $user_ids = implode( ',', (array) $user_ids );
1135
  $data = $wpdb->get_results( $wpdb->prepare( "SELECT user_id, value FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id IN ({$user_ids})", $field_id ) );
1136
  } else {
1137
  $data = $wpdb->get_var( $wpdb->prepare( "SELECT value FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d", $field_id, $user_ids ) );
1131
  $user_ids = bp_displayed_user_id();
1132
 
1133
  if ( is_array( $user_ids ) ) {
1134
+ $user_ids = implode( ',', wp_parse_id_list( $user_ids ) );
1135
  $data = $wpdb->get_results( $wpdb->prepare( "SELECT user_id, value FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id IN ({$user_ids})", $field_id ) );
1136
  } else {
1137
  $data = $wpdb->get_var( $wpdb->prepare( "SELECT value FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d", $field_id, $user_ids ) );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: johnjamesjacoby, DJPaul, boonebgorges, r-a-y
3
  Tags: social networking, activity, profiles, messaging, friends, groups, forums, notifications, settings, twitter, facebook, social, community, networks, networking, cms
4
  Requires at least: 3.5
5
  Tested up to: 3.6
6
- Stable tag: 1.7.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -13,12 +13,6 @@ Social networking in a box. Build a social network for your company, school, spo
13
 
14
  BuddyPress lets users sign-up and start creating profiles, posting messages, making connections, creating and interacting in groups, and much more. A social network in a box, BuddyPress lets you easily build a community for your company, school, sports team, or other niche community.
15
 
16
- <h4>Try the Demo</h4>
17
-
18
- If you're interested in seeing what a default installation of BuddyPress has to offer, try out the BuddyPress Test Drive! This site is a community of BuddyPress users looking to try out and discuss the latest features of BuddyPress.
19
-
20
- <a href="http://testbp.org/">BuddyPress Test Drive</a>
21
-
22
  <h4>Who's Using BuddyPress?</h4>
23
 
24
  Take a look at some of the best sites on the <a href="http://buddypress.org/showcase/">BuddyPress Showcase</a>.
@@ -83,6 +77,9 @@ BuddyPress is available in more than 20 languages. For more information, check o
83
 
84
  == Upgrade Notice ==
85
 
 
 
 
86
  = 1.7.1 =
87
  See: http://codex.buddypress.org/releases/version-1-7-1/
88
 
@@ -121,6 +118,14 @@ Fixes over 10 bugs.
121
 
122
  == Changelog ==
123
 
124
- See http://codex.buddypress.org/releases/version-1-6/ for 1.6.
125
- See http://codex.buddypress.org/releases/version-1-5/ for 1.5.
126
- See http://buddypress.org/about/release-history/ for all other versions.
 
 
 
 
 
 
 
 
3
  Tags: social networking, activity, profiles, messaging, friends, groups, forums, notifications, settings, twitter, facebook, social, community, networks, networking, cms
4
  Requires at least: 3.5
5
  Tested up to: 3.6
6
+ Stable tag: 1.7.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
13
 
14
  BuddyPress lets users sign-up and start creating profiles, posting messages, making connections, creating and interacting in groups, and much more. A social network in a box, BuddyPress lets you easily build a community for your company, school, sports team, or other niche community.
15
 
 
 
 
 
 
 
16
  <h4>Who's Using BuddyPress?</h4>
17
 
18
  Take a look at some of the best sites on the <a href="http://buddypress.org/showcase/">BuddyPress Showcase</a>.
77
 
78
  == Upgrade Notice ==
79
 
80
+ = 1.7.2 =
81
+ See: http://codex.buddypress.org/releases/version-1-7-2/
82
+
83
  = 1.7.1 =
84
  See: http://codex.buddypress.org/releases/version-1-7-1/
85
 
118
 
119
  == Changelog ==
120
 
121
+ = 1.7 =
122
+ See: http://codex.buddypress.org/releases/version-1-7/
123
+
124
+ = 1.6 =
125
+ See: http://codex.buddypress.org/releases/version-1-6/
126
+
127
+ = 1.5 =
128
+ See: http://codex.buddypress.org/releases/version-1-5/
129
+
130
+ = Older =
131
+ See: http://buddypress.org/about/release-history/