<!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][4596] trunk: Introduce _has_directory() functions for forums, groups, members, and activity components.</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>4596</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-07-04 14:07:08 +0000 (Mon, 04 Jul 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Introduce _has_directory() functions for forums, groups, members, and activity components. This replaces the need for enabling/disabling the forum directory, since if it is not set it does not exist.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityfunctionsphp">trunk/bp-activity/bp-activity-functions.php</a></li>
<li><a href="#trunkbpblogsbpblogsfunctionsphp">trunk/bp-blogs/bp-blogs-functions.php</a></li>
<li><a href="#trunkbpcoreadminbpcoreadminphp">trunk/bp-core/admin/bp-core-admin.php</a></li>
<li><a href="#trunkbpcorebpcorefiltersphp">trunk/bp-core/bp-core-filters.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="#trunkbpforumsbpforumsfunctionsphp">trunk/bp-forums/bp-forums-functions.php</a></li>
<li><a href="#trunkbpforumsbpforumsscreensphp">trunk/bp-forums/bp-forums-screens.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsfunctionsphp">trunk/bp-groups/bp-groups-functions.php</a></li>
<li><a href="#trunkbpmembersbpmembersfunctionsphp">trunk/bp-members/bp-members-functions.php</a></li>
<li><a href="#trunkbpthemesbpdefaultforumssingleeditphp">trunk/bp-themes/bp-default/forums/single/edit.php</a></li>
<li><a href="#trunkbpthemesbpdefaultforumssingleforumphp">trunk/bp-themes/bp-default/forums/single/forum.php</a></li>
<li><a href="#trunkbpthemesbpdefaultforumssingletopicphp">trunk/bp-themes/bp-default/forums/single/topic.php</a></li>
<li><a href="#trunkbpthemesbpdefaultfunctionsphp">trunk/bp-themes/bp-default/functions.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssingleforumeditphp">trunk/bp-themes/bp-default/groups/single/forum/edit.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssingleforumtopicphp">trunk/bp-themes/bp-default/groups/single/forum/topic.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssingleforumphp">trunk/bp-themes/bp-default/groups/single/forum.php</a></li>
<li><a href="#trunkbpxprofilebpxprofileadminphp">trunk/bp-xprofile/bp-xprofile-admin.php</a></li>
<li><a href="#trunkbpxprofilebpxprofilebuddybarphp">trunk/bp-xprofile/bp-xprofile-buddybar.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-functions.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-functions.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-activity/bp-activity-functions.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -10,6 +10,20 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Checks $bp pages global and looks for directory page
+ *
+ * @since 1.3
+ *
+ * @global object $bp Global BuddyPress settings object
+ * @return bool True if set, False if empty
+ */
+function bp_activity_has_directory() {
+        global $bp;
+
+        return (bool) !empty( $bp-&gt;pages-&gt;activity-&gt;id );
+}
+
+/**
</ins><span class="cx">  * Searches through the content of an activity item to locate usernames, designated by an @ sign
</span><span class="cx">  *
</span><span class="cx">  * @package BuddyPress Activity
</span></span></pre></div>
<a id="trunkbpblogsbpblogsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-functions.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-functions.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-blogs/bp-blogs-functions.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -1,12 +1,19 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><del>-/*******************************************************************************
- * Business functions are where all the magic happens in BuddyPress. They will
- * handle the actual saving or manipulation of information. Usually they will
- * hand off to a database class for data access, then return
- * true or false on success or failure.
</del><ins>+/**
+ * Checks $bp pages global and looks for directory page
+ *
+ * @since 1.3
+ *
+ * @global object $bp Global BuddyPress settings object
+ * @return bool True if set, False if empty
</ins><span class="cx">  */
</span><ins>+function bp_blogs_has_directory() {
+        global $bp;
</ins><span class="cx"> 
</span><ins>+        return (bool) !empty( $bp-&gt;pages-&gt;blogs-&gt;id );
+}
+
</ins><span class="cx"> function bp_blogs_get_blogs( $args = '' ) {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcoreadminbpcoreadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-admin.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-admin.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-core/admin/bp-core-admin.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -117,18 +117,6 @@
</span><span class="cx">                                                 &lt;/td&gt;
</span><span class="cx">                                         &lt;/tr&gt;
</span><span class="cx"> 
</span><del>-                                        &lt;?php if ( bp_is_active( 'forums' ) ) : ?&gt;
-
-                                                &lt;tr&gt;
-                                                        &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Disable global forum directory?', 'buddypress' ) ?&gt;:&lt;/th&gt;
-                                                        &lt;td&gt;
-                                                                &lt;input type=&quot;radio&quot; name=&quot;bp-admin[bp-disable-forum-directory]&quot;&lt;?php if ( (int)bp_get_option( 'bp-disable-forum-directory' ) ) : ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt; id=&quot;bp-disable-forum-directory&quot; value=&quot;1&quot; /&gt; &lt;?php _e( 'Yes', 'buddypress' ) ?&gt; &amp;nbsp;
-                                                                &lt;input type=&quot;radio&quot; name=&quot;bp-admin[bp-disable-forum-directory]&quot;&lt;?php if ( !(int)bp_get_option( 'bp-disable-forum-directory' ) ) : ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt; id=&quot;bp-disable-forum-directory&quot; value=&quot;0&quot; /&gt; &lt;?php _e( 'No', 'buddypress' ) ?&gt;
-                                                        &lt;/td&gt;
-                                                &lt;/tr&gt;
-
-                                        &lt;?php endif; ?&gt;
-
</del><span class="cx">                                         &lt;?php if ( bp_is_active( 'activity' ) ) : ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                                 &lt;tr&gt;
</span></span></pre></div>
<a id="trunkbpcorebpcorefiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-filters.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-filters.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-core/bp-core-filters.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -18,9 +18,8 @@
</span><span class="cx">         if ( !empty( $bp-&gt;pages-&gt;register ) )
</span><span class="cx">                 $pages[] = $bp-&gt;pages-&gt;register-&gt;id;
</span><span class="cx"> 
</span><del>-        if ( !bp_is_active( 'forums' ) || ( bp_is_active( 'forums' ) &amp;&amp; !bp_forums_is_installed_correctly() ) )
-                if ( !empty( $bp-&gt;pages-&gt;forums ) )
-                        $pages[] = $bp-&gt;pages-&gt;forums-&gt;id;
</del><ins>+        if ( !bp_is_active( 'forums' ) || ( bp_is_active( 'forums' ) &amp;&amp; bp_forums_has_directory() &amp;&amp; !bp_forums_is_installed_correctly() ) )
+                $pages[] = $bp-&gt;pages-&gt;forums-&gt;id;
</ins><span class="cx"> 
</span><span class="cx">         return apply_filters( 'bp_core_exclude_pages', $pages );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpcorebpcorefunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-functions.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-functions.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-core/bp-core-functions.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -280,8 +280,7 @@
</span><span class="cx">         $hooks = array();
</span><span class="cx"> 
</span><span class="cx">         // Add the administration tab under the &quot;Site Admin&quot; tab for site administrators
</span><del>-        $hooks[] = add_menu_page( __( 'BuddyPress', 'buddypress' ), __( 'BuddyPress', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_component_setup', '', 4 );
-
</del><ins>+        $hooks[] = add_menu_page( __( 'BuddyPress', 'buddypress' ), __( 'BuddyPress', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_component_setup', '' );
</ins><span class="cx">         $hooks[] = add_submenu_page( 'bp-general-settings', __( 'Components', 'buddypress' ), __( 'Components', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_component_setup'  );
</span><span class="cx">         $hooks[] = add_submenu_page( 'bp-general-settings', __( 'Settings',   'buddypress' ), __( 'Settings',   'buddypress' ), 'manage_options', 'bp-settings',         'bp_core_admin_settings'         );
</span><span class="cx"> 
</span><span class="lines">@@ -996,7 +995,6 @@
</span><span class="cx">         'bp-disable-profile-sync'         =&gt; '0',
</span><span class="cx">         'bp-disable-avatar-uploads'       =&gt; '0',
</span><span class="cx">         'bp-disable-account-deletion'     =&gt; '0',
</span><del>-        'bp-disable-forum-directory'      =&gt; '0',
</del><span class="cx">         'bp-disable-blogforum-comments'   =&gt; '0',
</span><span class="cx">         'bb-config-location'              =&gt; ABSPATH,
</span><span class="cx">         'hide-loggedout-adminbar'         =&gt; '0',
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-template.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-template.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-core/bp-core-template.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx">         if ( bp_is_active( 'blogs' ) &amp;&amp; is_multisite() )
</span><span class="cx">                 $options['blogs']   = __( 'Blogs',   'buddypress' );
</span><span class="cx"> 
</span><del>-        if ( bp_is_active( 'forums' ) &amp;&amp; bp_forums_is_installed_correctly() &amp;&amp; !bp_forum_directory_is_disabled() )
</del><ins>+        if ( bp_is_active( 'forums' ) &amp;&amp; bp_forums_is_installed_correctly() &amp;&amp; bp_forums_has_directory() )
</ins><span class="cx">                 $options['forums']  = __( 'Forums',  'buddypress' );
</span><span class="cx"> 
</span><span class="cx">         $options['posts'] = __( 'Posts', 'buddypress' );
</span></span></pre></div>
<a id="trunkbpforumsbpforumsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-functions.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-functions.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-forums/bp-forums-functions.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -11,17 +11,17 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Convenience function to determine if the forum directory has been disabled
- * by the site admin.
</del><ins>+ * Checks $bp pages global and looks for directory page
</ins><span class="cx">  *
</span><ins>+ * @since 1.3
+ *
</ins><span class="cx">  * @global object $bp Global BuddyPress settings object
</span><del>- * @return bool True if forum is disabled
- * @since 1.3
</del><ins>+ * @return bool True if set, False if empty
</ins><span class="cx">  */
</span><del>-function bp_forum_directory_is_disabled() {
</del><ins>+function bp_forums_has_directory() {
</ins><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        return !empty( $bp-&gt;site_options['bp-disable-forum-directory'] );
</del><ins>+        return (bool) !empty( $bp-&gt;pages-&gt;forums-&gt;id );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /** Forum Functions ***********************************************************/
</span></span></pre></div>
<a id="trunkbpforumsbpforumsscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-screens.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-screens.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-forums/bp-forums-screens.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><span class="cx">         if ( bp_is_forums_component() &amp;&amp; ( !bp_current_action() || ( 'tag' == bp_current_action() &amp;&amp; bp_action_variables() ) ) &amp;&amp; !bp_current_item() ) {
</span><del>-                if ( bp_forum_directory_is_disabled() )
</del><ins>+                if ( !bp_forums_has_directory() )
</ins><span class="cx">                         return false;
</span><span class="cx"> 
</span><span class="cx">                 if ( !bp_forums_is_installed_correctly() ) {
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-functions.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-functions.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-groups/bp-groups-functions.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -7,6 +7,20 @@
</span><span class="cx">  * true or false on success or failure.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+/**
+ * Checks $bp pages global and looks for directory page
+ *
+ * @since 1.3
+ *
+ * @global object $bp Global BuddyPress settings object
+ * @return bool True if set, False if empty
+ */
+function bp_groups_has_directory() {
+        global $bp;
+
+        return (bool) !empty( $bp-&gt;pages-&gt;groups-&gt;id );
+}
+
</ins><span class="cx"> function groups_get_group( $args = '' ) {
</span><span class="cx">         $defaults = array(
</span><span class="cx">                 'group_id'   =&gt; false,
</span></span></pre></div>
<a id="trunkbpmembersbpmembersfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-functions.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-functions.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-members/bp-members-functions.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -9,7 +9,20 @@
</span><span class="cx">  * @subpackage Members
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+/**
+ * Checks $bp pages global and looks for directory page
+ *
+ * @since 1.3
+ *
+ * @global object $bp Global BuddyPress settings object
+ * @return bool True if set, False if empty
+ */
+function bp_members_has_directory() {
+        global $bp;
</ins><span class="cx"> 
</span><ins>+        return (bool) !empty( $bp-&gt;pages-&gt;members-&gt;id );
+}
+
</ins><span class="cx"> /**
</span><span class="cx">  * Define the slugs used for BuddyPress pages, based on the slugs of the WP pages used.
</span><span class="cx">  * These can be overridden manually by defining these slugs in wp-config.php.
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultforumssingleeditphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/forums/single/edit.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/single/edit.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-themes/bp-default/forums/single/edit.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx">                                         &lt;a href=&quot;#post-topic-reply&quot;&gt;&lt;?php _e( 'Reply', 'buddypress' ); ?&gt;&lt;/a&gt;
</span><span class="cx">                                 &lt;/li&gt;
</span><span class="cx"> 
</span><del>-                                &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
</del><ins>+                                &lt;?php if ( bp_forums_has_directory() ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                         &lt;li&gt;
</span><span class="cx">                                                 &lt;a href=&quot;&lt;?php bp_forum_directory_permalink(); ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress'); ?&gt;&lt;/a&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultforumssingleforumphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/forums/single/forum.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/single/forum.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-themes/bp-default/forums/single/forum.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx">                                                                 &lt;a href=&quot;#post-new&quot; class=&quot;show-hide-new&quot;&gt;&lt;?php _e( 'New Topic', 'buddypress' ) ?&gt;&lt;/a&gt;
</span><span class="cx">                                                         &lt;/li&gt;
</span><span class="cx"> 
</span><del>-                                                        &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
</del><ins>+                                                        &lt;?php if ( bp_forums_has_directory() ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                                                 &lt;li&gt;
</span><span class="cx">                                                                         &lt;a href=&quot;&lt;?php bp_forum_directory_permalink() ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress') ?&gt;&lt;/a&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultforumssingletopicphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/forums/single/topic.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/forums/single/topic.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-themes/bp-default/forums/single/topic.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">                                                                         &lt;a href=&quot;#post-topic-reply&quot; class=&quot;show-hide-new&quot;&gt;&lt;?php _e( 'New Reply', 'buddypress' ) ?&gt;&lt;/a&gt;
</span><span class="cx">                                                                 &lt;/li&gt;
</span><span class="cx"> 
</span><del>-                                                                &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
</del><ins>+                                                                &lt;?php if ( bp_forums_has_directory() ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                                                         &lt;li&gt;
</span><span class="cx">                                                                                 &lt;a href=&quot;&lt;?php bp_forum_directory_permalink() ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress') ?&gt;&lt;/a&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/functions.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/functions.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-themes/bp-default/functions.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -552,14 +552,6 @@
</span><span class="cx">                 'exclude'    =&gt; '',
</span><span class="cx">                 'title_li'   =&gt; ''
</span><span class="cx">         );
</span><del>-
-        if ( ( !bp_is_active( 'forums' ) || bp_forum_directory_is_disabled() ) &amp;&amp; !empty( $bp-&gt;pages-&gt;forums-&gt;id ) ) {
-                if ( !empty( $pages_args['exclude'] ) )
-                                $pages_args['exclude'] .= ',';
-
-                $pages_args['exclude'] .= $bp-&gt;pages-&gt;forums-&gt;id;
-        }
-
</del><span class="cx">         $menu = wp_page_menu( $pages_args );
</span><span class="cx">         $menu = str_replace( array( '&lt;div class=&quot;menu&quot;&gt;&lt;ul&gt;', '&lt;/ul&gt;&lt;/div&gt;' ), array( '&lt;ul id=&quot;nav&quot;&gt;', '&lt;/ul&gt;&lt;!-- #nav --&gt;' ), $menu );
</span><span class="cx">         echo $menu;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssingleforumeditphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/forum/edit.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/forum/edit.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-themes/bp-default/groups/single/forum/edit.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx">                                         &lt;a href=&quot;#post-topic-reply&quot;&gt;&lt;?php _e( 'Reply', 'buddypress' ); ?&gt;&lt;/a&gt;
</span><span class="cx">                                 &lt;/li&gt;
</span><span class="cx"> 
</span><del>-                                &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
</del><ins>+                                &lt;?php if ( bp_forums_has_directory() ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                         &lt;li&gt;
</span><span class="cx">                                                 &lt;a href=&quot;&lt;?php bp_forum_directory_permalink(); ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress'); ?&gt;&lt;/a&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssingleforumtopicphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/forum/topic.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/forum/topic.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-themes/bp-default/groups/single/forum/topic.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx">                                         &lt;a href=&quot;#post-topic-reply&quot; class=&quot;show-hide-new&quot;&gt;&lt;?php _e( 'New Reply', 'buddypress' ) ?&gt;&lt;/a&gt;
</span><span class="cx">                                 &lt;/li&gt;
</span><span class="cx"> 
</span><del>-                                &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
</del><ins>+                                &lt;?php if ( bp_forums_has_directory() ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                         &lt;li&gt;
</span><span class="cx">                                                 &lt;a href=&quot;&lt;?php bp_forum_directory_permalink() ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress') ?&gt;&lt;/a&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssingleforumphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/forum.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/forum.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-themes/bp-default/groups/single/forum.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">                                 &lt;a href=&quot;#post-new&quot; class=&quot;show-hide-new&quot;&gt;&lt;?php _e( 'New Topic', 'buddypress' ) ?&gt;&lt;/a&gt;
</span><span class="cx">                         &lt;/li&gt;
</span><span class="cx"> 
</span><del>-                        &lt;?php if ( !bp_forum_directory_is_disabled() ) : ?&gt;
</del><ins>+                        &lt;?php if ( bp_forums_has_directory() ) : ?&gt;
</ins><span class="cx"> 
</span><span class="cx">                                 &lt;li&gt;
</span><span class="cx">                                         &lt;a href=&quot;&lt;?php bp_forum_directory_permalink() ?&gt;&quot;&gt;&lt;?php _e( 'Forum Directory', 'buddypress') ?&gt;&lt;/a&gt;
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofileadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-admin.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-admin.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-xprofile/bp-xprofile-admin.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -1,6 +1,32 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Creates the administration interface menus and checks to see if the DB
+ * tables are set up.
+ *
+ * @package BuddyPress XProfile
+ * @global object $bp Global BuddyPress settings object
+ * @global $wpdb WordPress DB access object.
+ * @uses is_super_admin() returns true if the current user is a site admin, false if not
+ * @uses bp_xprofile_install() runs the installation of DB tables for the xprofile component
+ * @uses wp_enqueue_script() Adds a JS file to the JS queue ready for output
+ * @uses add_submenu_page() Adds a submenu tab to a top level tab in the admin area
+ * @uses xprofile_install() Runs the DB table installation function
+ * @return
+ */
+function xprofile_add_admin_menu() {
+        global $wpdb, $bp;
+
+        if ( !is_super_admin() )
+                return false;
+
+        $hook = add_options_page( __( 'Profiles Fields', 'buddypress' ), __( 'Profile Fields', 'buddypress' ), 'manage_options', 'bp-profile-setup', 'xprofile_admin' );
+        
+        add_action( &quot;admin_print_styles-$hook&quot;, 'bp_core_add_admin_menu_styles' );
+}
+add_action( bp_core_admin_hook(), 'xprofile_add_admin_menu' );
+
+/**
</ins><span class="cx">  * Handles all actions for the admin area for creating, editing and deleting
</span><span class="cx">  * profile groups and fields.
</span><span class="cx">  */
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofilebuddybarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-buddybar.php (4595 => 4596)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-buddybar.php        2011-07-04 07:30:58 UTC (rev 4595)
+++ trunk/bp-xprofile/bp-xprofile-buddybar.php        2011-07-04 14:07:08 UTC (rev 4596)
</span><span class="lines">@@ -1,80 +1,5 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> 
</span><del>-/**
- * Creates the administration interface menus and checks to see if the DB
- * tables are set up.
- *
- * @package BuddyPress XProfile
- * @global object $bp Global BuddyPress settings object
- * @global $wpdb WordPress DB access object.
- * @uses is_super_admin() returns true if the current user is a site admin, false if not
- * @uses bp_xprofile_install() runs the installation of DB tables for the xprofile component
- * @uses wp_enqueue_script() Adds a JS file to the JS queue ready for output
- * @uses add_submenu_page() Adds a submenu tab to a top level tab in the admin area
- * @uses xprofile_install() Runs the DB table installation function
- * @return
- */
-function xprofile_add_admin_menu() {
-        global $wpdb, $bp;
</del><ins>+// Nothing to see here
</ins><span class="cx"> 
</span><del>-        if ( !is_super_admin() )
-                return false;
-
-        // Add the administration tab under the &quot;Site Admin&quot; tab for site administrators
-        $hook = add_submenu_page( 'bp-general-settings', __( 'Profile Fields', 'buddypress' ), __( 'Profile Fields', 'buddypress' ), 'manage_options', 'bp-profile-setup', 'xprofile_admin' );
-        add_action( &quot;admin_print_styles-$hook&quot;, 'bp_core_add_admin_menu_styles' );
-}
-add_action( bp_core_admin_hook(), 'xprofile_add_admin_menu' );
-
-/**
- * Adds an admin bar menu to any profile page providing site admin options
- * for that user.
- *
- * @package BuddyPress XProfile
- * @global $bp BuddyPress
- */
-function xprofile_setup_adminbar_menu() {
-        global $bp;
-
-        if ( !$bp-&gt;displayed_user-&gt;id )
-                return false;
-
-        // Don't show this menu to non site admins or if you're viewing your own profile
-        if ( !is_super_admin() || bp_is_my_profile() )
-                return false; ?&gt;
-
-        &lt;li id=&quot;bp-adminbar-adminoptions-menu&quot;&gt;
-                &lt;a href=&quot;&quot;&gt;&lt;?php _e( 'Admin Options', 'buddypress' ) ?&gt;&lt;/a&gt;
-
-                &lt;ul&gt;
-                        &lt;li&gt;&lt;a href=&quot;&lt;?php echo $bp-&gt;displayed_user-&gt;domain . $bp-&gt;profile-&gt;slug; ?&gt;/edit/&quot;&gt;&lt;?php printf( __( &quot;Edit %s's Profile&quot;, 'buddypress' ), esc_attr( $bp-&gt;displayed_user-&gt;fullname ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
-                        &lt;li&gt;&lt;a href=&quot;&lt;?php echo $bp-&gt;displayed_user-&gt;domain . $bp-&gt;profile-&gt;slug; ?&gt;/change-avatar/&quot;&gt;&lt;?php printf( __( &quot;Edit %s's Avatar&quot;, 'buddypress' ), esc_attr( $bp-&gt;displayed_user-&gt;fullname ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
-
-                        &lt;?php if ( bp_is_active( 'settings' ) ) : ?&gt;
-
-                                &lt;li&gt;&lt;a href=&quot;&lt;?php echo $bp-&gt;displayed_user-&gt;domain . $bp-&gt;settings-&gt;slug; ?&gt;/general/&quot;&gt;&lt;?php printf( __( &quot;Edit %s's Settings&quot;, 'buddypress' ), esc_attr( $bp-&gt;displayed_user-&gt;fullname ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
-
-                        &lt;?php endif; ?&gt;
-
-                        &lt;?php if ( !bp_core_is_user_spammer( $bp-&gt;displayed_user-&gt;id ) ) : ?&gt;
-
-                                &lt;li&gt;&lt;a href=&quot;&lt;?php echo wp_nonce_url( $bp-&gt;displayed_user-&gt;domain . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?&gt;&quot; class=&quot;confirm&quot;&gt;&lt;?php _e( &quot;Mark as Spammer&quot;, 'buddypress' ) ?&gt;&lt;/a&gt;&lt;/li&gt;
-
-                        &lt;?php else : ?&gt;
-
-                                &lt;li&gt;&lt;a href=&quot;&lt;?php echo wp_nonce_url( $bp-&gt;displayed_user-&gt;domain . 'admin/unmark-spammer/', 'mark-unmark-spammer' ) ?&gt;&quot; class=&quot;confirm&quot;&gt;&lt;?php _e( &quot;Not a Spammer&quot;, 'buddypress' ) ?&gt;&lt;/a&gt;&lt;/li&gt;
-
-                        &lt;?php endif; ?&gt;
-
-                        &lt;li&gt;&lt;a href=&quot;&lt;?php echo wp_nonce_url( $bp-&gt;displayed_user-&gt;domain . 'admin/delete-user/', 'delete-user' ) ?&gt;&quot; class=&quot;confirm&quot;&gt;&lt;?php printf( __( &quot;Delete %s&quot;, 'buddypress' ), esc_attr( $bp-&gt;displayed_user-&gt;fullname ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
-
-                        &lt;?php do_action( 'xprofile_adminbar_menu_items' ) ?&gt;
-
-                &lt;/ul&gt;
-        &lt;/li&gt;
-
-        &lt;?php
-}
-//add_action( 'bp_adminbar_menus', 'xprofile_setup_adminbar_menu', 20 );
-
</del><span class="cx"> ?&gt;
</span></span></pre>
</div>
</div>

</body>
</html>