Skip to:
Content

BuddyPress.org

Changeset 5253


Ignore:
Timestamp:
10/23/2011 02:07:22 PM (12 years ago)
Author:
djpaul
Message:

Maintain query string when redirecting URLs in the activity permalink router. Fixes #3702

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-actions.php

    r5188 r5253  
    9292    }
    9393
     94    // If set, add the original query string back onto the redirect URL
     95    if ( !empty( $_SERVER['QUERY_STRING'] ) ) {
     96        $query_frags = array();
     97        wp_parse_str( $_SERVER['QUERY_STRING'], $query_frags );
     98        $redirect = add_query_arg( urlencode_deep( $query_frags ), $redirect );
     99    }
     100
    94101    // Allow redirect to be filtered
    95102    if ( !$redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) )
Note: See TracChangeset for help on using the changeset viewer.