Skip to:
Content

bbPress.org

Ticket #2622: 2622.1.diff

File 2622.1.diff, 2.7 KB (added by netweb, 12 years ago)
  • src/includes/admin/topics.php

     
    530530                                                ? true
    531531                                                : false;
    532532                                        $message   = ( true  === $is_sticky )
    533                                                 ? 'unsticked'
    534                                                 : 'sticked';
     533                                                ? 'unstuck'
     534                                                : 'stuck';
    535535                                        $message   = ( true  === $is_super )
    536                                                 ? 'super_sticked'
     536                                                ? 'super_sticky'
    537537                                                : $message;
    538538                                        $success   = ( true  === $is_sticky )
    539539                                                ? bbp_unstick_topic( $topic_id )
     
    594594                }
    595595
    596596                // Only proceed if GET is a topic toggle action
    597                 if ( bbp_is_get_request() && !empty( $_GET['bbp_topic_toggle_notice'] ) && in_array( $_GET['bbp_topic_toggle_notice'], array( 'opened', 'closed', 'super_sticked', 'sticked', 'unsticked', 'spammed', 'unspammed' ) ) && !empty( $_GET['topic_id'] ) ) {
     597                if ( bbp_is_get_request() && !empty( $_GET['bbp_topic_toggle_notice'] ) && in_array( $_GET['bbp_topic_toggle_notice'], array( 'opened', 'closed', 'super_sticky', 'stuck', 'unstuck', 'spammed', 'unspammed' ) ) && !empty( $_GET['topic_id'] ) ) {
    598598                        $notice     = $_GET['bbp_topic_toggle_notice'];         // Which notice?
    599599                        $topic_id   = (int) $_GET['topic_id'];                  // What's the topic id?
    600600                        $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
     
    625625                                                : sprintf( __( 'Topic "%1$s" successfully closed.',             'bbpress' ), $topic_title );
    626626                                        break;
    627627
    628                                 case 'super_sticked' :
     628                                case 'super_sticky' :
    629629                                        $message = ( $is_failure === true )
    630630                                                ? sprintf( __( 'There was a problem sticking the topic "%1$s" to front.', 'bbpress' ), $topic_title )
    631                                                 : sprintf( __( 'Topic "%1$s" successfully sticked to front.',             'bbpress' ), $topic_title );
     631                                                : sprintf( __( 'Topic "%1$s" successfully stuck to front.',             'bbpress' ), $topic_title );
    632632                                        break;
    633633
    634                                 case 'sticked'   :
     634                                case 'stuck'   :
    635635                                        $message = ( $is_failure === true )
    636636                                                ? sprintf( __( 'There was a problem sticking the topic "%1$s".', 'bbpress' ), $topic_title )
    637                                                 : sprintf( __( 'Topic "%1$s" successfully sticked.',             'bbpress' ), $topic_title );
     637                                                : sprintf( __( 'Topic "%1$s" successfully stuck.',             'bbpress' ), $topic_title );
    638638                                        break;
    639639
    640                                 case 'unsticked' :
     640                                case 'unstuck' :
    641641                                        $message = ( $is_failure === true )
    642642                                                ? sprintf( __( 'There was a problem unsticking the topic "%1$s".', 'bbpress' ), $topic_title )
    643                                                 : sprintf( __( 'Topic "%1$s" successfully unsticked.',             'bbpress' ), $topic_title );
     643                                                : sprintf( __( 'Topic "%1$s" successfully unstuck.',             'bbpress' ), $topic_title );
    644644                                        break;
    645645
    646646                                case 'spammed'   :