<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][3796] trunk: Bring the sitewide search back to life.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>3796</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-01-21 13:05:56 +0000 (Fri, 21 Jan 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Bring the sitewide search back to life. Code clean up. Trap instances where catchuri would return incomplete matches. Use home_url instead of site_url in some places.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcoreadminbpcoreupdatephp">trunk/bp-core/admin/bp-core-update.php</a></li>
<li><a href="#trunkbpcorebpcorecatchuriphp">trunk/bp-core/bp-core-catchuri.php</a></li>
<li><a href="#trunkbpcorebpcoreclassesphp">trunk/bp-core/bp-core-classes.php</a></li>
<li><a href="#trunkbpcorebpcorefunctionsphp">trunk/bp-core/bp-core-functions.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatephp">trunk/bp-core/bp-core-template.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsloaderphp">trunk/bp-groups/bp-groups-loader.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatephp">trunk/bp-groups/bp-groups-template.php</a></li>
<li><a href="#trunkbpthemesbpdefaultheaderphp">trunk/bp-themes/bp-default/header.php</a></li>
<li><a href="#trunkbpusersbpusersscreensphp">trunk/bp-users/bp-users-screens.php</a></li>
<li><a href="#trunkbpusersbpuserstemplatephp">trunk/bp-users/bp-users-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcoreadminbpcoreupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-update.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-update.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-core/admin/bp-core-update.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -231,7 +231,7 @@
</span><span class="cx">                 if ( defined( 'BP_BLOGS_SLUG' ) )
</span><span class="cx">                         $blogs_slug = constant( 'BP_BLOGS_SLUG' );
</span><span class="cx">                 else
</span><del>-                        $blogs_slug = __( 'blogs', 'buddypress' );
</del><ins>+                        $blogs_slug = 'blogs';
</ins><span class="cx"> 
</span><span class="cx">                 if ( !defined( 'BP_ENABLE_MULTIBLOG' ) &amp;&amp; is_multisite() )
</span><span class="cx">                         $existing_pages = get_blog_option( BP_ROOT_BLOG, 'bp-pages' );
</span><span class="lines">@@ -614,12 +614,17 @@
</span><span class="cx">                                         &lt;p&gt;&lt;strong&gt;&lt;?php _e( 'This is the best choice if you have an existing WordPress theme and want complete control over template layout and design.', 'buddypress' ) ?&gt;&lt;/strong&gt;&lt;/p&gt;
</span><span class="cx"> 
</span><span class="cx">                                         &lt;?php if ( !$template_pack_installed ) : ?&gt;
</span><ins>+
</ins><span class="cx">                                                 &lt;p&gt;&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;theme&quot; value=&quot;manual_wp&quot; disabled=&quot;disabled&quot; /&gt; &lt;?php _e( 'You must first install the BuddyPress template pack before choosing this option', 'buddypress' ) ?&gt;&lt;/label&gt;&lt;/p&gt;
</span><span class="cx">                                                 &lt;p&gt;&lt;a id=&quot;bp-template-pack&quot; class=&quot;thickbox onclick button&quot; href=&quot;http://buddypressorg.dev/wp-admin/plugin-install.php?tab=plugin-information&amp;plugin=bp-template-pack&amp;TB_iframe=true&amp;width=640&amp;height=500&quot;&gt;+ &lt;?php _e( 'Install Now', 'buddypress' ) ?&gt;&lt;/a&gt;&lt;/p&gt;
</span><ins>+
</ins><span class="cx">                                         &lt;?php else : ?&gt;
</span><ins>+
</ins><span class="cx">                                                 &lt;p&gt;&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;theme&quot; value=&quot;manual_wp&quot; /&gt; &lt;?php _e( 'Choose this option (go to Appearance &amp;rarr; BP Compatibility after setup is complete)', 'buddypress' ) ?&gt;&lt;/label&gt;&lt;/p&gt;
</span><span class="cx">                                                 &lt;p&gt;&lt;a id=&quot;bp-template-pack&quot; class=&quot;button installed disabled&quot; href=&quot;javascript:void();&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;?php _e( 'Plugin Installed', 'buddypress' ) ?&gt;&lt;/a&gt;&lt;/p&gt;
</span><ins>+
</ins><span class="cx">                                         &lt;?php endif; ?&gt;
</span><ins>+
</ins><span class="cx">                                 &lt;/td&gt;
</span><span class="cx">                         &lt;/tr&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -648,6 +653,20 @@
</span><span class="cx">                                         &lt;?php endif; ?&gt;
</span><span class="cx">                                 &lt;/td&gt;
</span><span class="cx">                         &lt;/tr&gt;
</span><ins>+
+                        &lt;tr&gt;
+                                &lt;th&gt;
+                                        &lt;h5&gt;&lt;?php _e( 'Do Not Change Theme', 'buddypress' ) ?&gt;&lt;/h5&gt;
+                                        &lt;img src=&quot;&lt;?php echo plugins_url( '/buddypress/bp-core/images/existing.jpg' ) ?&gt;&quot; alt=&quot;bp-default&quot; /&gt;
+                                &lt;/th&gt;
+                                &lt;td&gt;
+                                        &lt;p&gt;&lt;?php _e( &quot;You are happy with your current theme and plan on changing it later.&quot;, 'buddypress' ) ?&gt;&lt;/p&gt;
+                                        &lt;p&gt;&lt;strong&gt;&lt;?php _e( 'This is the best choice if you have a highly customized theme on your site already, and want to manually integrate BuddyPress into your site over time.', 'buddypress' ) ?&gt;&lt;/strong&gt;&lt;/p&gt;
+
+                                        &lt;p&gt;&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;theme&quot; value=&quot;do_not_change&quot; /&gt;&lt;?php _e( 'Choose this option', 'buddypress' ) ?&gt;&lt;/label&gt;&lt;/p&gt;
+
+                                &lt;/td&gt;
+                        &lt;/tr&gt;
</ins><span class="cx">                 &lt;/table&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;div class=&quot;submit clear&quot;&gt;
</span><span class="lines">@@ -867,28 +886,43 @@
</span><span class="cx"> 
</span><span class="cx">                                         &lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&gt;&lt;p&gt;
</span><span class="cx"> 
</span><del>-                                        &lt;?php
-                                                _e( 'Oops, there was a problem creating a configuration file. ', 'buddypress' );
</del><ins>+                                                &lt;?php
+                                                        _e( 'Oops, there was a problem creating a configuration file. ', 'buddypress' );
</ins><span class="cx"> 
</span><del>-                                                if ( $iis7_permalinks ) {
-                                                        if ( $permalink_structure &amp;&amp; ! $usingpi &amp;&amp; ! $writable ) {
-                                                                _e( 'If your &lt;code&gt;web.config&lt;/code&gt; file were &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot;&gt;writable&lt;/a&gt;, we could do this automatically, but it isn&amp;#8217;t so this is the url rewrite rule you should have in your &lt;code&gt;web.config&lt;/code&gt; file. Click in the field and press &lt;kbd&gt;CTRL + a&lt;/kbd&gt; to select all. Then insert this rule inside of the &lt;code&gt;/&amp;lt;configuration&amp;gt;/&amp;lt;system.webServer&amp;gt;/&amp;lt;rewrite&amp;gt;/&amp;lt;rules&amp;gt;&lt;/code&gt; element in &lt;code&gt;web.config&lt;/code&gt; file.' )
-                                                                ?&gt;&lt;br /&gt;&lt;br /&gt;&lt;textarea rows=&quot;9&quot; class=&quot;large-text readonly&quot; style=&quot;background: #fff;&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_html($wp_rewrite-&gt;iis7_url_rewrite_rules()); ?&gt;&lt;/textarea&gt;&lt;/p&gt;&lt;?php
-                                                        } else if ( $permalink_structure &amp;&amp; ! $usingpi &amp;&amp; $writable )
-                                                                _e( 'Permalink structure updated. Remove write access on web.config file now!' );
-                                                } else {
-                                                        _e( 'If your &lt;code&gt;.htaccess&lt;/code&gt; file were &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot;&gt;writable&lt;/a&gt;, we could do this automatically, but it isn&amp;#8217;t so these are the mod_rewrite rules you should have in your &lt;code&gt;.htaccess&lt;/code&gt; file. Click in the field and press &lt;kbd&gt;CTRL + a&lt;/kbd&gt; to select all.' );
-                                                        ?&gt;&lt;br /&gt;&lt;br /&gt;&lt;textarea rows=&quot;6&quot; class=&quot;large-text readonly&quot; style=&quot;background: #fff;&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_html($wp_rewrite-&gt;mod_rewrite_rules()); ?&gt;&lt;/textarea&gt;&lt;?php
-                                                }
-                                        ?&gt;
</del><ins>+                                                        if ( $iis7_permalinks ) {
</ins><span class="cx"> 
</span><del>-                                        &lt;br /&gt;&lt;br /&gt;
</del><ins>+                                                                if ( $permalink_structure &amp;&amp; ! $usingpi &amp;&amp; ! $writable ) {
</ins><span class="cx"> 
</span><del>-                                        &lt;?php
-                                                if ( empty( $iis7_permalinks ) )
-                                                        _e( 'Paste all these rules into a new &lt;code&gt;.htaccess&lt;/code&gt; file in the root of your WordPress installation and save the file. Once you\'re done, please hit the &quot;Save and Next&quot; button to continue.', 'buddypress' );
-                                        ?&gt;
</del><ins>+                                                                        _e( 'If your &lt;code&gt;web.config&lt;/code&gt; file were &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot;&gt;writable&lt;/a&gt;, we could do this automatically, but it isn&amp;#8217;t so this is the url rewrite rule you should have in your &lt;code&gt;web.config&lt;/code&gt; file. Click in the field and press &lt;kbd&gt;CTRL + a&lt;/kbd&gt; to select all. Then insert this rule inside of the &lt;code&gt;/&amp;lt;configuration&amp;gt;/&amp;lt;system.webServer&amp;gt;/&amp;lt;rewrite&amp;gt;/&amp;lt;rules&amp;gt;&lt;/code&gt; element in &lt;code&gt;web.config&lt;/code&gt; file.' ); ?&gt;
</ins><span class="cx"> 
</span><ins>+                                                                        &lt;br /&gt;&lt;br /&gt;
+                                                                
+                                                                        &lt;textarea rows=&quot;9&quot; class=&quot;large-text readonly&quot; style=&quot;background: #fff;&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_html( $wp_rewrite-&gt;iis7_url_rewrite_rules() ); ?&gt;&lt;/textarea&gt;
+                                                                
+                                                                &lt;?php
+
+                                                                } else if ( $permalink_structure &amp;&amp; ! $usingpi &amp;&amp; $writable ); {
+
+                                                                                _e( 'Permalink structure updated. Remove write access on web.config file now!' );
+                                                                }
+
+                                                        } else {
+
+                                                                _e( 'If your &lt;code&gt;.htaccess&lt;/code&gt; file were &lt;a href=&quot;http://codex.wordpress.org/Changing_File_Permissions&quot;&gt;writable&lt;/a&gt;, we could do this automatically, but it isn&amp;#8217;t so these are the mod_rewrite rules you should have in your &lt;code&gt;.htaccess&lt;/code&gt; file. Click in the field and press &lt;kbd&gt;CTRL + a&lt;/kbd&gt; to select all.' ); ?&gt;
+
+                                                                &lt;br /&gt;&lt;br /&gt;
+                                                                
+                                                                &lt;textarea rows=&quot;6&quot; class=&quot;large-text readonly&quot; style=&quot;background: #fff;&quot; name=&quot;rules&quot; id=&quot;rules&quot; readonly=&quot;readonly&quot;&gt;&lt;?php echo esc_html( $wp_rewrite-&gt;mod_rewrite_rules() ); ?&gt;&lt;/textarea&gt;
+
+                                                        &lt;?php } ?&gt;
+
+                                                &lt;br /&gt;&lt;br /&gt;
+
+                                                &lt;?php
+                                                        if ( empty( $iis7_permalinks ) )
+                                                                _e( 'Paste all these rules into a new &lt;code&gt;.htaccess&lt;/code&gt; file in the root of your WordPress installation and save the file. Once you\'re done, please hit the &quot;Save and Next&quot; button to continue.', 'buddypress' );
+                                                ?&gt;
+
</ins><span class="cx">                                         &lt;/p&gt;&lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php
</span></span></pre></div>
<a id="trunkbpcorebpcorecatchuriphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-catchuri.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-catchuri.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-core/bp-core-catchuri.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if ( !in_array( 0, (array) $matches ) ) {
</span><del>-                                $match = $bp_page;
</del><ins>+                                $match      = $bp_page;
</ins><span class="cx">                                 $match-&gt;key = $page_key;
</span><span class="cx">                                 break;
</span><span class="cx">                         };
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Find the offset
</span><span class="cx">         $uri_offset = 0;
</span><del>-        $slug = explode( '/', $match-&gt;slug );
</del><ins>+        $slug = isset( $match ) ? explode( '/', $match-&gt;slug ) : '';
</ins><span class="cx"> 
</span><span class="cx">         if ( !empty( $slug ) &amp;&amp; 1 != count( $slug ) ) {
</span><span class="cx">                 array_pop( $slug );
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">         $bp_unfiltered_uri_offset = $uri_offset;
</span><span class="cx"> 
</span><span class="cx">         // This is a members page so lets check if we have a displayed member
</span><del>-        if ( 'members' == $match-&gt;key ) {
</del><ins>+        if ( isset( $match ) &amp;&amp; 'members' == $match-&gt;key ) {
</ins><span class="cx">                 if ( !empty( $bp_uri[$uri_offset + 1] ) ) {
</span><span class="cx">                         if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) )
</span><span class="cx">                                 $bp-&gt;displayed_user-&gt;id = (int) bp_core_get_userid( urldecode( $bp_uri[$uri_offset + 1] ) );
</span></span></pre></div>
<a id="trunkbpcorebpcoreclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-classes.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-classes.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-core/bp-core-classes.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -222,6 +222,8 @@
</span><span class="cx">                  * We can't add these to the main query above since only users who have this information will be returned (since the much of the data is in usermeta and won't support any type of directional join)
</span><span class="cx">                  */
</span><span class="cx">                 if ( $populate_extras ) {
</span><ins>+                        $user_ids = array();
+
</ins><span class="cx">                         foreach ( (array)$paged_users as $user )
</span><span class="cx">                                 $user_ids[] = $user-&gt;id;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcorebpcorefunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-functions.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-functions.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-core/bp-core-functions.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -446,7 +446,7 @@
</span><span class="cx">         if ( is_multisite() )
</span><span class="cx">                 $site_path = $current_site-&gt;path;
</span><span class="cx">         else {
</span><del>-                $site_path = (array) explode( '/', site_url() );
</del><ins>+                $site_path = (array) explode( '/', home_url() );
</ins><span class="cx"> 
</span><span class="cx">                 if ( count( $site_path ) &lt; 2 )
</span><span class="cx">                         $site_path = '/';
</span><span class="lines">@@ -532,21 +532,21 @@
</span><span class="cx">         if ( empty( $slug ) ) {
</span><span class="cx">                 switch ( $search_which ) {
</span><span class="cx">                         case 'blogs':
</span><del>-                                $slug = bp_is_active( 'blogs' )  ? $bp-&gt;blogs-&gt;slug  : '';
</del><ins>+                                $slug = bp_is_active( 'blogs' )  ? $bp-&gt;blogs-&gt;root_slug  : '';
</ins><span class="cx">                                 break;
</span><span class="cx"> 
</span><span class="cx">                         case 'forums':
</span><del>-                                $slug = bp_is_active( 'forums' ) ? $bp-&gt;forums-&gt;slug : '';
</del><ins>+                                $slug = bp_is_active( 'forums' ) ? $bp-&gt;forums-&gt;root_slug : '';
</ins><span class="cx">                                 $query_string = '/?fs=';
</span><span class="cx">                                 break;
</span><span class="cx"> 
</span><span class="cx">                         case 'groups':
</span><del>-                                $slug = bp_is_active( 'groups' ) ? $bp-&gt;groups-&gt;slug : '';
</del><ins>+                                $slug = bp_is_active( 'groups' ) ? $bp-&gt;groups-&gt;root_slug : '';
</ins><span class="cx">                                 break;
</span><span class="cx"> 
</span><span class="cx">                         case 'members':
</span><span class="cx">                         default:
</span><del>-                                $slug = $bp-&gt;members-&gt;slug;
</del><ins>+                                $slug = $bp-&gt;members-&gt;root_slug;
</ins><span class="cx">                                 break;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -556,7 +556,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        bp_core_redirect( apply_filters( 'bp_core_search_site', site_url( $slug . $query_string . urlencode( $search_terms ) ), $search_terms ) );
</del><ins>+        bp_core_redirect( apply_filters( 'bp_core_search_site', home_url( $slug . $query_string . urlencode( $search_terms ) ), $search_terms ) );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'bp_init', 'bp_core_action_search_site', 7 );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-template.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-template.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-core/bp-core-template.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -385,14 +385,14 @@
</span><span class="cx">                 $options['members'] = __( 'Members', 'buddypress' );
</span><span class="cx"> 
</span><span class="cx">         if ( bp_is_active( 'groups' ) )
</span><del>-                $options['groups'] = __( 'Groups', 'buddypress' );
</del><ins>+                $options['groups']  = __( 'Groups',  'buddypress' );
</ins><span class="cx"> 
</span><ins>+        if ( bp_is_active( 'blogs' ) &amp;&amp; is_multisite() )
+                $options['blogs']   = __( 'Blogs',   'buddypress' );
+
</ins><span class="cx">         if ( bp_is_active( 'forums' ) &amp;&amp; bp_forums_is_installed_correctly() &amp;&amp; !bp_forum_directory_is_disabled() )
</span><del>-                $options['forums'] = __( 'Forums', 'buddypress' );
</del><ins>+                $options['forums']  = __( 'Forums',  'buddypress' );
</ins><span class="cx"> 
</span><del>-        if ( bp_is_active( 'blogs' ) &amp;&amp; is_multisite() )
-                $options['blogs'] = __( 'Blogs', 'buddypress' );
-
</del><span class="cx">         // Eventually this won't be needed and a page will be built to integrate all search results.
</span><span class="cx">         $selection_box = '&lt;select name=&quot;search-which&quot; id=&quot;search-which&quot; style=&quot;width: auto&quot;&gt;';
</span><span class="cx"> 
</span><span class="lines">@@ -416,9 +416,9 @@
</span><span class="cx">         echo bp_get_search_default_text();
</span><span class="cx"> }
</span><span class="cx">         function bp_get_search_default_text( $component = false ) {
</span><del>-                 global $bp;
</del><ins>+                global $bp;
</ins><span class="cx"> 
</span><del>-                 if ( empty( $component ) )
</del><ins>+                if ( empty( $component ) )
</ins><span class="cx">                         $component = $bp-&gt;current_component;
</span><span class="cx"> 
</span><span class="cx">                 $default_text = __( 'Search anything...', 'buddypress' );
</span><span class="lines">@@ -722,7 +722,7 @@
</span><span class="cx">                 // non-translatable component name. If so, we can return its
</span><span class="cx">                 // corresponding slug from $bp-&gt;active_components.
</span><span class="cx">                 } else if ( $key = array_search( $component, $bp-&gt;active_components ) ) {
</span><del>-                        if ( $key === $bp-&gt;current_component )
</del><ins>+                        if ( strstr( $bp-&gt;current_component, $key ) )
</ins><span class="cx">                                 $is_current_component = true;
</span><span class="cx"> 
</span><span class="cx">                 // If we haven't found a match yet, check against the root_slugs
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-loader.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-loader.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-groups/bp-groups-loader.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx"> function groups_directory_groups_setup() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        if ( bp_is_current_component( $bp-&gt;groups-&gt;slug ) &amp;&amp; empty( $bp-&gt;current_action ) &amp;&amp; empty( $bp-&gt;current_item ) ) {
</del><ins>+        if ( bp_is_current_component( $bp-&gt;groups-&gt;id ) &amp;&amp; empty( $bp-&gt;current_action ) &amp;&amp; empty( $bp-&gt;current_item ) ) {
</ins><span class="cx">                 $bp-&gt;is_directory = true;
</span><span class="cx"> 
</span><span class="cx">                 do_action( 'groups_directory_groups_setup' );
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-template.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-template.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-groups/bp-groups-template.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -211,19 +211,19 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         $defaults = array(
</span><del>-                'type' =&gt; $type,
-                'page' =&gt; 1,
-                'per_page' =&gt; 20,
-                'max' =&gt; false,
-                'show_hidden' =&gt; false,
</del><ins>+                'type'            =&gt; $type,
+                'page'            =&gt; 1,
+                'per_page'        =&gt; 20,
+                'max'             =&gt; false,
+                'show_hidden'     =&gt; false,
</ins><span class="cx"> 
</span><del>-                'user_id' =&gt; $user_id, // Pass a user ID to limit to groups this user has joined
-                'slug' =&gt; $slug, // Pass a group slug to only return that group
-                'search_terms' =&gt; '', // Pass search terms to return only matching groups
-                'include' =&gt; false, // Pass comma separated list of group ID's to return only these groups
-                'exclude' =&gt; false, // Pass comma separated list of group ID's to exclude these groups
</del><ins>+                'user_id'         =&gt; $user_id, // Pass a user ID to limit to groups this user has joined
+                'slug'            =&gt; $slug,    // Pass a group slug to only return that group
+                'search_terms'    =&gt; '',       // Pass search terms to return only matching groups
+                'include'         =&gt; false,    // Pass comma separated list of group ID's to return only these groups
+                'exclude'         =&gt; false,    // Pass comma separated list of group ID's to exclude these groups
</ins><span class="cx"> 
</span><del>-                'populate_extras' =&gt; true // Get extra meta - is_member, is_banned
</del><ins>+                'populate_extras' =&gt; true      // Get extra meta - is_member, is_banned
</ins><span class="cx">         );
</span><span class="cx"> 
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/header.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/header.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-themes/bp-default/header.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -11,10 +11,10 @@
</span><span class="cx">                 &lt;link rel=&quot;pingback&quot; href=&quot;&lt;?php bloginfo( 'pingback_url' ) ?&gt;&quot; /&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;?php
</span><del>-                if ( is_singular() &amp;&amp; bp_is_blog_page() &amp;&amp; get_option( 'thread_comments' ) )
-                        wp_enqueue_script( 'comment-reply' );
</del><ins>+                        if ( is_singular() &amp;&amp; bp_is_blog_page() &amp;&amp; get_option( 'thread_comments' ) )
+                                wp_enqueue_script( 'comment-reply' );
</ins><span class="cx"> 
</span><del>-                wp_head();
</del><ins>+                        wp_head();
</ins><span class="cx">                 ?&gt;
</span><span class="cx">         &lt;/head&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -33,13 +33,18 @@
</span><span class="cx">                                 &lt;div class=&quot;padder&quot;&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php if ( bp_search_form_enabled() ) : ?&gt;
</span><ins>+
</ins><span class="cx">                                         &lt;form action=&quot;&lt;?php echo bp_search_form_action() ?&gt;&quot; method=&quot;post&quot; id=&quot;search-form&quot;&gt;
</span><del>-                                                &lt;input type=&quot;text&quot; id=&quot;search-terms&quot; name=&quot;search-terms&quot; value=&quot;&quot; /&gt;
</del><ins>+                                                &lt;input type=&quot;text&quot; id=&quot;search-terms&quot; name=&quot;search-terms&quot; value=&quot;&lt;?php echo isset( $_REQUEST['s'] ) ? esc_attr( $_REQUEST['s'] ) : ''; ?&gt;&quot; /&gt;
+
</ins><span class="cx">                                                 &lt;?php echo bp_search_form_type_select() ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                                 &lt;input type=&quot;submit&quot; name=&quot;search-submit&quot; id=&quot;search-submit&quot; value=&quot;&lt;?php _e( 'Search', 'buddypress' ) ?&gt;&quot; /&gt;
</span><ins>+
</ins><span class="cx">                                                 &lt;?php wp_nonce_field( 'bp_search_form' ) ?&gt;
</span><ins>+
</ins><span class="cx">                                         &lt;/form&gt;&lt;!-- #search-form --&gt;
</span><ins>+
</ins><span class="cx">                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php do_action( 'bp_search_login_bar' ) ?&gt;
</span><span class="lines">@@ -54,4 +59,4 @@
</span><span class="cx">                 &lt;?php do_action( 'bp_after_header' ) ?&gt;
</span><span class="cx">                 &lt;?php do_action( 'bp_before_container' ) ?&gt;
</span><span class="cx"> 
</span><del>-                &lt;div id=&quot;container&quot;&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+                &lt;div id=&quot;container&quot;&gt;
</ins></span></pre></div>
<a id="trunkbpusersbpusersscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-users/bp-users-screens.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-users/bp-users-screens.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-users/bp-users-screens.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> function bp_users_screen_index() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        if ( is_null( $bp-&gt;displayed_user-&gt;id ) &amp;&amp; $bp-&gt;current_component == $bp-&gt;members-&gt;slug ) {
</del><ins>+        if ( empty( $bp-&gt;displayed_user-&gt;id ) &amp;&amp; $bp-&gt;current_component == $bp-&gt;members-&gt;root_slug ) {
</ins><span class="cx">                 $bp-&gt;is_directory = true;
</span><span class="cx"> 
</span><span class="cx">                 do_action( 'bp_users_screen_index' );
</span></span></pre></div>
<a id="trunkbpusersbpuserstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-users/bp-users-template.php (3795 => 3796)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-users/bp-users-template.php        2011-01-21 11:30:24 UTC (rev 3795)
+++ trunk/bp-users/bp-users-template.php        2011-01-21 13:05:56 UTC (rev 3796)
</span><span class="lines">@@ -125,9 +125,9 @@
</span><span class="cx">          * if arguments are directly passed into the loop. Custom plugins should always
</span><span class="cx">          * pass their parameters directly to the loop.
</span><span class="cx">          */
</span><del>-        $type = 'active';
-        $user_id = 0;
-        $page = 1;
</del><ins>+        $type         = 'active';
+        $user_id      = 0;
+        $page         = 1;
</ins><span class="cx">         $search_terms = null;
</span><span class="cx"> 
</span><span class="cx">         // User filtering
</span><span class="lines">@@ -136,18 +136,18 @@
</span><span class="cx"> 
</span><span class="cx">         // type: active ( default ) | random | newest | popular | online | alphabetical
</span><span class="cx">         $defaults = array(
</span><del>-                'type' =&gt; $type,
-                'page' =&gt; $page,
-                'per_page' =&gt; 20,
-                'max' =&gt; false,
</del><ins>+                'type'            =&gt; $type,
+                'page'            =&gt; $page,
+                'per_page'        =&gt; 20,
+                'max'             =&gt; false,
</ins><span class="cx"> 
</span><del>-                'include' =&gt; false, // Pass a user_id or a list (comma-separated or array) of user_ids to only show these users
-                'exclude' =&gt; false, // Pass a user_id or a list (comma-separated or array) of user_ids to exclude these users
</del><ins>+                'include'         =&gt; false,         // Pass a user_id or a list (comma-separated or array) of user_ids to only show these users
+                'exclude'         =&gt; false,         // Pass a user_id or a list (comma-separated or array) of user_ids to exclude these users
</ins><span class="cx"> 
</span><del>-                'user_id' =&gt; $user_id, // Pass a user_id to only show friends of this user
-                'search_terms' =&gt; $search_terms, // Pass search_terms to filter users by their profile data
</del><ins>+                'user_id'         =&gt; $user_id,      // Pass a user_id to only show friends of this user
+                'search_terms'    =&gt; $search_terms, // Pass search_terms to filter users by their profile data
</ins><span class="cx"> 
</span><del>-                'populate_extras' =&gt; true // Fetch usermeta? Friend count, last active etc.
</del><ins>+                'populate_extras' =&gt; true           // Fetch usermeta? Friend count, last active etc.
</ins><span class="cx">         );
</span><span class="cx"> 
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span></span></pre>
</div>
</div>

</body>
</html>