Changeset 6087
- Timestamp:
- 09/01/2016 08:05:17 PM (8 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/forums/capabilities.php
r6056 r6087 258 258 $user_id = bbp_get_user_id( $user_id, false, ! empty( $user_id ) ); 259 259 $forum_id = bbp_get_forum_id( $forum_id ); 260 261 // Get forums the user can moderate. 262 $forum_ids = bbp_get_moderator_forum_ids( $user_id ); 263 264 // Is this forum ID in the users array of forum IDs? 265 if ( ! empty( $forum_ids ) ) { 266 $retval = in_array( $forum_id, $forum_ids ); 260 $forum_ids = array(); 261 262 // Only check if per-forum moderation is enabled 263 if ( bbp_allow_forum_mods() ) { 264 265 // Get forums the user can moderate. 266 $forum_ids = bbp_get_moderator_forum_ids( $user_id ); 267 268 // Is this forum ID in the users array of forum IDs? 269 if ( ! empty( $forum_ids ) ) { 270 $retval = in_array( $forum_id, $forum_ids ); 271 } 267 272 } 268 273 -
trunk/src/includes/replies/capabilities.php
r6056 r6087 135 135 136 136 // User is a per-forum moderator, make sure they can spectate. 137 } elseif ( bbp_ allow_forum_mods() && bbp_is_user_forum_moderator( $user_id, bbp_get_reply_forum_id( $_post->ID ) ) ) {137 } elseif ( bbp_is_user_forum_moderator( $user_id, bbp_get_reply_forum_id( $_post->ID ) ) ) { 138 138 $caps = array( 'spectate' ); 139 139
Note: See TracChangeset
for help on using the changeset viewer.