Skip to:
Content

BuddyPress.org

Changeset 1947


Ignore:
Timestamp:
09/25/2009 06:40:35 PM (15 years ago)
Author:
apeatling
Message:

Fixes #1077 but this is part of a wider search conflict problem that will need to be addressed in a future version.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1934 r1947  
    15331533                case 'members': default:
    15341534                    $slug = BP_MEMBERS_SLUG;
     1535                    $var = '/?s=';
    15351536                    break;
    15361537                case 'groups':
    15371538                    $slug = BP_GROUPS_SLUG;
     1539                    $var = '/?s=';
    15381540                    break;
    15391541                case 'forums':
    15401542                    $slug = BP_FORUMS_SLUG;
     1543                    $var = '/?fs=';
    15411544                    break;
    15421545                case 'blogs':
    15431546                    $slug = BP_BLOGS_SLUG;
     1547                    $var = '/?s=';
    15441548                    break;
    15451549            }
    15461550        }
    1547 
    1548         $search_url = apply_filters( 'bp_core_search_site', site_url( $slug . '/?s=' . urlencode($search_terms) ), $search_terms );
     1551       
     1552        $search_url = apply_filters( 'bp_core_search_site', site_url( $slug . $var . urlencode($search_terms) ), $search_terms );
    15491553       
    15501554        bp_core_redirect( $search_url );
  • trunk/bp-forums/bp-forums-templatetags.php

    r1924 r1947  
    181181
    182182    /* If $_GET['s'] is set, let's auto populate the filter var */
    183     if ( $bp->is_directory && !empty( $_GET['s'] ) )
    184         $filter = $_GET['s'];
     183    if ( $bp->is_directory && !empty( $_GET['fs'] ) )
     184        $filter = $_GET['fs'];
    185185       
    186186    $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $per_page, $max, $no_stickies, $filter );
     
    921921    global $bp; ?>
    922922    <form action="<?php echo $bp->root_domain . '/' . $bp->forums->slug . '/'; ?>" method="get" id="search-forums-form">
    923         <label><input type="text" name="s" id="forums_search" value="<?php if ( isset( $_GET['s'] ) ) { echo attribute_escape( $_GET['s'] ); } else { _e( 'Search anything...', 'buddypress' ); } ?>"  onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>
     923        <label><input type="text" name="fs" id="forums_search" value="<?php if ( isset( $_GET['fs'] ) ) { echo attribute_escape( $_GET['fs'] ); } else { _e( 'Search anything...', 'buddypress' ); } ?>"  onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>
    924924        <input type="submit" id="forums_search_submit" name="submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    925925    </form>
Note: See TracChangeset for help on using the changeset viewer.