Changeset 5687 for trunk/bp-groups/bp-groups-screens.php
- Timestamp:
- 02/09/2012 11:00:59 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups/bp-groups-screens.php (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.