<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[BuddyPress] [1861] trunk:
  Added option to turn off forum directory if your bbPress tables sit in a different database 
 (meaning the directory won't work anyway)</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>1861</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-09-12 00:30:43 +0000 (Sat, 12 Sep 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Added option to turn off forum directory if your bbPress tables sit in a different database (meaning the directory won't work anyway)</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoreadminphp">trunk/bp-core/bp-core-admin.php</a></li>
<li><a href="#trunkbpcorebpcoresettingsphp">trunk/bp-core/bp-core-settings.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpforumsbpforumsadminphp">trunk/bp-forums/bp-forums-admin.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcoreadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-admin.php (1860 => 1861)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-admin.php        2009-09-12 00:02:06 UTC (rev 1860)
+++ trunk/bp-core/bp-core-admin.php        2009-09-12 00:30:43 UTC (rev 1861)
</span><span class="lines">@@ -91,8 +91,18 @@
</span><span class="cx">                                                 &lt;input type=&quot;radio&quot; name=&quot;bp-admin[bp-disable-account-deletion]&quot;&lt;?php if ( (int)get_site_option( 'bp-disable-account-deletion' ) ) : ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt; id=&quot;bp-disable-account-deletion&quot; value=&quot;1&quot; /&gt; &lt;?php _e( 'Yes', 'buddypress' ) ?&gt; &amp;nbsp;
</span><span class="cx">                                                 &lt;input type=&quot;radio&quot; name=&quot;bp-admin[bp-disable-account-deletion]&quot;&lt;?php if ( !(int)get_site_option( 'bp-disable-account-deletion' ) || '' == get_site_option( 'bp-disable-account-deletion' ) ) : ?&gt; checked=&quot;checked&quot;&lt;?php endif; ?&gt; id=&quot;bp-disable-account-deletion&quot; value=&quot;0&quot; /&gt; &lt;?php _e( 'No', 'buddypress' ) ?&gt;
</span><span class="cx">                                         &lt;/td&gt;                        
</span><ins>+                                &lt;/tr&gt;
+                                &lt;?php if ( function_exists( 'bp_forums_setup') ) : ?&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)get_site_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)get_site_option( 'bp-disable-forum-directory' ) || '' == get_site_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;                        
</ins><span class="cx">                                 &lt;/tr&gt;                                
</span><del>-                                &lt;?php if ( !locate_template( array( 'registration/register.php' ) ) ) :?&gt;
</del><ins>+                                &lt;?php endif; ?&gt;
+                                                        
+                                &lt;?php if ( !locate_template( array( 'registration/register.php' ) ) ) : ?&gt;
</ins><span class="cx">                                 &lt;tr&gt;
</span><span class="cx">                                         &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Select theme to use for BuddyPress generated pages', 'buddypress' ) ?&gt;:&lt;/th&gt;
</span><span class="cx">                                         &lt;td&gt;
</span></span></pre></div>
<a id="trunkbpcorebpcoresettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-settings.php (1860 => 1861)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-settings.php        2009-09-12 00:02:06 UTC (rev 1860)
+++ trunk/bp-core/bp-core-settings.php        2009-09-12 00:30:43 UTC (rev 1861)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx">         bp_core_new_subnav_item( array( 'name' =&gt; __( 'General', 'buddypress' ), 'slug' =&gt; 'general', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_general_settings', 'position' =&gt; 10, 'user_has_access' =&gt; bp_is_home() ) );
</span><span class="cx">         bp_core_new_subnav_item( array( 'name' =&gt; __( 'Notifications', 'buddypress' ), 'slug' =&gt; 'notifications', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_notification_settings', 'position' =&gt; 20, 'user_has_access' =&gt; bp_is_home() ) );
</span><span class="cx">         
</span><del>-        if ( !is_site_admin() &amp;&amp; 1 != (int)get_site_option( 'bp-disable-account-deletion' ) )
</del><ins>+        if ( !is_site_admin() &amp;&amp; !(int) get_site_option( 'bp-disable-account-deletion' ) )
</ins><span class="cx">                 bp_core_new_subnav_item( array( 'name' =&gt; __( 'Delete Account', 'buddypress' ), 'slug' =&gt; 'delete-account', 'parent_url' =&gt; $settings_link, 'parent_slug' =&gt; $bp-&gt;settings-&gt;slug, 'screen_function' =&gt; 'bp_core_screen_delete_account', 'position' =&gt; 90, 'user_has_access' =&gt; bp_is_home() ) );
</span><span class="cx"> }
</span><span class="cx"> add_action( 'wp', 'bp_core_add_settings_nav', 2 );
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (1860 => 1861)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2009-09-12 00:02:06 UTC (rev 1860)
+++ trunk/bp-core.php        2009-09-12 00:30:43 UTC (rev 1861)
</span><span class="lines">@@ -1478,7 +1478,7 @@
</span><span class="cx">                 $user_id = $bp-&gt;loggedin_user-&gt;id;
</span><span class="cx"> 
</span><span class="cx">         /* Make sure account deletion is not disabled */
</span><del>-        if ( ( 1 == (int)get_site_option( 'bp-disable-account-deletion' ) &amp;&amp; !is_site_admin() ) )
</del><ins>+        if ( ( !(int) get_site_option( 'bp-disable-account-deletion' ) &amp;&amp; !is_site_admin() ) )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         /* Site admins should not be allowed to be deleted */
</span></span></pre></div>
<a id="trunkbpforumsbpforumsadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-admin.php (1860 => 1861)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-admin.php        2009-09-12 00:02:06 UTC (rev 1860)
+++ trunk/bp-forums/bp-forums-admin.php        2009-09-12 00:30:43 UTC (rev 1861)
</span><span class="lines">@@ -19,6 +19,7 @@
</span><span class="cx">                         bp_forums_bbpress_install_wizard();
</span><span class="cx">                 else { ?&gt;
</span><span class="cx">                         &lt;p&gt;&lt;?php printf( __( 'bbPress forum integration in BuddyPress has been set up correctly. If you are having problems you can &lt;a href=&quot;%s&quot; title=&quot;Reinstall bbPress&quot;&gt;re-install&lt;/a&gt;', 'buddypress' ), site_url( 'wp-admin/admin.php?page=buddypress/bp-forums.php&amp;reinstall=1' ) ); ?&gt;
</span><ins>+                        &lt;p&gt;&lt;?php _e( 'NOTE: The forums directory will only work if your bbPress tables are in the same database as your WordPress tables. If you are not using an existing bbPress install you can ignore this message.', 'buddypress' ) ?&gt;&lt;/p&gt;
</ins><span class="cx">                 &lt;?php        
</span><span class="cx">                 }
</span><span class="cx">                 ?&gt;
</span></span></pre>
</div>
</div>

</body>
</html>