Changeset 11091
- Timestamp:
- 09/13/2016 05:35:55 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-actions.php
r10825 r11091 72 72 73 73 // Set redirect to group activity stream. 74 if ( $group = groups_get_group( array( 'group_id' => $activity->item_id )) ) {74 if ( $group = groups_get_group( $activity->item_id ) ) { 75 75 $redirect = bp_get_group_permalink( $group ) . bp_get_activity_slug() . '/' . $activity->id . '/'; 76 76 } -
trunk/src/bp-activity/bp-activity-screens.php
r10880 r11091 237 237 // Check to see if the group is not public, if so, check the 238 238 // user has access to see this activity. 239 if ( $group = groups_get_group( array( 'group_id' => $activity->item_id )) ) {239 if ( $group = groups_get_group( $activity->item_id ) ) { 240 240 241 241 // Group is not public. -
trunk/src/bp-activity/bp-activity-template.php
r11066 r11091 1178 1178 // Only if groups is active. 1179 1179 if ( bp_is_active( 'groups' ) ) { 1180 $group = groups_get_group( array( 1181 'group_id' => $item_id, 1182 'populate_extras' => false, 1183 'update_meta_cache' => false, 1184 ) ); 1180 $group = groups_get_group( $item_id ); 1185 1181 $link = bp_get_group_permalink( $group ); 1186 1182 $name = $group->name; -
trunk/src/bp-core/bp-core-attachments.php
r11068 r11091 56 56 // Fix for HTTPS. 57 57 if ( 'baseurl' === $key && is_ssl() ) { 58 $upload_data[ $key ] = str_replace( 'http://', 'https://', $upload_data[ $key ] ); 58 $upload_data[ $key ] = str_replace( 'http://', 'https://', $upload_data[ $key ] ); 59 59 } 60 60 } else { … … 1248 1248 if ( ! bp_get_current_group_id() && ! empty( $bp_params['item_id'] ) ) { 1249 1249 $needs_reset = array( 'component' => 'groups', 'key' => 'current_group', 'value' => $bp->groups->current_group ); 1250 $bp->groups->current_group = groups_get_group( array( 1251 'group_id' => $bp_params['item_id'], 1252 'populate_extras' => false, 1253 ) ); 1250 $bp->groups->current_group = groups_get_group( $bp_params['item_id'] ); 1254 1251 } 1255 1252 -
trunk/src/bp-core/bp-core-avatars.php
r10899 r11091 314 314 315 315 case 'group' : 316 $item_name = bp_get_group_name( groups_get_group( array( 'group_id' => $params['item_id'] )) );316 $item_name = bp_get_group_name( groups_get_group( $params['item_id'] ) ); 317 317 break; 318 318 … … 1006 1006 if ( ! bp_get_current_group_id() && ! empty( $bp_params['item_id'] ) ) { 1007 1007 $needs_reset = array( 'component' => 'groups', 'key' => 'current_group', 'value' => $bp->groups->current_group ); 1008 $bp->groups->current_group = groups_get_group( array( 1009 'group_id' => $bp_params['item_id'], 1010 'populate_extras' => false, 1011 ) ); 1008 $bp->groups->current_group = groups_get_group( $bp_params['item_id'] ); 1012 1009 } 1013 1010 } else { -
trunk/src/bp-groups/bp-groups-actions.php
r10981 r11091 159 159 if ( isset( $_COOKIE['bp_new_group_id'] ) ) { 160 160 $bp->groups->new_group_id = (int) $_COOKIE['bp_new_group_id']; 161 $bp->groups->current_group = groups_get_group( array( 'group_id' => $bp->groups->new_group_id ));161 $bp->groups->current_group = groups_get_group( $bp->groups->new_group_id ); 162 162 163 163 // Only allow the group creator to continue to edit the new group. -
trunk/src/bp-groups/bp-groups-activity.php
r10858 r11091 99 99 $user_link = bp_core_get_userlink( $activity->user_id ); 100 100 101 $group = groups_get_group( array( 102 'group_id' => $activity->item_id, 103 'populate_extras' => false, 104 ) ); 101 $group = groups_get_group( $activity->item_id ); 105 102 $group_link = '<a href="' . esc_url( bp_get_group_permalink( $group ) ) . '">' . esc_html( $group->name ) . '</a>'; 106 103 … … 130 127 $user_link = bp_core_get_userlink( $activity->user_id ); 131 128 132 $group = groups_get_group( array( 133 'group_id' => $activity->item_id, 134 'populate_extras' => false, 135 ) ); 129 $group = groups_get_group( $activity->item_id ); 136 130 $group_link = '<a href="' . esc_url( bp_get_group_permalink( $group ) ) . '">' . esc_html( $group->name ) . '</a>'; 137 131 … … 172 166 $user_link = bp_core_get_userlink( $activity->user_id ); 173 167 174 $group = groups_get_group( array( 175 'group_id' => $activity->item_id, 176 'populate_extras' => false, 177 ) ); 168 $group = groups_get_group( $activity->item_id ); 178 169 $group_link = '<a href="' . esc_url( bp_get_group_permalink( $group ) ) . '">' . esc_html( $group->name ) . '</a>'; 179 170 … … 361 352 $group = groups_get_current_group(); 362 353 } else { 363 $group = groups_get_group( array( 'group_id' => $args['item_id'] ));354 $group = groups_get_group( $args['item_id'] ); 364 355 } 365 356 … … 431 422 432 423 // Get the group so we can get it's name. 433 $group = groups_get_group( array( 'group_id' => $group_id ));424 $group = groups_get_group( $group_id ); 434 425 435 426 /** -
trunk/src/bp-groups/bp-groups-admin.php
r10985 r11091 228 228 229 229 // Get the group from the database. 230 $group = groups_get_group( 'group_id=' .$group_id );230 $group = groups_get_group( $group_id ); 231 231 232 232 // If the group doesn't exist, just redirect back to the index. … … 567 567 568 568 // Get the group from the database. 569 $group = groups_get_group( 'group_id=' .(int) $_GET['gid'] );569 $group = groups_get_group( (int) $_GET['gid'] ); 570 570 571 571 $group_name = isset( $group->name ) ? bp_get_group_name( $group ) : ''; -
trunk/src/bp-groups/bp-groups-filters.php
r10750 r11091 316 316 317 317 if ( 'groups' === $activity->component ) { 318 $group = groups_get_group( array( 'group_id' => $activity->item_id ));318 $group = groups_get_group( $activity->item_id ); 319 319 if ( 'public' !== $group->status && ! groups_is_user_member( $user_id, $group->id ) ) { 320 320 $send = false; -
trunk/src/bp-groups/bp-groups-forums.php
r10417 r11091 71 71 function groups_update_group_forum( $group_id ) { 72 72 73 $group = groups_get_group( array( 'group_id' => $group_id ));73 $group = groups_get_group( $group_id ); 74 74 75 75 /** -
trunk/src/bp-groups/bp-groups-functions.php
r11090 r11091 43 43 * @return BP_Groups_Group $group The group object. 44 44 */ 45 function groups_get_group( $ args = '') {45 function groups_get_group( $group_id ) { 46 46 // Backward compatibilty. 47 if ( is_array( $ args ) && isset( $args['group_id'] ) ) {48 $group_id = $ args['group_id'];47 if ( is_array( $group_id ) && isset( $group_id['group_id'] ) ) { 48 $group_id = $group_id['group_id']; 49 49 } 50 50 … … 105 105 // Pass an existing group ID. 106 106 if ( ! empty( $group_id ) ) { 107 $group = groups_get_group( array( 'group_id' => $group_id ));107 $group = groups_get_group( $group_id ); 108 108 $name = ! empty( $name ) ? $name : $group->name; 109 109 $slug = ! empty( $slug ) ? $slug : $group->slug; … … 219 219 return false; 220 220 221 $group = groups_get_group( array( 'group_id' => $group_id ));221 $group = groups_get_group( $group_id ); 222 222 $old_group = clone $group; 223 223 … … 263 263 function groups_edit_group_settings( $group_id, $enable_forum, $status, $invite_status = false ) { 264 264 265 $group = groups_get_group( array( 'group_id' => $group_id ));265 $group = groups_get_group( $group_id ); 266 266 $group->enable_forum = $enable_forum; 267 267 … … 324 324 325 325 // Get the group object. 326 $group = groups_get_group( array( 'group_id' => $group_id ));326 $group = groups_get_group( $group_id ); 327 327 328 328 // Bail if group cannot be deleted. … … 396 396 */ 397 397 function groups_get_slug( $group_id ) { 398 $group = groups_get_group( array( 'group_id' => $group_id ));398 $group = groups_get_group( $group_id ); 399 399 return !empty( $group->slug ) ? $group->slug : ''; 400 400 } … … 498 498 499 499 if ( !isset( $bp->groups->current_group ) || !$bp->groups->current_group || $group_id != $bp->groups->current_group->id ) 500 $group = groups_get_group( array( 'group_id' => $group_id ));500 $group = groups_get_group( $group_id ); 501 501 else 502 502 $group = $bp->groups->current_group; … … 1195 1195 return false; 1196 1196 1197 $bp->groups->current_group = groups_get_group( array( 'group_id' => $group_id ));1197 $bp->groups->current_group = groups_get_group( $group_id ); 1198 1198 1199 1199 // Be sure the user is a member of the group before posting. … … 1503 1503 // Send friend invites. 1504 1504 $invited_users = groups_get_invites_for_group( $user_id, $group_id ); 1505 $group = groups_get_group( array( 'group_id' => $group_id ));1505 $group = groups_get_group( $group_id ); 1506 1506 1507 1507 for ( $i = 0, $count = count( $invited_users ); $i < $count; ++$i ) { -
trunk/src/bp-groups/bp-groups-notifications.php
r10941 r11091 25 25 */ 26 26 function groups_notification_group_updated( $group_id = 0, $old_group = null ) { 27 $group = groups_get_group( array( 'group_id' => $group_id ));27 $group = groups_get_group( $group_id ); 28 28 29 29 if ( $old_group instanceof BP_Groups_Group ) { … … 136 136 ); 137 137 138 $group = groups_get_group( array( 'group_id' => $group_id ));138 $group = groups_get_group( $group_id ); 139 139 $args = array( 140 140 'tokens' => array( … … 185 185 } 186 186 187 $group = groups_get_group( array( 'group_id' => $group_id ));187 $group = groups_get_group( $group_id ); 188 188 $args = array( 189 189 'tokens' => array( … … 261 261 ); 262 262 263 $group = groups_get_group( array( 'group_id' => $group_id ));263 $group = groups_get_group( $group_id ); 264 264 $args = array( 265 265 'tokens' => array( … … 357 357 $requesting_user_id = $secondary_item_id; 358 358 359 $group = groups_get_group( array( 'group_id' => $group_id ));359 $group = groups_get_group( $group_id ); 360 360 $group_link = bp_get_group_permalink( $group ); 361 361 $amount = 'single'; … … 461 461 $group_id = $item_id; 462 462 463 $group = groups_get_group( array( 'group_id' => $group_id ));463 $group = groups_get_group( $group_id ); 464 464 $group_link = bp_get_group_permalink( $group ); 465 465 $amount = 'single'; … … 550 550 $group_id = $item_id; 551 551 552 $group = groups_get_group( array( 'group_id' => $group_id ));552 $group = groups_get_group( $group_id ); 553 553 $group_link = bp_get_group_permalink( $group ); 554 554 $amount = 'single'; … … 638 638 $group_id = $item_id; 639 639 640 $group = groups_get_group( array( 'group_id' => $group_id ));640 $group = groups_get_group( $group_id ); 641 641 $group_link = bp_get_group_permalink( $group ); 642 642 $amount = 'single'; … … 720 720 $group_id = $item_id; 721 721 722 $group = groups_get_group( array( 'group_id' => $group_id ));722 $group = groups_get_group( $group_id ); 723 723 $group_link = bp_get_group_permalink( $group ); 724 724 $amount = 'single'; … … 801 801 case 'group_invite': 802 802 $group_id = $item_id; 803 $group = groups_get_group( array( 'group_id' => $group_id ));803 $group = groups_get_group( $group_id ); 804 804 $group_link = bp_get_group_permalink( $group ); 805 805 $amount = 'single'; -
trunk/src/bp-groups/bp-groups-screens.php
r10828 r11091 90 90 91 91 // Record this in activity streams. 92 $group = groups_get_group( array( 'group_id' => $group_id ));92 $group = groups_get_group( $group_id ); 93 93 94 94 groups_record_activity( array( -
trunk/src/bp-groups/bp-groups-template.php
r11086 r11091 1374 1374 } 1375 1375 1376 // Fetch group admins if 'populate_extras' flag is false.1377 if ( empty( $group->args['populate_extras'] ) ) {1378 $query = new BP_Group_Member_Query( array(1379 'group_id' => $group->id,1380 'group_role' => 'admin',1381 'type' => 'first_joined',1382 ) );1383 1384 if ( ! empty( $query->results ) ) {1385 $group->admins = $query->results;1386 }1387 }1388 1389 1376 if ( ! empty( $group->admins ) ) { ?> 1390 1377 <ul id="group-admins"> … … 1414 1401 if ( empty( $group ) ) { 1415 1402 $group =& $groups_template->group; 1416 }1417 1418 // Fetch group mods if 'populate_extras' flag is false.1419 if ( empty( $group->args['populate_extras'] ) ) {1420 $query = new BP_Group_Member_Query( array(1421 'group_id' => $group->id,1422 'group_role' => 'mod',1423 'type' => 'first_joined',1424 ) );1425 1426 if ( ! empty( $query->results ) ) {1427 $group->mods = $query->results;1428 }1429 1403 } 1430 1404 -
trunk/src/bp-groups/classes/class-bp-group-extension.php
r10905 r11091 584 584 $this->params['access'] = 'noone'; 585 585 } else { 586 $group = groups_get_group( array( 587 'group_id' => $this->group_id, 588 ) ); 586 $group = groups_get_group( $this->group_id ); 589 587 590 588 if ( ! empty( $group->status ) && 'public' === $group->status ) { … … 669 667 */ 670 668 protected function user_meets_access_condition( $access_condition ) { 671 $group = groups_get_group( array( 672 'group_id' => $this->group_id, 673 ) ); 669 $group = groups_get_group( $this->group_id ); 674 670 675 671 switch ( $access_condition ) { … … 851 847 852 848 if ( ! $user_can_visit && is_user_logged_in() ) { 853 $current_group = groups_get_group( array( 854 'group_id' => $this->group_id, 855 ) ); 849 $current_group = groups_get_group( $this->group_id ); 856 850 857 851 $no_access_args['message'] = __( 'You do not have access to this content.', 'buddypress' ); -
trunk/src/bp-groups/classes/class-bp-groups-component.php
r11089 r11091 205 205 206 206 if ( $current_group_class == 'BP_Groups_Group' ) { 207 $this->current_group = groups_get_group( array( 208 'group_id' => $group_id, 209 'populate_extras' => true, 210 ) ); 207 $this->current_group = groups_get_group( $group_id ); 211 208 212 209 } else { -
trunk/src/bp-groups/classes/class-bp-groups-group-members-template.php
r11083 r11091 137 137 $current_group = groups_get_current_group(); 138 138 if ( empty( $current_group ) || ( $current_group && $current_group->id !== bp_get_current_group_id() ) ) { 139 $current_group = groups_get_group( array( 'group_id' => $r['group_id'] ));139 $current_group = groups_get_group( $r['group_id'] ); 140 140 } 141 141 -
trunk/src/bp-groups/classes/class-bp-groups-list-table.php
r10882 r11091 140 140 // If we're viewing a specific group, flatten all activities into a single array. 141 141 if ( $include_id ) { 142 $groups = array( (array) groups_get_group( 'group_id=' .$include_id ) );142 $groups = array( (array) groups_get_group( $include_id ) ); 143 143 } else { 144 144 $groups_args = array( -
trunk/src/bp-groups/classes/class-bp-groups-member-suggestions.php
r10417 r11091 66 66 67 67 // Check that the specified group_id exists, and that the current user can access it. 68 $the_group = groups_get_group( array( 69 'group_id' => absint( $this->args['group_id'] ), 70 'populate_extras' => true, 71 ) ); 68 $the_group = groups_get_group( absint( $this->args['group_id'] ) ); 72 69 73 70 if ( $the_group->id === 0 || ! $the_group->user_has_access ) { -
trunk/src/bp-groups/classes/class-bp-groups-template.php
r11086 r11091 196 196 197 197 } else { 198 $group = groups_get_group( array( 199 'group_id' => BP_Groups_Group::get_id_from_slug( $r['slug'] ), 200 'populate_extras' => $r['populate_extras'], 201 ) ); 198 $group = groups_get_group( BP_Groups_Group::get_id_from_slug( $r['slug'] ) ); 202 199 } 203 200 -
trunk/src/bp-templates/bp-legacy/buddypress-functions.php
r11070 r11091 1449 1449 return; 1450 1450 1451 if ( ! $group = groups_get_group( array( 'group_id' => $group_id )) )1451 if ( ! $group = groups_get_group( $group_id ) ) 1452 1452 return; 1453 1453 -
trunk/tests/phpunit/testcases/activity/template.php
r10545 r11091 1032 1032 ) ); 1033 1033 1034 $bp->groups->current_group = groups_get_group( array( 1035 'group_id' => $g, 1036 'populate_extras' => true, 1037 ) ); 1034 $bp->groups->current_group = groups_get_group( $g ); 1038 1035 1039 1036 // On group's home the scope is set to 'home' … … 1089 1086 ) ); 1090 1087 1091 $bp->groups->current_group = groups_get_group( array( 1092 'group_id' => $g, 1093 'populate_extras' => true, 1094 ) ); 1088 $bp->groups->current_group = groups_get_group( $g ); 1095 1089 1096 1090 // On group's home the scope is set to 'home' -
trunk/tests/phpunit/testcases/core/class-bp-attachment.php
r10983 r11091 276 276 $g = $this->factory->group->create(); 277 277 278 $bp->groups->current_group = groups_get_group( array( 279 'group_id' => $g, 280 'populate_extras' => true, 281 ) ); 278 $bp->groups->current_group = groups_get_group( $g ); 282 279 283 280 // Upload the file -
trunk/tests/phpunit/testcases/core/nav/backCompat.php
r10745 r11091 50 50 ) ); 51 51 52 $group = groups_get_group( array( 'group_id' => $g ));52 $group = groups_get_group( $g ); 53 53 $group_permalink = bp_get_group_permalink( $group ); 54 54 -
trunk/tests/phpunit/testcases/core/nav/bpCoreMaybeHookNewSubnavScreenFunction.php
r10745 r11091 149 149 $this->set_current_user( $u ); 150 150 151 $group = groups_get_group( array( 152 'group_id' => $g, 153 ) ); 151 $group = groups_get_group( $g ); 154 152 155 153 $this->go_to( bp_get_group_permalink( $group ) ); … … 175 173 $this->set_current_user( $u ); 176 174 177 $group = groups_get_group( array( 178 'group_id' => $g, 179 ) ); 175 $group = groups_get_group( $g ); 180 176 181 177 $this->go_to( bp_get_group_permalink( $group ) ); -
trunk/tests/phpunit/testcases/core/nav/bpCoreNewNavItem.php
r10745 r11091 57 57 $this->set_current_user( $u ); 58 58 59 $group = groups_get_group( array( 60 'group_id' => $g, 61 ) ); 59 $group = groups_get_group( $g ); 62 60 63 61 $this->go_to( bp_get_group_permalink( $group ) ); -
trunk/tests/phpunit/testcases/core/nav/bpCoreRemoveSubnavItem.php
r10876 r11091 76 76 77 77 // In group context 78 $g_obj = groups_get_group( array( 'group_id' => $g1 ));78 $g_obj = groups_get_group( $g1 ); 79 79 $this->go_to( bp_get_group_permalink( $g_obj ) ); 80 80 -
trunk/tests/phpunit/testcases/groups/activity.php
r9819 r11091 21 21 22 22 $a_obj = new BP_Activity_Activity( $a ); 23 $g_obj = groups_get_group( array( 'group_id' => $g, ));23 $g_obj = groups_get_group( $g ); 24 24 25 25 $expected = sprintf( __( '%s created the group %s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . bp_get_group_permalink( $g_obj ) . '">' . $g_obj->name . '</a>' ); … … 43 43 44 44 $a_obj = new BP_Activity_Activity( $a ); 45 $g_obj = groups_get_group( array( 'group_id' => $g, ));45 $g_obj = groups_get_group( $g ); 46 46 47 47 $expected = sprintf( __( '%s joined the group %s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . bp_get_group_permalink( $g_obj ) . '">' . $g_obj->name . '</a>' ); -
trunk/tests/phpunit/testcases/groups/cache.php
r11087 r11091 74 74 75 75 // Prime cache 76 groups_get_group( array( 'group_id' => $g, ));76 groups_get_group( $g ); 77 77 78 78 $this->assertNotEmpty( wp_cache_get( $g, 'bp_groups' ) ); … … 93 93 // Prime cache 94 94 groups_update_groupmeta( $g, 'foo', 'bar' ); 95 groups_get_group( array( 'group_id' => $g ));95 groups_get_group( $g ); 96 96 97 97 $this->assertNotEmpty( wp_cache_get( $g, 'bp_groups' ) ); … … 109 109 110 110 // Prime cache 111 groups_get_group( array( 'group_id' => $g ));111 groups_get_group( $g ); 112 112 113 113 // fake an activity … … 134 134 135 135 // Prime cache 136 groups_get_group( array( 'group_id' => $g1 ));136 groups_get_group( $g1 ); 137 137 138 138 // fake activities -
trunk/tests/phpunit/testcases/groups/class-bp-group-extension.php
r10905 r11091 224 224 225 225 $g = $this->factory->group->create(); 226 $g_obj = groups_get_group( array( 'group_id' => $g ));226 $g_obj = groups_get_group( $g ); 227 227 228 228 $class_name = 'BPTest_Group_Extension_Enable_Nav_Item_True'; … … 247 247 248 248 $g = $this->factory->group->create(); 249 $g_obj = groups_get_group( array( 'group_id' => $g ));249 $g_obj = groups_get_group( $g ); 250 250 251 251 $class_name = 'BPTest_Group_Extension_Enable_Nav_Item_False'; … … 273 273 'status' => 'private', 274 274 ) ); 275 $g_obj = groups_get_group( array( 'group_id' => $g ));275 $g_obj = groups_get_group( $g ); 276 276 277 277 $class_name = 'BPTest_Group_Extension_Visibility_Private'; … … 317 317 'status' => 'private', 318 318 ) ); 319 $g_obj = groups_get_group( array( 'group_id' => $g ));319 $g_obj = groups_get_group( $g ); 320 320 321 321 $class_name = 'BPTest_Group_Extension_Visibility_Public'; … … 353 353 'status' => 'public', 354 354 ) ); 355 $g_obj = groups_get_group( array( 'group_id' => $g ));355 $g_obj = groups_get_group( $g ); 356 356 $this->go_to( bp_get_group_permalink( $g_obj ) ); 357 357 … … 379 379 'status' => 'public', 380 380 ) ); 381 $g_obj = groups_get_group( array( 'group_id' => $g ));381 $g_obj = groups_get_group( $g ); 382 382 $this->go_to( bp_get_group_permalink( $g_obj ) ); 383 383 … … 416 416 'status' => 'public', 417 417 ) ); 418 $g_obj = groups_get_group( array( 'group_id' => $g ));418 $g_obj = groups_get_group( $g ); 419 419 420 420 $u = $this->factory->user->create(); … … 458 458 'status' => 'public', 459 459 ) ); 460 $g_obj = groups_get_group( array( 'group_id' => $g ));460 $g_obj = groups_get_group( $g ); 461 461 462 462 $u = $this->factory->user->create(); … … 502 502 'status' => 'public', 503 503 ) ); 504 $g_obj = groups_get_group( array( 'group_id' => $g ));504 $g_obj = groups_get_group( $g ); 505 505 506 506 $u = $this->factory->user->create(); … … 548 548 'status' => 'public', 549 549 ) ); 550 $g_obj = groups_get_group( array( 'group_id' => $g ));550 $g_obj = groups_get_group( $g ); 551 551 552 552 $u = $this->factory->user->create(); … … 594 594 'status' => 'public', 595 595 ) ); 596 $g_obj = groups_get_group( array( 'group_id' => $g ));596 $g_obj = groups_get_group( $g ); 597 597 598 598 $old_current_user = get_current_user_id(); … … 635 635 'status' => 'public', 636 636 ) ); 637 $g_obj = groups_get_group( array( 'group_id' => $g ));637 $g_obj = groups_get_group( $g ); 638 638 639 639 $old_current_user = get_current_user_id(); … … 676 676 'status' => 'public', 677 677 ) ); 678 $g_obj = groups_get_group( array( 'group_id' => $g ));678 $g_obj = groups_get_group( $g ); 679 679 680 680 $u = $this->factory->user->create(); … … 718 718 'status' => 'public', 719 719 ) ); 720 $g_obj = groups_get_group( array( 'group_id' => $g ));720 $g_obj = groups_get_group( $g ); 721 721 722 722 $u = $this->factory->user->create(); … … 762 762 'status' => 'public', 763 763 ) ); 764 $g_obj = groups_get_group( array( 'group_id' => $g ));764 $g_obj = groups_get_group( $g ); 765 765 766 766 $u = $this->factory->user->create(); … … 808 808 'status' => 'public', 809 809 ) ); 810 $g_obj = groups_get_group( array( 'group_id' => $g ));810 $g_obj = groups_get_group( $g ); 811 811 812 812 $u = $this->factory->user->create(); … … 854 854 'status' => 'public', 855 855 ) ); 856 $g_obj = groups_get_group( array( 'group_id' => $g ));856 $g_obj = groups_get_group( $g ); 857 857 858 858 $this->go_to( bp_get_group_permalink( $g_obj ) ); … … 875 875 'status' => 'public', 876 876 ) ); 877 $g_obj = groups_get_group( array( 'group_id' => $g ));877 $g_obj = groups_get_group( $g ); 878 878 879 879 $this->go_to( trailingslashit( bp_get_group_permalink( $g_obj ) ) . 'members/' ); -
trunk/tests/phpunit/testcases/groups/class-bp-groups-group.php
r11089 r11091 644 644 $this->assertEmpty( $found1['groups'] ); 645 645 646 $group0 = groups_get_group( array( 'group_id' => $groups[0] ));646 $group0 = groups_get_group( $groups[0] ); 647 647 $group0->name = 'Foo'; 648 648 $group0->save(); … … 669 669 $this->assertEqualSets( $groups, wp_list_pluck( $found1['groups'], 'id' ) ); 670 670 671 $group0 = groups_get_group( array( 'group_id' => $groups[0] ));671 $group0 = groups_get_group( $groups[0] ); 672 672 $group0->delete(); 673 673 … … 1004 1004 1005 1005 // Prime cache 1006 groups_get_group( array( 'group_id' => $g, ));1006 groups_get_group( $g ); 1007 1007 1008 1008 $this->assertNotEmpty( wp_cache_get( $g, 'bp_groups' ) ); … … 1022 1022 1023 1023 // Prime cache 1024 groups_get_group( array( 'group_id' => $g, ));1024 groups_get_group( $g ); 1025 1025 1026 1026 $this->assertNotEmpty( wp_cache_get( $g, 'bp_groups' ) ); -
trunk/tests/phpunit/testcases/groups/class-bp-groups-member.php
r10819 r11091 245 245 $this->assertFalse( bp_groups_user_can_send_invites( null, $u_members ) ); 246 246 // In group context 247 $g_obj = groups_get_group( array( 'group_id' => $g ));247 $g_obj = groups_get_group( $g ); 248 248 $this->go_to( bp_get_group_permalink( $g_obj ) ); 249 249 groups_update_groupmeta( $g, 'invite_status', 'mods' ); -
trunk/tests/phpunit/testcases/groups/functions.php
r11089 r11091 293 293 $g = $this->factory->group->create(); 294 294 295 $group_before = groups_get_group( array( 296 'group_id' => $g, 297 ) ); 298 295 $group_before = groups_get_group( $g ); 299 296 groups_create_group( array( 300 297 'group_id' => $g, … … 302 299 ) ); 303 300 304 $group_after = groups_get_group( array( 305 'group_id' => $g, 306 ) ); 307 301 $group_after = groups_get_group( $g ); 308 302 $this->assertSame( $group_before->description, $group_after->description ); 309 303 } -
trunk/tests/phpunit/testcases/groups/template/bpGroupStatusMessage.php
r9819 r11091 121 121 $this->set_current_user( $u ); 122 122 123 $group = groups_get_group( array( 124 'group_id' => $g, 125 'populate_extras' => true, 126 ) ); 123 $group = groups_get_group( $g ); 127 124 128 125 $found = get_echo( 'bp_group_status_message', array( $group ) ); … … 143 140 // Fake the current group. 144 141 $GLOBALS['groups_template'] = new stdClass; 145 $GLOBALS['groups_template']->group = groups_get_group( array( 146 'group_id' => $groups[0], 147 'populate_extras' => true, 148 ) ); 142 $GLOBALS['groups_template']->group = groups_get_group( $groups[0] ); 149 143 150 144 groups_send_membership_request( $u, $groups[1] );
Note: See TracChangeset
for help on using the changeset viewer.