[buddypress-trac] [BuddyPress] #4154: BuddyPress not allow use search like domain.com/search/my+search+text

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Apr 19 12:34:16 UTC 2012


#4154: BuddyPress not allow use search like domain.com/search/my+search+text
--------------------------+-----------------------------
 Reporter:  Ivinco        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:  1.5.5
 Severity:  major         |   Keywords:  has-patch
--------------------------+-----------------------------
 Default wordpress Installation allows to search via url like
 domain.com/search/my+search+text
 BuddyPress don't allow these searches.

 I fixed this bug, but maybe is not the best way.


 [ 15:11:12 ] :> diff -u bp-core-catchuri-org.php bp-core-catchuri.php
 --- bp-core-catchuri-org.php    2012-04-19 15:10:37.000000000 +0300
 +++ bp-core-catchuri.php    2012-04-19 15:10:49.000000000 +0300
 @@ -375,6 +375,9 @@
  function bp_core_catch_no_access() {
     global $bp, $bp_no_status_set, $wp_query;

 +        if ($bp->current_component == 'search') {
 +            return true;
 +        }
     // If bp_core_redirect() and $bp_no_status_set is true,
     // we are redirecting to an accessible page, so skip this check.
     if ( $bp_no_status_set )


 [15:13:56 ] :> diff -u bp-core-functions-org.php bp-core-functions.php
 --- bp-core-functions-org.php   2012-04-19 14:55:11.000000000 +0300
 +++ bp-core-functions.php   2012-04-19 14:55:57.000000000 +0300
 @@ -825,6 +825,10 @@
   */
  function bp_core_action_search_site( $slug = '' ) {
     global $bp;
 +
 +        if ($bp->current_component == 'search') {
 +            return;
 +        }

     if ( !bp_is_current_component( bp_get_search_slug() ) )
         return;

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4154>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list