Skip to:
Content

bbPress.org

Ticket #2622: 2622.diff

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

     
    502502
    503503                                        $is_sticky = bbp_is_topic_sticky( $topic_id );
    504504                                        $is_super  = false === $is_sticky && !empty( $_GET['super'] ) && ( "1" === $_GET['super'] ) ? true : false;
    505                                         $message   = true  === $is_sticky ? 'unsticked'     : 'sticked';
    506                                         $message   = true  === $is_super  ? 'super_sticked' : $message;
     505                                        $message   = true  === $is_sticky ? 'unstuck'     : 'stuck';
     506                                        $message   = true  === $is_super  ? 'super_sticky' : $message;
    507507                                        $success   = true  === $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super );
    508508
    509509                                        break;
     
    554554                if ( $this->bail() ) return;
    555555
    556556                // Only proceed if GET is a topic toggle action
    557                 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'] ) ) {
     557                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'] ) ) {
    558558                        $notice     = $_GET['bbp_topic_toggle_notice'];         // Which notice?
    559559                        $topic_id   = (int) $_GET['topic_id'];                  // What's the topic id?
    560560                        $is_failure = !empty( $_GET['failed'] ) ? true : false; // Was that a failure?
     
    579579                                        $message = $is_failure === true ? sprintf( __( 'There was a problem closing the topic "%1$s".',           'bbpress' ), $topic_title ) : sprintf( __( 'Topic "%1$s" successfully closed.',           'bbpress' ), $topic_title );
    580580                                        break;
    581581
    582                                 case 'super_sticked' :
    583                                         $message = $is_failure === true ? sprintf( __( 'There was a problem sticking the topic "%1$s" to front.', 'bbpress' ), $topic_title ) : sprintf( __( 'Topic "%1$s" successfully sticked to front.', 'bbpress' ), $topic_title );
     582                                case 'super_sticky' :
     583                                        $message = $is_failure === true ? sprintf( __( 'There was a problem sticking the topic "%1$s" to front.', 'bbpress' ), $topic_title ) : sprintf( __( 'Topic "%1$s" successfully stuck to front.', 'bbpress' ), $topic_title );
    584584                                        break;
    585585
    586                                 case 'sticked'   :
    587                                         $message = $is_failure === true ? sprintf( __( 'There was a problem sticking the topic "%1$s".',          'bbpress' ), $topic_title ) : sprintf( __( 'Topic "%1$s" successfully sticked.',          'bbpress' ), $topic_title );
     586                                case 'stuck'   :
     587                                        $message = $is_failure === true ? sprintf( __( 'There was a problem sticking the topic "%1$s".',          'bbpress' ), $topic_title ) : sprintf( __( 'Topic "%1$s" successfully stuck.',          'bbpress' ), $topic_title );
    588588                                        break;
    589589
    590                                 case 'unsticked' :
    591                                         $message = $is_failure === true ? sprintf( __( 'There was a problem unsticking the topic "%1$s".',        'bbpress' ), $topic_title ) : sprintf( __( 'Topic "%1$s" successfully unsticked.',        'bbpress' ), $topic_title );
     590                                case 'unstuck' :
     591                                        $message = $is_failure === true ? sprintf( __( 'There was a problem unsticking the topic "%1$s".',        'bbpress' ), $topic_title ) : sprintf( __( 'Topic "%1$s" successfully unstuck.',        'bbpress' ), $topic_title );
    592592                                        break;
    593593
    594594                                case 'spammed'   :