Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/19/2010 07:39:29 PM (16 years ago)
Author:
djpaul
Message:

Don't allow the URL to override search parameters hardcoded in templates. Fixes #2747.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-templatetags.php

    r3370 r3448  
    120120        $type = 'active';
    121121        $user_id = false;
    122         $search_terms = false;
     122        $search_terms = null;
    123123
    124124        /* User filtering */
    125125        if ( !empty( $bp->displayed_user->id ) )
    126126                $user_id = $bp->displayed_user->id;
    127 
    128         if ( !empty( $_REQUEST['s'] ) )
    129                 $search_terms = $_REQUEST['s'];
    130127
    131128        $defaults = array(
     
    141138        $r = wp_parse_args( $args, $defaults );
    142139        extract( $r );
     140
     141        if ( is_null( $search_terms ) ) {
     142                if ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) )
     143                        $search_terms = $_REQUEST['s'];
     144                else
     145                        $search_terms = false;
     146        }
    143147
    144148        if ( $max ) {
Note: See TracChangeset for help on using the changeset viewer.