Skip to:
Content

BuddyPress.org

Ticket #5768: 5768.01.patch

File 5768.01.patch, 878 bytes (added by r-a-y, 12 years ago)
  • src/bp-messages/bp-messages-template.php

     
    172172                }
    173173
    174174                if ( (int) $this->total_thread_count && (int) $this->pag_num ) {
     175                        $pag_args = array(
     176                                $page_arg => '%#%',
     177                        );
     178
     179                        if ( defined( 'DOING_AJAX' ) && true === (bool) DOING_AJAX ) {
     180                                $base = wp_get_referer();
     181                        } else {
     182                                $base = '';
     183                        }
     184
     185                        $pag_args['s'] = ! empty( $this->search_terms ) ? $this->search_terms : '';
     186
    175187                        $this->pag_links = paginate_links( array(
    176                                 'base'      => add_query_arg( $page_arg, '%#%' ),
     188                                'base'      => add_query_arg( $pag_args, $base ),
    177189                                'format'    => '',
    178190                                'total'     => ceil( (int) $this->total_thread_count / (int) $this->pag_num ),
    179191                                'current'   => $this->pag_page,