Changeset 5687
- Timestamp:
- 02/09/2012 11:00:59 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-template.php
r5480 r5687 775 775 } 776 776 function bp_get_the_topic_is_mine() { 777 global $ bp, $forum_template;777 global $forum_template; 778 778 779 779 return bp_loggedin_user_id() == $forum_template->topic->topic_poster; … … 784 784 } 785 785 function bp_get_the_topic_admin_links( $args = '' ) { 786 global $ bp, $forum_template;786 global $forum_template; 787 787 788 788 $defaults = array( … … 795 795 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit Topic', 'buddypress' ) . '</a>'; 796 796 797 if ( $bp->is_item_admin || $bp->is_item_mod|| bp_current_user_can( 'bp_moderate' ) ) {797 if ( bp_is_item_admin() || bp_is_item_mod() || bp_current_user_can( 'bp_moderate' ) ) { 798 798 if ( 0 == (int)$forum_template->topic->topic_sticky ) 799 799 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky Topic', 'buddypress' ) . '</a>'; -
trunk/bp-groups/bp-groups-buddybar.php
r5329 r5687 4 4 5 5 function bp_groups_adminbar_admin_menu() { 6 global $bp , $groups_template;6 global $bp; 7 7 8 8 if ( empty( $bp->groups->current_group ) ) … … 10 10 11 11 // Don't show this menu to non site admins or if you're viewing your own profile 12 if ( !current_user_can( 'edit_users' ) || !bp_current_user_can( 'bp_moderate' ) || ( !$bp->is_item_admin && !$bp->is_item_mod) )12 if ( !current_user_can( 'edit_users' ) || !bp_current_user_can( 'bp_moderate' ) || ( bp_is_item_admin() && ! bp_is_item_mod() ) ) 13 13 return false; ?> 14 14 -
trunk/bp-groups/bp-groups-classes.php
r5644 r5687 1304 1304 1305 1305 // Construct the admin edit tab for the new group extension 1306 if ( !empty( $this->enable_edit_item ) && !empty( $bp->is_item_admin) ) {1306 if ( !empty( $this->enable_edit_item ) && bp_is_item_admin() ) { 1307 1307 add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->admin_slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $this->admin_slug ) ) . '\">' . esc_attr( $this->admin_name ) . '</a></li>";' ), 10, 2 ); 1308 1308 … … 1332 1332 1333 1333 function bp_register_group_extension( $group_extension_class ) { 1334 global $bp;1335 1334 1336 1335 if ( !class_exists( $group_extension_class ) ) -
trunk/bp-groups/bp-groups-functions.php
r5460 r5687 198 198 199 199 // Check the user is the group admin. 200 if ( ! $bp->is_item_admin)200 if ( ! bp_is_item_admin() ) 201 201 return false; 202 202 … … 699 699 700 700 function groups_promote_member( $user_id, $group_id, $status ) { 701 global $bp; 702 703 if ( !$bp->is_item_admin ) 701 702 if ( ! bp_is_item_admin() ) 704 703 return false; 705 704 … … 722 721 723 722 function groups_ban_member( $user_id, $group_id ) { 724 global $bp; 725 726 if ( !$bp->is_item_admin ) 723 724 if ( ! bp_is_item_admin() ) 727 725 return false; 728 726 … … 735 733 736 734 function groups_unban_member( $user_id, $group_id ) { 737 global $bp; 738 739 if ( !$bp->is_item_admin ) 735 736 if ( ! bp_is_item_admin() ) 740 737 return false; 741 738 … … 750 747 751 748 function groups_remove_member( $user_id, $group_id ) { 752 global $bp; 753 754 if ( !$bp->is_item_admin ) 749 750 if ( ! bp_is_item_admin() ) 755 751 return false; 756 752 -
trunk/bp-groups/bp-groups-loader.php
r5518 r5687 384 384 'screen_function' => 'groups_screen_group_admin', 385 385 'position' => 1000, 386 'user_has_access' => ( $bp->is_item_admin + (int)$bp->is_item_mod ),386 'user_has_access' => true, 387 387 'item_css_id' => 'admin' 388 388 ); -
trunk/bp-groups/bp-groups-screens.php
r5567 r5687 168 168 169 169 // Sticky a topic 170 else if ( bp_is_action_variable( 'stick', 2 ) && ( isset( $bp->is_item_admin ) || isset( $bp->is_item_mod) ) ) {170 else if ( bp_is_action_variable( 'stick', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) { 171 171 // Check the nonce 172 172 check_admin_referer( 'bp_forums_stick_topic' ); … … 182 182 183 183 // Un-Sticky a topic 184 else if ( bp_is_action_variable( 'unstick', 2 ) && ( isset( $bp->is_item_admin ) || isset( $bp->is_item_mod) ) ) {184 else if ( bp_is_action_variable( 'unstick', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) { 185 185 // Check the nonce 186 186 check_admin_referer( 'bp_forums_unstick_topic' ); … … 196 196 197 197 // Close a topic 198 else if ( bp_is_action_variable( 'close', 2 ) && ( isset( $bp->is_item_admin ) || isset( $bp->is_item_mod) ) ) {198 else if ( bp_is_action_variable( 'close', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) { 199 199 // Check the nonce 200 200 check_admin_referer( 'bp_forums_close_topic' ); … … 210 210 211 211 // Open a topic 212 else if ( bp_is_action_variable( 'open', 2 ) && ( isset( $bp->is_item_admin ) || isset( $bp->is_item_mod) ) ) {212 else if ( bp_is_action_variable( 'open', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) { 213 213 // Check the nonce 214 214 check_admin_referer( 'bp_forums_open_topic' ); … … 229 229 230 230 /* Check the logged in user can delete this topic */ 231 if ( ! $bp->is_item_admin && !$bp->is_item_mod && (int)bp_loggedin_user_id() != (int)$topic->topic_poster)231 if ( ! bp_is_item_admin() && ! bp_is_item_mod() && ( (int) bp_loggedin_user_id() != (int) $topic->topic_poster ) ) 232 232 bp_core_redirect( wp_get_referer() ); 233 233 … … 252 252 253 253 // Check the logged in user can edit this topic 254 if ( ! $bp->is_item_admin && !$bp->is_item_mod && (int)bp_loggedin_user_id() != (int)$topic->topic_poster)254 if ( ! bp_is_item_admin() && ! bp_is_item_mod() && ( (int) bp_loggedin_user_id() != (int) $topic->topic_poster ) ) 255 255 bp_core_redirect( wp_get_referer() ); 256 256 … … 279 279 280 280 // Check the logged in user can edit this topic 281 if ( ! $bp->is_item_admin && !$bp->is_item_mod && (int)bp_loggedin_user_id() != (int)$post->poster_id)281 if ( ! bp_is_item_admin() && ! bp_is_item_mod() && ( (int) bp_loggedin_user_id() != (int) $post->poster_id ) ) 282 282 bp_core_redirect( wp_get_referer() ); 283 283 … … 302 302 303 303 // Check the logged in user can edit this topic 304 if ( ! $bp->is_item_admin && !$bp->is_item_mod && (int)bp_loggedin_user_id() != (int)$post->poster_id)304 if ( ! bp_is_item_admin() && ! bp_is_item_mod() && ( (int) bp_loggedin_user_id() != (int) $post->poster_id ) ) 305 305 bp_core_redirect( wp_get_referer() ); 306 306 … … 481 481 if ( bp_is_groups_component() && bp_is_action_variable( 'edit-details', 0 ) ) { 482 482 483 if ( $bp->is_item_admin || $bp->is_item_mod) {483 if ( bp_is_item_admin() || bp_is_item_mod() ) { 484 484 485 485 // If the edit form has been submitted, save the edited details … … 513 513 if ( bp_is_groups_component() && bp_is_action_variable( 'group-settings', 0 ) ) { 514 514 515 if ( ! $bp->is_item_admin)515 if ( ! bp_is_item_admin() ) 516 516 return false; 517 517 … … 556 556 557 557 // If the logged-in user doesn't have permission or if avatar uploads are disabled, then stop here 558 if ( ! $bp->is_item_admin || (int)bp_get_option( 'bp-disable-avatar-uploads' ) )558 if ( ! bp_is_item_admin() || (int) bp_get_option( 'bp-disable-avatar-uploads' ) ) 559 559 return false; 560 560 … … 619 619 if ( bp_is_groups_component() && bp_is_action_variable( 'manage-members', 0 ) ) { 620 620 621 if ( ! $bp->is_item_admin)621 if ( ! bp_is_item_admin() ) 622 622 return false; 623 623 … … 734 734 if ( bp_is_groups_component() && bp_is_action_variable( 'membership-requests', 0 ) ) { 735 735 736 if ( ! $bp->is_item_admin || 'public' == $bp->groups->current_group->status)736 if ( ! bp_is_item_admin() || ( 'public' == $bp->groups->current_group->status ) ) 737 737 return false; 738 738 … … 783 783 if ( bp_is_groups_component() && bp_is_action_variable( 'delete-group', 0 ) ) { 784 784 785 if ( ! $bp->is_item_admin&& !bp_current_user_can( 'bp_moderate' ) )785 if ( ! bp_is_item_admin() && !bp_current_user_can( 'bp_moderate' ) ) 786 786 return false; 787 787 -
trunk/bp-groups/bp-groups-template.php
r5673 r5687 303 303 return true; 304 304 305 if ( !$group)305 if ( empty( $group ) ) 306 306 $group =& $groups_template->group; 307 307 … … 323 323 global $groups_template; 324 324 325 if ( !$group)325 if ( empty( $group ) ) 326 326 $group =& $groups_template->group; 327 327 … … 335 335 global $groups_template; 336 336 337 if ( !$group)337 if ( empty( $group ) ) 338 338 $group =& $groups_template->group; 339 339 … … 347 347 global $groups_template; 348 348 349 if ( !$group)349 if ( empty( $group ) ) 350 350 $group =& $groups_template->group; 351 351 … … 369 369 global $groups_template; 370 370 371 if ( !$group)371 if ( empty( $group ) ) 372 372 $group =& $groups_template->group; 373 373 … … 420 420 global $groups_template; 421 421 422 if ( !$group)422 if ( empty( $group ) ) 423 423 $group =& $groups_template->group; 424 424 … … 441 441 global $groups_template, $bp; 442 442 443 if ( !$group)443 if ( empty( $group ) ) 444 444 $group =& $groups_template->group; 445 445 … … 453 453 global $groups_template, $bp; 454 454 455 if ( !$group)455 if ( empty( $group ) ) 456 456 $group =& $groups_template->group; 457 457 … … 465 465 global $groups_template; 466 466 467 if ( !$group)467 if ( empty( $group ) ) 468 468 $group =& $groups_template->group; 469 469 … … 477 477 global $groups_template; 478 478 479 if ( !$group)479 if ( empty( $group ) ) 480 480 $group =& $groups_template->group; 481 481 … … 489 489 global $groups_template; 490 490 491 if ( !$group)491 if ( empty( $group ) ) 492 492 $group =& $groups_template->group; 493 493 … … 501 501 global $groups_template; 502 502 503 if ( !$group)503 if ( empty( $group ) ) 504 504 $group =& $groups_template->group; 505 505 … … 514 514 global $groups_template; 515 515 516 if ( !$group)516 if ( empty( $group ) ) 517 517 $group =& $groups_template->group; 518 518 … … 530 530 global $groups_template; 531 531 532 if ( !$group)532 if ( empty( $group ) ) 533 533 $group =& $groups_template->group; 534 534 … … 542 542 global $groups_template; 543 543 544 if ( !$group)544 if ( empty( $group ) ) 545 545 $group =& $groups_template->group; 546 546 … … 549 549 550 550 function bp_group_is_admin() { 551 global $bp; 552 553 return $bp->is_item_admin; 551 return bp_is_item_admin(); 554 552 } 555 553 556 554 function bp_group_is_mod() { 557 global $bp; 558 559 return $bp->is_item_mod; 555 return bp_is_item_mod(); 560 556 } 561 557 … … 563 559 global $groups_template; 564 560 565 if ( !$group)561 if ( empty( $group ) ) 566 562 $group =& $groups_template->group; 567 563 … … 621 617 global $groups_template; 622 618 623 if ( !$group)619 if ( empty( $group ) ) 624 620 $group =& $groups_template->group; 625 621 … … 651 647 global $groups_template; 652 648 653 if ( !$group)649 if ( empty( $group ) ) 654 650 $group =& $groups_template->group; 655 651 … … 674 670 global $groups_template, $bp; 675 671 676 if ( !$group)672 if ( empty( $group ) ) 677 673 $group =& $groups_template->group; 678 674 … … 747 743 global $groups_template; 748 744 749 if ( !$group)745 if ( empty( $group ) ) 750 746 $group =& $groups_template->group; 751 747 … … 771 767 global $groups_template; 772 768 773 if ( !$group)769 if ( empty( $group ) ) 774 770 $group =& $groups_template->group; 775 771 … … 848 844 global $groups_template; 849 845 850 if ( !$group)846 if ( empty( $group ) ) 851 847 $group =& $groups_template->group; 852 848 … … 868 864 global $groups_template; 869 865 870 if ( !$group)866 if ( empty( $group ) ) 871 867 $group =& $groups_template->group; 872 868 … … 878 874 global $groups_template; 879 875 880 if ( !$group)876 if ( empty( $group ) ) 881 877 $group =& $groups_template->group; 882 878 … … 1144 1140 global $group_mods, $groups_template; 1145 1141 1146 if ( !$group)1142 if ( empty( $group ) ) 1147 1143 $group =& $groups_template->group; 1148 1144 … … 1195 1191 global $members_template, $groups_template, $bp; 1196 1192 1197 if ( !$group)1193 if ( empty( $group ) ) 1198 1194 $group =& $groups_template->group; 1199 1195 … … 1215 1211 global $members_template, $groups_template, $bp; 1216 1212 1217 if ( !$group)1213 if ( empty( $group ) ) 1218 1214 $group =& $groups_template->group; 1219 1215 … … 1235 1231 $user_id = $members_template->member->user_id; 1236 1232 1237 if ( !$group)1233 if ( empty( $group ) ) 1238 1234 $group =& $groups_template->group; 1239 1235 … … 1253 1249 global $members_template, $groups_template; 1254 1250 1255 if ( !$group)1251 if ( empty( $group ) ) 1256 1252 $group =& $groups_template->group; 1257 1253 … … 1262 1258 global $bp, $groups_template; 1263 1259 1264 if ( !$group)1260 if ( empty( $group ) ) 1265 1261 $group = ( $groups_template->group ) ? $groups_template->group : $bp->groups->current_group; 1266 1262 1267 1263 $current_tab = bp_action_variable( 0 ); 1268 ?> 1269 <?php if ( $bp->is_item_admin || $bp->is_item_mod ) { ?> 1264 1265 if ( bp_is_item_admin() || bp_is_item_mod() ) : ?> 1266 1270 1267 <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/edit-details' ) ?>"><?php _e( 'Details', 'buddypress' ); ?></a></li> 1271 <?php } ?> 1272 1273 <?php 1274 if ( !$bp->is_item_admin)1275 return false; 1276 ?> 1268 1269 <?php endif; ?> 1270 1271 <?php if ( ! bp_is_item_admin() ) 1272 return false; ?> 1273 1277 1274 <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/group-settings' ) ?>"><?php _e( 'Settings', 'buddypress' ); ?></a></li> 1278 1275 1279 1276 <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?> 1277 1280 1278 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/group-avatar' ) ?>"><?php _e( 'Avatar', 'buddypress' ); ?></a></li> 1279 1281 1280 <?php endif; ?> 1282 1281 … … 1284 1283 1285 1284 <?php if ( $groups_template->group->status == 'private' ) : ?> 1285 1286 1286 <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/membership-requests' ) ?>"><?php _e( 'Requests', 'buddypress' ); ?></a></li> 1287 1287 1288 <?php endif; ?> 1288 1289 … … 1290 1291 1291 1292 <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/delete-group' ) ?>"><?php _e( 'Delete', 'buddypress' ); ?></a></li> 1293 1292 1294 <?php 1293 1295 } … … 1304 1306 } 1305 1307 function bp_get_group_form_action( $page, $group = false ) { 1306 global $ bp, $groups_template;1307 1308 if ( !$group)1308 global $groups_template; 1309 1310 if ( empty( $group ) ) 1309 1311 $group =& $groups_template->group; 1310 1312 … … 1318 1320 global $groups_template; 1319 1321 1320 if ( !$group)1321 $group =& $groups_template->group; 1322 1323 if ( !$page)1322 if ( empty( $group ) ) 1323 $group =& $groups_template->group; 1324 1325 if ( empty( $page ) ) 1324 1326 $page = bp_action_variable( 0 ); 1325 1327 … … 1330 1332 global $groups_template; 1331 1333 1332 if ( !$group)1334 if ( empty( $group ) ) 1333 1335 $group =& $groups_template->group; 1334 1336 … … 1347 1349 * @uses apply_filters Creates bp_group_is_member filter and passes $is_member 1348 1350 * @usedby groups/activity.php, groups/single/forum/edit.php, groups/single/forum/topic.php to determine template part visibility 1349 * @global array $bp BuddyPress Master global1350 1351 * @global object $groups_template Current Group (usually in template loop) 1351 1352 * @param object $group Group to check is_member … … 1353 1354 */ 1354 1355 function bp_group_is_member( $group = false ) { 1355 global $ bp, $groups_template;1356 global $groups_template; 1356 1357 1357 1358 // Site admins always have access … … 1359 1360 return true; 1360 1361 1361 if ( !$group)1362 if ( empty( $group ) ) 1362 1363 $group =& $groups_template->group; 1363 1364 … … 1385 1386 return false; 1386 1387 1387 if ( !$group) {1388 if ( empty( $group ) ) { 1388 1389 $group =& $groups_template->group; 1389 1390 … … 1404 1405 global $groups_template, $bp; 1405 1406 1406 if ( !$group)1407 if ( empty( $group ) ) 1407 1408 $group =& $groups_template->group; 1408 1409 … … 1416 1417 global $groups_template, $bp; 1417 1418 1418 if ( !$group)1419 if ( empty( $group ) ) 1419 1420 $group =& $groups_template->group; 1420 1421 … … 1426 1427 } 1427 1428 function bp_get_group_leave_confirm_link( $group = false ) { 1428 global $groups_template , $bp;1429 1430 if ( !$group)1429 global $groups_template; 1430 1431 if ( empty( $group ) ) 1431 1432 $group =& $groups_template->group; 1432 1433 … … 1438 1439 } 1439 1440 function bp_get_group_leave_reject_link( $group = false ) { 1440 global $groups_template , $bp;1441 1442 if ( !$group)1441 global $groups_template; 1442 1443 if ( empty( $group ) ) 1443 1444 $group =& $groups_template->group; 1444 1445 … … 1450 1451 } 1451 1452 function bp_get_group_send_invite_form_action( $group = false ) { 1452 global $groups_template , $bp;1453 1454 if ( !$group)1453 global $groups_template; 1454 1455 if ( empty( $group ) ) 1455 1456 $group =& $groups_template->group; 1456 1457 … … 1459 1460 1460 1461 function bp_has_friends_to_invite( $group = false ) { 1461 global $groups_template , $bp;1462 global $groups_template; 1462 1463 1463 1464 if ( !bp_is_active( 'friends' ) ) 1464 1465 return false; 1465 1466 1466 if ( !$group)1467 if ( empty( $group ) ) 1467 1468 $group =& $groups_template->group; 1468 1469 … … 1474 1475 1475 1476 function bp_group_new_topic_button( $group = false ) { 1476 echo bp_get_group_new_topic_button( );1477 echo bp_get_group_new_topic_button( $group ); 1477 1478 } 1478 1479 function bp_get_group_new_topic_button( $group = false ) { 1479 1480 global $groups_template; 1480 1481 1481 if ( !$group)1482 if ( empty( $group ) ) 1482 1483 $group =& $groups_template->group; 1483 1484 … … 1506 1507 } 1507 1508 function bp_get_group_join_button( $group = false ) { 1508 global $ bp, $groups_template;1509 1510 if ( !$group)1509 global $groups_template; 1510 1511 if ( empty( $group ) ) 1511 1512 $group =& $groups_template->group; 1512 1513 … … 1687 1688 1688 1689 function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) { 1689 global $bp;1690 1690 1691 1691 $this->pag_page = isset( $_REQUEST['mlpage'] ) ? intval( $_REQUEST['mlpage'] ) : 1; 1692 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 1693 1694 $this->members = BP_Groups_Member::get_all_for_group( $group_id, $this->pag_num, $this->pag_page, $exclude_admins_mods, $exclude_banned, $exclude ); 1692 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 1693 $this->members = BP_Groups_Member::get_all_for_group( $group_id, $this->pag_num, $this->pag_page, $exclude_admins_mods, $exclude_banned, $exclude ); 1695 1694 1696 1695 if ( !$max || $max >= (int)$this->members['count'] ) … … 1756 1755 1757 1756 function the_member() { 1758 global $member;1759 1757 1760 1758 $this->in_the_loop = true; 1761 $this->member = $this->next_member();1759 $this->member = $this->next_member(); 1762 1760 1763 1761 if ( 0 == $this->current_member ) // loop has just started … … 1767 1765 1768 1766 function bp_group_has_members( $args = '' ) { 1769 global $ bp, $members_template;1767 global $members_template; 1770 1768 1771 1769 $defaults = array( … … 1878 1876 } 1879 1877 function bp_get_group_member_is_banned() { 1880 global $members_template , $groups_template;1878 global $members_template; 1881 1879 1882 1880 return apply_filters( 'bp_get_group_member_is_banned', $members_template->member->is_banned ); … … 1921 1919 } 1922 1920 function bp_get_group_pag_id() { 1923 global $bp;1924 1925 1921 return apply_filters( 'bp_get_group_pag_id', 'pag' ); 1926 1922 } … … 2262 2258 2263 2259 function bp_directory_groups_search_form() { 2264 global $bp;2265 2260 2266 2261 $default_search_value = bp_get_search_default_text( 'groups' ); … … 2282 2277 */ 2283 2278 function bp_groups_header_tabs() { 2284 global $ create_group_step, $completed_to_step;2285 ?> 2279 global $bp;?> 2280 2286 2281 <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/recently-active' ) ?>"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li> 2287 2282 <li<?php if ( bp_is_action_variable( 'recently-joined', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/recently-joined' ) ?>"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li> … … 2290 2285 <li<?php if ( bp_is_action_variable( 'mod-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/mod-of' ) ?>"><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li> 2291 2286 <li<?php if ( bp_is_action_variable( 'alphabetically' ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/alphabetically' ) ?>"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li> 2287 2292 2288 <?php 2293 2289 do_action( 'groups_header_tabs' ); … … 2417 2413 function __construct( $group_id, $per_page, $max ) { 2418 2414 2419 global $bp;2420 2421 2415 $this->pag_page = isset( $_REQUEST['mrpage'] ) ? intval( $_REQUEST['mrpage'] ) : 1; 2422 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 2423 2416 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 2424 2417 $this->requests = BP_Groups_Group::get_membership_requests( $group_id, $this->pag_num, $this->pag_page ); 2425 2418 … … 2486 2479 2487 2480 function the_request() { 2488 global $request;2489 2490 2481 $this->in_the_loop = true; 2491 $this->request = $this->next_request();2482 $this->request = $this->next_request(); 2492 2483 2493 2484 if ( 0 == $this->current_request ) // loop has just started … … 2591 2582 2592 2583 function __construct( $user_id, $group_id ) { 2593 2594 global $bp; 2595 2596 $this->invites = groups_get_invites_for_group( $user_id, $group_id ); 2584 $this->invites = groups_get_invites_for_group( $user_id, $group_id ); 2597 2585 $this->invite_count = count( $this->invites ); 2598 2599 2586 } 2600 2587 … … 2633 2620 2634 2621 function the_invite() { 2635 global $invite, $group_id; 2636 2637 $this->in_the_loop = true; 2638 $user_id = $this->next_invite(); 2639 2640 $this->invite = new stdClass; 2641 $this->invite->user = new BP_Core_User( $user_id ); 2622 global $group_id; 2623 2624 $this->in_the_loop = true; 2625 $user_id = $this->next_invite(); 2626 $this->invite = new stdClass; 2627 $this->invite->user = new BP_Core_User( $user_id ); 2642 2628 $this->invite->group_id = $group_id; // Globaled in bp_group_has_invites() 2643 2629
Note: See TracChangeset
for help on using the changeset viewer.