Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/19/2010 07:41:13 PM (14 years ago)
Author:
djpaul
Message:

Add missing files from previous commit (r3448); don't allow the URL to override search parameters hardcoded in templates.

File:
1 edited

Legend:

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

    r3369 r3449  
    124124    $user_id = false;
    125125    $page = 1;
    126     $search_terms = false;
     126    $search_terms = null;
    127127
    128128    // User filtering
    129129    if ( !empty( $bp->displayed_user->id ) )
    130130        $user_id = $bp->displayed_user->id;
    131 
    132     // Pass a filter if ?s= is set.
    133     if ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) )
    134         $search_terms = $_REQUEST['s'];
    135131
    136132    // type: active ( default ) | random | newest | popular | online | alphabetical
     
    152148    $r = wp_parse_args( $args, $defaults );
    153149    extract( $r );
     150
     151    // Pass a filter if ?s= is set.
     152    if ( is_null( $search_terms ) ) {
     153        if ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) )
     154            $search_terms = $_REQUEST['s'];
     155        else
     156            $search_terms = false;
     157    }
    154158
    155159    if ( $max ) {
Note: See TracChangeset for help on using the changeset viewer.