<!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] [1809] trunk: Fixes #983</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>1809</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-09-07 18:46:37 +0000 (Mon, 07 Sep 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixes #983</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpblogsphp">trunk/bp-blogs.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsclassesphp">trunk/bp-groups/bp-groups-classes.php</a></li>
<li><a href="#trunkbpgroupsphp">trunk/bp-groups.php</a></li>
<li><a href="#trunkbpmessagesphp">trunk/bp-messages.php</a></li>
<li><a href="#trunkbpwirephp">trunk/bp-wire.php</a></li>
<li><a href="#trunkbpxprofilebpxprofilefiltersphp">trunk/bp-xprofile/bp-xprofile-filters.php</a></li>
<li><a href="#trunkbpxprofilephp">trunk/bp-xprofile.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-activity.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -103,8 +103,8 @@
</span><span class="cx">
</span><span class="cx">         do_action( 'bp_activity_setup_nav' );
</span><span class="cx"> }
</span><del>-add_action( 'wp', 'bp_activity_setup_nav', 2 );
-add_action( 'admin_menu', 'bp_activity_setup_nav', 2 );
</del><ins>+add_action( 'plugins_loaded', 'bp_activity_setup_nav' );
+add_action( 'admin_menu', 'bp_activity_setup_nav' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /********************************************************************************
</span></span></pre></div>
<a id="trunkbpblogsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-blogs.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -167,8 +167,8 @@
</span><span class="cx">         
</span><span class="cx">         do_action( 'bp_blogs_setup_nav' );
</span><span class="cx"> }
</span><del>-add_action( 'wp', 'bp_blogs_setup_nav', 2 );
-add_action( 'admin_menu', 'bp_blogs_setup_nav', 2 );
</del><ins>+add_action( 'plugins_loaded', 'bp_blogs_setup_nav' );
+add_action( 'admin_menu', 'bp_blogs_setup_nav' );
</ins><span class="cx">
</span><span class="cx"> function bp_blogs_directory_blogs_setup() {
</span><span class="cx">         global $bp;
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-core.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -351,8 +351,8 @@
</span><span class="cx">                 }
</span><span class="cx">         }        
</span><span class="cx"> }
</span><del>-add_action( 'wp', 'bp_core_setup_nav', 2 );
-add_action( 'admin_menu', 'bp_core_setup_nav', 2 );
</del><ins>+add_action( 'plugins_loaded', 'bp_core_setup_nav' );
+add_action( 'admin_menu', 'bp_core_setup_nav' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /********************************************************************************
</span><span class="lines">@@ -1038,9 +1038,14 @@
</span><span class="cx">                 wp_cache_set( 'bp_user_fullname_' . $user_id, $fullname, 'bp' );
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        return apply_filters( 'bp_core_get_user_displayname', stripslashes( wp_filter_kses( trim( $fullname ) ) ) );
</del><ins>+        return apply_filters( 'bp_core_get_user_displayname', $fullname );
</ins><span class="cx"> }
</span><ins>+add_filter( 'bp_core_get_user_displayname', 'wp_filter_kses', 1 );
+add_filter( 'bp_core_get_user_displayname', 'force_balance_tags' );
+add_filter( 'bp_core_get_user_displayname', 'trim' );
+add_filter( 'bp_core_get_user_displayname', 'stripslashes' );
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> /**
</span><span class="cx"> * bp_core_get_userlink_by_email()
</span><span class="cx"> *
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-classes.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-classes.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-groups/bp-groups-classes.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -925,6 +925,7 @@
</span><span class="cx">         
</span><span class="cx">         var $nav_item_name = false;
</span><span class="cx">         
</span><ins>+        var $display_hook = 'groups_custom_group_boxes';
</ins><span class="cx">         var $template_file = 'plugin-template';
</span><span class="cx">         
</span><span class="cx">         // Methods you should override
</span><span class="lines">@@ -1003,7 +1004,7 @@
</span><span class="cx">                         
</span><span class="cx">                         /* Hook the group home widget */
</span><span class="cx">                         if ( $bp->current_component == $bp->groups->slug && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
</span><del>-                                add_action( 'groups_custom_group_boxes', array( &$this, 'widget_display' ) );
</del><ins>+                                add_action( $this->display_hook, array( &$this, 'widget_display' ) );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -1019,8 +1020,8 @@
</span><span class="cx">         if ( !class_exists( $group_extension_class ) )
</span><span class="cx">                 return false;
</span><span class="cx">         
</span><del>-        $extension = new $group_extension_class;
-        add_action( 'wp', array( &$extension, '_register' ), 2 );
</del><ins>+        /* Register the group extension on the plugins_loaded action so we have access to all plugins */
+        add_action( 'plugins_loaded', create_function( '', '$extension = new ' . $group_extension_class . '; add_action( "wp", array( &$extension, "_register" ), 2 );' ) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-groups.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -292,8 +292,8 @@
</span><span class="cx">         
</span><span class="cx">         do_action( 'groups_setup_nav', $bp->groups->current_group->user_has_access );
</span><span class="cx"> }
</span><del>-add_action( 'wp', 'groups_setup_nav', 2 );
-add_action( 'admin_menu', 'groups_setup_nav', 2 );
</del><ins>+add_action( 'plugins_loaded', 'groups_setup_nav' );
+add_action( 'admin_menu', 'groups_setup_nav' );
</ins><span class="cx">
</span><span class="cx"> function groups_directory_groups_setup() {
</span><span class="cx">         global $bp;
</span><span class="lines">@@ -466,7 +466,7 @@
</span><span class="cx">                 if ( 'group-invites' == $bp->groups->current_create_step ) {
</span><span class="cx">                         groups_send_invites( $bp->groups->new_group_id, $bp->loggedin_user->id );
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 do_action( 'groups_create_group_step_save_' . $bp->groups->current_create_step );
</span><span class="cx">                 do_action( 'groups_create_group_step_complete' ); // Mostly for clearing cache on a generic action name
</span><span class="cx">                 
</span><span class="lines">@@ -2529,7 +2529,6 @@
</span><span class="cx">                 return false;
</span><span class="cx">         
</span><span class="cx">         $meta_key = preg_replace( '|[^a-z0-9_]|i', '', $meta_key );
</span><del>-        $meta_value = (string)$meta_value;
</del><span class="cx">
</span><span class="cx">         if ( is_string($meta_value) )
</span><span class="cx">                 $meta_value = stripslashes($wpdb->escape($meta_value));
</span></span></pre></div>
<a id="trunkbpmessagesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-messages.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -136,8 +136,8 @@
</span><span class="cx">         
</span><span class="cx">         do_action( 'messages_setup_nav' );
</span><span class="cx"> }
</span><del>-add_action( 'wp', 'messages_setup_nav', 2 );
-add_action( 'admin_menu', 'messages_setup_nav', 2 );
</del><ins>+add_action( 'plugins_loaded', 'messages_setup_nav' );
+add_action( 'admin_menu', 'messages_setup_nav' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /********************************************************************************
</span></span></pre></div>
<a id="trunkbpwirephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-wire.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-wire.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-wire.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -52,8 +52,8 @@
</span><span class="cx">         
</span><span class="cx">         do_action( 'bp_wire_setup_nav' );
</span><span class="cx"> }
</span><del>-add_action( 'wp', 'bp_wire_setup_nav', 2 );
-add_action( 'admin_menu', 'bp_wire_setup_nav', 2 );
</del><ins>+add_action( 'plugins_loaded', 'bp_wire_setup_nav' );
+add_action( 'admin_menu', 'bp_wire_setup_nav' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /********************************************************************************
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofilefiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-filters.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-filters.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-xprofile/bp-xprofile-filters.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -17,6 +17,7 @@
</span><span class="cx"> add_filter( 'bp_get_the_profile_field_value', 'convert_chars' );
</span><span class="cx"> add_filter( 'bp_get_the_profile_field_value', 'wpautop' );
</span><span class="cx"> add_filter( 'bp_get_the_profile_field_value', 'make_clickable' );
</span><ins>+add_filter( 'bp_get_the_profile_field_value', 'force_balance_tags' );
</ins><span class="cx">
</span><span class="cx"> add_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_format_field_value', 1, 2 );
</span><span class="cx"> add_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 2, 2 );
</span><span class="lines">@@ -61,7 +62,7 @@
</span><span class="cx">                                 if ( count( explode( ' ', $value ) ) > 5 )
</span><span class="cx">                                         $new_values[] = $value;
</span><span class="cx">                                 else
</span><del>-                                        $new_values[] = '<a href="' . site_url( BP_MEMBERS_SLUG ) . '/?s=' . $value . '">' . $value . '</a>';
</del><ins>+                                        $new_values[] = '<a href="' . site_url( BP_MEMBERS_SLUG ) . '/?s=' . strip_tags( $value ) . '">' . $value . '</a>';
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 
</span></span></pre></div>
<a id="trunkbpxprofilephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile.php (1808 => 1809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile.php        2009-09-07 14:11:08 UTC (rev 1808)
+++ trunk/bp-xprofile.php        2009-09-07 18:46:37 UTC (rev 1809)
</span><span class="lines">@@ -221,8 +221,8 @@
</span><span class="cx">         
</span><span class="cx">         do_action( 'xprofile_setup_nav' );
</span><span class="cx"> }
</span><del>-add_action( 'wp', 'xprofile_setup_nav', 2 );
-add_action( 'admin_menu', 'xprofile_setup_nav', 2 );
</del><ins>+add_action( 'plugins_loaded', 'xprofile_setup_nav' );
+add_action( 'admin_menu', 'xprofile_setup_nav' );
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre>
</div>
</div>
</body>
</html>