Skip to:
Content

BuddyPress.org

Ticket #5768: 5768.02.patch

File 5768.02.patch, 1.3 KB (added by r-a-y, 12 years ago)
  • src/bp-messages/bp-messages-template.php

     
    173173                }
    174174
    175175                if ( (int) $this->total_thread_count && (int) $this->pag_num ) {
     176                        $pag_args = array(
     177                                $page_arg => '%#%',
     178                        );
     179
     180                        if ( defined( 'DOING_AJAX' ) && true === (bool) DOING_AJAX ) {
     181                                $base = wp_get_referer();
     182                        } else {
     183                                $base = '';
     184                        }
     185
     186                        if ( ! empty( $this->search_terms ) ) {
     187                                $pag_args['s'] = $this->search_terms;
     188                        }
     189
    176190                        $this->pag_links = paginate_links( array(
    177                                 'base'      => add_query_arg( $page_arg, '%#%' ),
     191                                'base'      => add_query_arg( $pag_args, $base ),
    178192                                'format'    => '',
    179193                                'total'     => ceil( (int) $this->total_thread_count / (int) $this->pag_num ),
    180194                                'current'   => $this->pag_page,
  • src/bp-templates/bp-legacy/js/buddypress.js

     
    16891689                return false;
    16901690        }
    16911691
    1692         if ( bp_get_querystring('s') && !search_terms ) {
     1692        if ( bp_get_querystring('s') && !search_terms && 'messages' != object ) {
    16931693                search_terms = bp_get_querystring('s');
    16941694        }
    16951695