Skip to:
Content

BuddyPress.org

Ticket #4478: bp_requested_url_patch.diff

File bp_requested_url_patch.diff, 1.2 KB (added by calin, 12 years ago)

the patch against bp 1.6.1

  • bp-core/bp-core-catchuri.php

    diff -Naur /buddypress/bp-core/bp-core-catchuri.php /buddypress.orig/bp-core/bp-core-catchuri.php
    old new  
    660660                $bp->canonical_stack['requested_url'] .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    661661        }
    662662
    663         return $bp->canonical_stack['requested_url'];
     663        return apply_filters( 'bp_get_requested_url', $bp->canonical_stack['requested_url'] );
    664664}
    665665
    666666/**
  • bp-core/bp-core-functions.php

    diff -Naur /buddypress/bp-core/bp-core-functions.php /buddypress.orig/bp-core/bp-core-functions.php
    old new  
    11901190        // Get the home URL
    11911191        $home_url = strtolower( home_url() );
    11921192
    1193         // Build the currently requested URL
    1194         $scheme        = is_ssl() ? 'https://' : 'http://';
    1195         $requested_url = strtolower( $scheme . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
     1193        $requested_url = bp_get_requested_url();
    11961194
    11971195        // Check the nonce
    11981196        $result = isset( $_REQUEST[$query_arg] ) ? wp_verify_nonce( $_REQUEST[$query_arg], $action ) : false;