Skip to:
Content

BuddyPress.org

Changeset 9809


Ignore:
Timestamp:
04/27/2015 06:51:05 PM (5 years ago)
Author:
dcavins
Message:

Clean up page param in AJAX pagination request.

When including the page parameter in AJAX pagination requests, strip
out trailing arguments. E.g.: instead of sending '2&num,’ send '2'.

Fixes #6394.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r9604 r9809  
    913913        var target = jq(event.target),
    914914            el,
    915             css_id, object, search_terms, pagination_id, template, page_number,
     915            css_id, object, search_terms, pagination_id, template,
     916            url_parameters, page_number,
    916917            $gm_search,
    917918            caller;
     
    938939            template = null;
    939940
    940             page_number = target.attr('href').split( '=' );
     941            url_parameters = target.attr('href').split( '&' );
     942            // The page number is the first parameter.
     943            page_number = url_parameters[0].split( '=' );
    941944            page_number = page_number[1];
    942945
Note: See TracChangeset for help on using the changeset viewer.