Skip to:
Content

BuddyPress.org

Ticket #5768: 5768.03.patch

File 5768.03.patch, 3.3 KB (added by r-a-y, 12 years ago)
  • src/bp-groups/bp-groups-template.php

     
    234234
    235235                // Build pagination links
    236236                if ( (int) $this->total_group_count && (int) $this->pag_num ) {
     237                        $pag_args = array(
     238                                $page_arg => '%#%',
     239                                'num'     => $this->pag_num,
     240                                'sortby'  => $this->sort_by,
     241                                'order'   => $this->order,
     242                        );
     243
     244                        if ( defined( 'DOING_AJAX' ) && true === (bool) DOING_AJAX ) {
     245                                $base = remove_query_arg( 's', wp_get_referer() );
     246                        } else {
     247                                $base = '';
     248                        }
     249
     250                        if ( ! empty( $search_terms ) ) {
     251                                $pag_args['s'] = $search_terms;
     252                        }
     253
    237254                        $this->pag_links = paginate_links( array(
    238                                 'base'      => add_query_arg( array( $page_arg => '%#%', 'num' => $this->pag_num, 's' => $search_terms, 'sortby' => $this->sort_by, 'order' => $this->order ) ),
     255                                'base'      => add_query_arg( $pag_args, $base ),
    239256                                'format'    => '',
    240257                                'total'     => ceil( (int) $this->total_group_count / (int) $this->pag_num ),
    241258                                'current'   => $this->pag_page,
  • src/bp-members/bp-members-template.php

     
    264264                }
    265265
    266266                if ( (int) $this->total_member_count && (int) $this->pag_num ) {
     267                        $pag_args = array(
     268                                $page_arg => '%#%',
     269                        );
     270
     271                        if ( defined( 'DOING_AJAX' ) && true === (bool) DOING_AJAX ) {
     272                                $base = remove_query_arg( 's', wp_get_referer() );
     273                        } else {
     274                                $base = '';
     275                        }
     276
     277                        if ( ! empty( $search_terms ) ) {
     278                                $pag_args['s'] = $search_terms;
     279                        }
     280
    267281                        $this->pag_links = paginate_links( array(
    268                                 'base'      => add_query_arg( $page_arg, '%#%' ),
     282                                'base'      => add_query_arg( $pag_args, $base ),
    269283                                'format'    => '',
    270284                                'total'     => ceil( (int) $this->total_member_count / (int) $this->pag_num ),
    271285                                'current'   => (int) $this->pag_page,
  • 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 = remove_query_arg( 's', 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 ) {
    1693                 search_terms = bp_get_querystring('s');
    1694         }
    1695 
    16961692        if ( null === scope ) {
    16971693                scope = 'all';
    16981694        }