<!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->pages->activity->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"> <?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->pages->blogs->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">                                                 </td>
</span><span class="cx">                                         </tr>
</span><span class="cx">
</span><del>-                                        <?php if ( bp_is_active( 'forums' ) ) : ?>
-
-                                                <tr>
-                                                        <th scope="row"><?php _e( 'Disable global forum directory?', 'buddypress' ) ?>:</th>
-                                                        <td>
-                                                                <input type="radio" name="bp-admin[bp-disable-forum-directory]"<?php if ( (int)bp_get_option( 'bp-disable-forum-directory' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-forum-directory" value="1" /> <?php _e( 'Yes', 'buddypress' ) ?> &nbsp;
-                                                                <input type="radio" name="bp-admin[bp-disable-forum-directory]"<?php if ( !(int)bp_get_option( 'bp-disable-forum-directory' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-forum-directory" value="0" /> <?php _e( 'No', 'buddypress' ) ?>
-                                                        </td>
-                                                </tr>
-
-                                        <?php endif; ?>
-
</del><span class="cx">                                         <?php if ( bp_is_active( 'activity' ) ) : ?>
</span><span class="cx">
</span><span class="cx">                                                 <tr>
</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->pages->register ) )
</span><span class="cx">                 $pages[] = $bp->pages->register->id;
</span><span class="cx">
</span><del>-        if ( !bp_is_active( 'forums' ) || ( bp_is_active( 'forums' ) && !bp_forums_is_installed_correctly() ) )
-                if ( !empty( $bp->pages->forums ) )
-                        $pages[] = $bp->pages->forums->id;
</del><ins>+        if ( !bp_is_active( 'forums' ) || ( bp_is_active( 'forums' ) && bp_forums_has_directory() && !bp_forums_is_installed_correctly() ) )
+                $pages[] = $bp->pages->forums->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 "Site Admin" 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' => '0',
</span><span class="cx"> 'bp-disable-avatar-uploads' => '0',
</span><span class="cx"> 'bp-disable-account-deletion' => '0',
</span><del>- 'bp-disable-forum-directory' => '0',
</del><span class="cx"> 'bp-disable-blogforum-comments' => '0',
</span><span class="cx"> 'bb-config-location' => ABSPATH,
</span><span class="cx"> 'hide-loggedout-adminbar' => '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' ) && is_multisite() )
</span><span class="cx">                 $options['blogs'] = __( 'Blogs', 'buddypress' );
</span><span class="cx">
</span><del>-        if ( bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() && !bp_forum_directory_is_disabled() )
</del><ins>+        if ( bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() && 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->site_options['bp-disable-forum-directory'] );
</del><ins>+        return (bool) !empty( $bp->pages->forums->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() && ( !bp_current_action() || ( 'tag' == bp_current_action() && bp_action_variables() ) ) && !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->pages->groups->id );
+}
+
</ins><span class="cx"> function groups_get_group( $args = '' ) {
</span><span class="cx">         $defaults = array(
</span><span class="cx">                 'group_id' => 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->pages->members->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">                                         <a href="#post-topic-reply"><?php _e( 'Reply', 'buddypress' ); ?></a>
</span><span class="cx">                                 </li>
</span><span class="cx">
</span><del>-                                <?php if ( !bp_forum_directory_is_disabled() ) : ?>
</del><ins>+                                <?php if ( bp_forums_has_directory() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                         <li>
</span><span class="cx">                                                 <a href="<?php bp_forum_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress'); ?></a>
</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">                                                                 <a href="#post-new" class="show-hide-new"><?php _e( 'New Topic', 'buddypress' ) ?></a>
</span><span class="cx">                                                         </li>
</span><span class="cx">
</span><del>-                                                        <?php if ( !bp_forum_directory_is_disabled() ) : ?>
</del><ins>+                                                        <?php if ( bp_forums_has_directory() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                                                 <li>
</span><span class="cx">                                                                         <a href="<?php bp_forum_directory_permalink() ?>"><?php _e( 'Forum Directory', 'buddypress') ?></a>
</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">                                                                         <a href="#post-topic-reply" class="show-hide-new"><?php _e( 'New Reply', 'buddypress' ) ?></a>
</span><span class="cx">                                                                 </li>
</span><span class="cx">
</span><del>-                                                                <?php if ( !bp_forum_directory_is_disabled() ) : ?>
</del><ins>+                                                                <?php if ( bp_forums_has_directory() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                                                         <li>
</span><span class="cx">                                                                                 <a href="<?php bp_forum_directory_permalink() ?>"><?php _e( 'Forum Directory', 'buddypress') ?></a>
</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' => '',
</span><span class="cx">                 'title_li' => ''
</span><span class="cx">         );
</span><del>-
-        if ( ( !bp_is_active( 'forums' ) || bp_forum_directory_is_disabled() ) && !empty( $bp->pages->forums->id ) ) {
-                if ( !empty( $pages_args['exclude'] ) )
-                                $pages_args['exclude'] .= ',';
-
-                $pages_args['exclude'] .= $bp->pages->forums->id;
-        }
-
</del><span class="cx">         $menu = wp_page_menu( $pages_args );
</span><span class="cx">         $menu = str_replace( array( '<div class="menu"><ul>', '</ul></div>' ), array( '<ul id="nav">', '</ul><!-- #nav -->' ), $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">                                         <a href="#post-topic-reply"><?php _e( 'Reply', 'buddypress' ); ?></a>
</span><span class="cx">                                 </li>
</span><span class="cx">
</span><del>-                                <?php if ( !bp_forum_directory_is_disabled() ) : ?>
</del><ins>+                                <?php if ( bp_forums_has_directory() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                         <li>
</span><span class="cx">                                                 <a href="<?php bp_forum_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress'); ?></a>
</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">                                         <a href="#post-topic-reply" class="show-hide-new"><?php _e( 'New Reply', 'buddypress' ) ?></a>
</span><span class="cx">                                 </li>
</span><span class="cx">
</span><del>-                                <?php if ( !bp_forum_directory_is_disabled() ) : ?>
</del><ins>+                                <?php if ( bp_forums_has_directory() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                         <li>
</span><span class="cx">                                                 <a href="<?php bp_forum_directory_permalink() ?>"><?php _e( 'Forum Directory', 'buddypress') ?></a>
</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">                                 <a href="#post-new" class="show-hide-new"><?php _e( 'New Topic', 'buddypress' ) ?></a>
</span><span class="cx">                         </li>
</span><span class="cx">
</span><del>-                        <?php if ( !bp_forum_directory_is_disabled() ) : ?>
</del><ins>+                        <?php if ( bp_forums_has_directory() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                 <li>
</span><span class="cx">                                         <a href="<?php bp_forum_directory_permalink() ?>"><?php _e( 'Forum Directory', 'buddypress') ?></a>
</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"> <?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( "admin_print_styles-$hook", '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"> <?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 "Site Admin" 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( "admin_print_styles-$hook", '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->displayed_user->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; ?>
-
-        <li id="bp-adminbar-adminoptions-menu">
-                <a href=""><?php _e( 'Admin Options', 'buddypress' ) ?></a>
-
-                <ul>
-                        <li><a href="<?php echo $bp->displayed_user->domain . $bp->profile->slug; ?>/edit/"><?php printf( __( "Edit %s's Profile", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
-                        <li><a href="<?php echo $bp->displayed_user->domain . $bp->profile->slug; ?>/change-avatar/"><?php printf( __( "Edit %s's Avatar", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
-
-                        <?php if ( bp_is_active( 'settings' ) ) : ?>
-
-                                <li><a href="<?php echo $bp->displayed_user->domain . $bp->settings->slug; ?>/general/"><?php printf( __( "Edit %s's Settings", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
-
-                        <?php endif; ?>
-
-                        <?php if ( !bp_core_is_user_spammer( $bp->displayed_user->id ) ) : ?>
-
-                                <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Mark as Spammer", 'buddypress' ) ?></a></li>
-
-                        <?php else : ?>
-
-                                <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/unmark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Not a Spammer", 'buddypress' ) ?></a></li>
-
-                        <?php endif; ?>
-
-                        <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/delete-user/', 'delete-user' ) ?>" class="confirm"><?php printf( __( "Delete %s", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
-
-                        <?php do_action( 'xprofile_adminbar_menu_items' ) ?>
-
-                </ul>
-        </li>
-
-        <?php
-}
-//add_action( 'bp_adminbar_menus', 'xprofile_setup_adminbar_menu', 20 );
-
</del><span class="cx"> ?>
</span></span></pre>
</div>
</div>
</body>
</html>