Skip to:
Content

bbPress.org

Changeset 4843


Ignore:
Timestamp:
04/10/2013 08:29:27 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Don't allow replies to closed topics, unless user can moderate. Props mzaweb. Fixes #2281.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/replies/functions.php

    r4839 r4843  
    222222    } else {
    223223        $reply_status = bbp_get_public_status_id();
     224    }
     225
     226    /** Topic Closed **********************************************************/
     227
     228    // If topic is closed, moderators can still reply
     229    if ( bbp_is_topic_closed( $topic_id ) && ! current_user_can( 'moderate' ) ) {
     230        bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>ERROR</strong>: Topic is closed.', 'bbpress' ) );
    224231    }
    225232
Note: See TracChangeset for help on using the changeset viewer.