Skip to:
Content

bbPress.org

Ticket #2607: 2607.02.patch

File 2607.02.patch, 2.4 KB (added by thebrandonallen, 12 years ago)

Remove unused code

  • src/includes/replies/template.php

    diff --git src/includes/replies/template.php src/includes/replies/template.php
    index b8e9b41..d436a63 100644
    function bbp_has_replies( $args = '' ) {  
    124124        /** Defaults **************************************************************/
    125125
    126126        // Other defaults
    127         $default_reply_search   = !empty( $_REQUEST['rs'] ) ? $_REQUEST['rs']    : false;
    128127        $default_post_parent    = ( bbp_is_single_topic() ) ? bbp_get_topic_id() : 'any';
    129128        $default_post_type      = ( bbp_is_single_topic() && bbp_show_lead_topic() ) ? bbp_get_reply_post_type() : array( bbp_get_topic_post_type(), bbp_get_reply_post_type() );
    130129        $default_thread_replies = (bool) ( bbp_is_single_topic() && bbp_thread_replies() );
    function bbp_has_replies( $args = '' ) {  
    139138                'order'               => 'ASC',                      // Oldest to newest
    140139                'hierarchical'        => $default_thread_replies,    // Hierarchical replies
    141140                'ignore_sticky_posts' => true,                       // Stickies not supported
    142                 's'                   => $default_reply_search,      // Maybe search
    143141        );
    144142
    145143        // What are the default allowed statuses (based on user caps)
  • src/includes/topics/template.php

    diff --git src/includes/topics/template.php src/includes/topics/template.php
    index c5fc8fb..803c371 100644
    function bbp_has_topics( $args = '' ) {  
    143143        /** Defaults **************************************************************/
    144144
    145145        // Other defaults
    146         $default_topic_search  = !empty( $_REQUEST['ts'] ) ? $_REQUEST['ts'] : false;
    147         $default_show_stickies = (bool) ( bbp_is_single_forum() || bbp_is_topic_archive() ) && ( false === $default_topic_search );
     146        $default_show_stickies = (bool) ( bbp_is_single_forum() || bbp_is_topic_archive() );
    148147        $default_post_parent   = bbp_is_single_forum() ? bbp_get_forum_id() : 'any';
    149148
    150149        // Default argument array
    function bbp_has_topics( $args = '' ) {  
    157156                'order'          => 'DESC',                    // 'ASC', 'DESC'
    158157                'posts_per_page' => bbp_get_topics_per_page(), // Topics per page
    159158                'paged'          => bbp_get_paged(),           // Page Number
    160                 's'              => $default_topic_search,     // Topic Search
    161159                'show_stickies'  => $default_show_stickies,    // Ignore sticky topics?
    162160                'max_num_pages'  => false,                     // Maximum number of pages to show
    163161        );