Changeset 2746 for branches/plugin/bbp-includes/bbp-functions.php
- Timestamp:
- 01/05/2011 06:20:46 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-functions.php
r2740 r2746 306 306 $bbp->errors->add( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) ); 307 307 308 if ( bbp_is_forum_category( $forum_id ) ) 309 $bbp->errors->add( 'bbp_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in this forum!', 'bbpress' ) ); 310 311 if ( bbp_is_forum_closed( $forum_id ) && !current_user_can( 'edit_forum', $forum_id ) ) 312 $bbp->errors->add( 'bbp_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics!', 'bbpress' ) ); 313 314 if ( bbp_is_forum_private( $forum_id ) && !current_user_can( 'read_private_forums' ) ) 315 $bbp->errors->add( 'bbp_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in this forum!', 'bbpress' ) ); 316 308 317 // Check for flood 309 318 if ( !bbp_check_for_flood( $anonymous_data, $topic_author ) ) … … 624 633 */ 625 634 function bbp_pre_get_posts ( $wp_query ) { 626 global $bbp ;635 global $bbp, $wp_version; 627 636 628 637 $bbp_user = get_query_var( 'bbp_user' ); … … 645 654 // Define new query variable 646 655 if ( !empty( $is_user_edit ) ) { 647 global $wp_version;648 649 656 // Only allow super admins on multisite to edit every user. 650 657 if ( ( is_multisite() && !current_user_can( 'manage_network_users' ) && $user_id != $current_user->ID && ! apply_filters( 'enable_edit_any_user_configuration', true ) ) || !current_user_can( 'edit_user', $user->ID ) )
Note: See TracChangeset
for help on using the changeset viewer.