<!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][4211] trunk: Add PHP5-style constructors to classes.</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>4211</dd>
<dt>Author</dt> <dd>djpaul</dd>
<dt>Date</dt> <dd>2011-04-16 16:47:36 +0000 (Sat, 16 Apr 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add PHP5-style constructors to classes. Fixes #3148, props Backie</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityclassesphp">trunk/bp-activity/bp-activity-classes.php</a></li>
<li><a href="#trunkbpactivitybpactivityloaderphp">trunk/bp-activity/bp-activity-loader.php</a></li>
<li><a href="#trunkbpblogsbpblogsclassesphp">trunk/bp-blogs/bp-blogs-classes.php</a></li>
<li><a href="#trunkbpblogsbpblogsloaderphp">trunk/bp-blogs/bp-blogs-loader.php</a></li>
<li><a href="#trunkbpblogsbpblogstemplatephp">trunk/bp-blogs/bp-blogs-template.php</a></li>
<li><a href="#trunkbpblogsbpblogswidgetsphp">trunk/bp-blogs/bp-blogs-widgets.php</a></li>
<li><a href="#trunkbpcoreadminbpcoreupdatephp">trunk/bp-core/admin/bp-core-update.php</a></li>
<li><a href="#trunkbpcorebpcoreclassesphp">trunk/bp-core/bp-core-classes.php</a></li>
<li><a href="#trunkbpcorebpcoreloaderphp">trunk/bp-core/bp-core-loader.php</a></li>
<li><a href="#trunkbpcorebpcorewidgetsphp">trunk/bp-core/bp-core-widgets.php</a></li>
<li><a href="#trunkbpforumsbpforumsbbpresssaphp">trunk/bp-forums/bp-forums-bbpress-sa.php</a></li>
<li><a href="#trunkbpforumsbpforumsloaderphp">trunk/bp-forums/bp-forums-loader.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatephp">trunk/bp-forums/bp-forums-template.php</a></li>
<li><a href="#trunkbpfriendsbpfriendsclassesphp">trunk/bp-friends/bp-friends-classes.php</a></li>
<li><a href="#trunkbpfriendsbpfriendsloaderphp">trunk/bp-friends/bp-friends-loader.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsclassesphp">trunk/bp-groups/bp-groups-classes.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsloaderphp">trunk/bp-groups/bp-groups-loader.php</a></li>
<li><a href="#trunkbpgroupsbpgroupswidgetsphp">trunk/bp-groups/bp-groups-widgets.php</a></li>
<li><a href="#trunkbpmembersbpmembersloaderphp">trunk/bp-members/bp-members-loader.php</a></li>
<li><a href="#trunkbpmembersbpmemberstemplatephp">trunk/bp-members/bp-members-template.php</a></li>
<li><a href="#trunkbpmessagesbpmessagesclassesphp">trunk/bp-messages/bp-messages-classes.php</a></li>
<li><a href="#trunkbpmessagesbpmessagesloaderphp">trunk/bp-messages/bp-messages-loader.php</a></li>
<li><a href="#trunkbpmessagesbpmessagestemplatephp">trunk/bp-messages/bp-messages-template.php</a></li>
<li><a href="#trunkbpsettingsbpsettingsloaderphp">trunk/bp-settings/bp-settings-loader.php</a></li>
<li><a href="#trunkbpxprofilebpxprofileloaderphp">trunk/bp-xprofile/bp-xprofile-loader.php</a></li>
<li><a href="#trunkbpxprofilebpxprofiletemplatephp">trunk/bp-xprofile/bp-xprofile-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-classes.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-classes.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-activity/bp-activity-classes.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -16,6 +16,10 @@
</span><span class="cx">         var $mptt_right;
</span><span class="cx"> 
</span><span class="cx">         function bp_activity_activity( $id = false ) {
</span><ins>+                $this-&gt;__construct( $id );
+        }
+
+        function __construct( $id = false ) {
</ins><span class="cx">                 global $bp;
</span><span class="cx"> 
</span><span class="cx">                 if ( !empty( $id ) ) {
</span></span></pre></div>
<a id="trunkbpactivitybpactivityloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-activity/bp-activity-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -17,6 +17,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_Activity_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'activity',
</span><span class="cx">                         __( 'Activity Streams', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpblogsbpblogsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-classes.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-classes.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-blogs/bp-blogs-classes.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -6,6 +6,10 @@
</span><span class="cx">         var $blog_id;
</span><span class="cx"> 
</span><span class="cx">         function bp_blogs_blog( $id = null ) {
</span><ins>+                $this-&gt;__construct( $id );
+        }
+
+        function __construct( $id = null ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 $user_id = $bp-&gt;displayed_user-&gt;id;
</span></span></pre></div>
<a id="trunkbpblogsbpblogsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-blogs/bp-blogs-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -17,6 +17,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_Blogs_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'blogs',
</span><span class="cx">                         __( 'Blogs Streams', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpblogsbpblogstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-template.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-template.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-blogs/bp-blogs-template.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -66,6 +66,10 @@
</span><span class="cx">         var $total_blog_count;
</span><span class="cx"> 
</span><span class="cx">         function bp_blogs_template( $type, $page, $per_page, $max, $user_id, $search_terms ) {
</span><ins>+                $this-&gt;__construct( $type, $page, $per_page, $max, $user_id, $search_terms );
+        }
+
+        function __construct( $type, $page, $per_page, $max, $user_id, $search_terms ) {
</ins><span class="cx">                 global $bp;
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;pag_page = isset( $_REQUEST['bpage'] ) ? intval( $_REQUEST['bpage'] ) : $page;
</span></span></pre></div>
<a id="trunkbpblogsbpblogswidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-widgets.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-widgets.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-blogs/bp-blogs-widgets.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -14,10 +14,15 @@
</span><span class="cx"> add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' );
</span><span class="cx"> 
</span><span class="cx"> class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
</span><ins>+
</ins><span class="cx">         function bp_blogs_recent_posts_widget() {
</span><del>-                parent::WP_Widget( false, $name = __( 'Recent Site Wide Posts', 'buddypress' ) );
</del><ins>+                $this-&gt;__construct();
</ins><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        function __construct() {
+                parent::__construct( false, $name = __( 'Recent Site Wide Posts', 'buddypress' ) );
+        }
+
</ins><span class="cx">         function widget($args, $instance) {
</span><span class="cx">                 global $bp;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcoreadminbpcoreupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-update.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-update.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-core/admin/bp-core-update.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -10,6 +10,10 @@
</span><span class="cx">         var $setup_type;
</span><span class="cx"> 
</span><span class="cx">         function bp_core_setup_wizard() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 // Look for current DB version
</span><span class="cx">                 if ( !$this-&gt;database_version = get_site_option( 'bp-db-version' ) ) {
</span><span class="cx">                         if ( $this-&gt;database_version = get_option( 'bp-db-version' ) ) {
</span></span></pre></div>
<a id="trunkbpcorebpcoreclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-classes.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-classes.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-core/bp-core-classes.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -31,6 +31,10 @@
</span><span class="cx">         var $total_groups;
</span><span class="cx"> 
</span><span class="cx">         function bp_core_user( $user_id, $populate_extras = false ) {
</span><ins>+                $this-&gt;__construct( $user_id, $populate_extras );
+        }
+
+                function __construct( $user_id, $populate_extras = false ) {
</ins><span class="cx">                 if ( $user_id ) {
</span><span class="cx">                         $this-&gt;id = $user_id;
</span><span class="cx">                         $this-&gt;populate();
</span><span class="lines">@@ -446,6 +450,10 @@
</span><span class="cx">         var $is_new;
</span><span class="cx"> 
</span><span class="cx">         function bp_core_notification( $id = false ) {
</span><ins>+                $this-&gt;__construct($id);
+        }
+                
+        function __construct( $id = false ) {
</ins><span class="cx">                 if ( $id ) {
</span><span class="cx">                         $this-&gt;id = $id;
</span><span class="cx">                         $this-&gt;populate();
</span><span class="lines">@@ -589,6 +597,10 @@
</span><span class="cx">          * @return bool False if not allowed
</span><span class="cx">          */
</span><span class="cx">         function bp_button( $args = '' ) {
</span><ins>+                $this-&gt;__construct($args);
+        }
+        
+        function __construct( $args = '' ) {
</ins><span class="cx"> 
</span><span class="cx">                 // Default arguments
</span><span class="cx">                 $defaults = array(
</span></span></pre></div>
<a id="trunkbpcorebpcoreloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-core/bp-core-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -26,6 +26,10 @@
</span><span class="cx"> class BP_Core extends BP_Component {
</span><span class="cx"> 
</span><span class="cx">         function BP_Core() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         '_core',
</span><span class="cx">                         __( 'BuddyPress Core', 'buddypress' )
</span></span></pre></div>
<a id="trunkbpcorebpcorewidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-widgets.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-widgets.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-core/bp-core-widgets.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -11,9 +11,14 @@
</span><span class="cx"> /*** MEMBERS WIDGET *****************/
</span><span class="cx"> 
</span><span class="cx"> class BP_Core_Members_Widget extends WP_Widget {
</span><ins>+
</ins><span class="cx">         function bp_core_members_widget() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 $widget_ops = array( 'description' =&gt; __( 'A dynamic list of recently active, popular, and newest members', 'buddypress' ) );
</span><del>-                parent::WP_Widget( false, $name = __( 'Members', 'buddypress' ), $widget_ops );
</del><ins>+                parent::__construct( false, $name = __( 'Members', 'buddypress' ), $widget_ops );
</ins><span class="cx"> 
</span><span class="cx">                 if ( is_active_widget( false, false, $this-&gt;id_base ) ) {
</span><span class="cx">                         if ( defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG )
</span><span class="lines">@@ -134,9 +139,14 @@
</span><span class="cx"> /*** WHO'S ONLINE WIDGET *****************/
</span><span class="cx"> 
</span><span class="cx"> class BP_Core_Whos_Online_Widget extends WP_Widget {
</span><ins>+
</ins><span class="cx">         function bp_core_whos_online_widget() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 $widget_ops = array( 'description' =&gt; __( 'Avatars of users who are currently online', 'buddypress' ) );
</span><del>-                parent::WP_Widget( false, $name = __( &quot;Who's Online Avatars&quot;, 'buddypress' ), $widget_ops );
</del><ins>+                parent::__construct( false, $name = __( &quot;Who's Online Avatars&quot;, 'buddypress' ), $widget_ops );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget($args, $instance) {
</span><span class="lines">@@ -198,9 +208,14 @@
</span><span class="cx"> /*** RECENTLY ACTIVE WIDGET *****************/
</span><span class="cx"> 
</span><span class="cx"> class BP_Core_Recently_Active_Widget extends WP_Widget {
</span><ins>+
</ins><span class="cx">         function bp_core_recently_active_widget() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 $widget_ops = array( 'description' =&gt; __( 'Avatars of recently active members', 'buddypress' ) );
</span><del>-                parent::WP_Widget( false, $name = __( 'Recently Active Member Avatars', 'buddypress' ), $widget_ops );
</del><ins>+                parent::__construct( false, $name = __( 'Recently Active Member Avatars', 'buddypress' ), $widget_ops );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function widget($args, $instance) {
</span></span></pre></div>
<a id="trunkbpforumsbpforumsbbpresssaphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-bbpress-sa.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-bbpress-sa.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-forums/bp-forums-bbpress-sa.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -137,8 +137,12 @@
</span><span class="cx">         var $db_servers = array();
</span><span class="cx"> 
</span><span class="cx">         function BPDB( $dbuser, $dbpassword, $dbname, $dbhost ) {
</span><del>-                parent::WPDB( $dbuser, $dbpassword, $dbname, $dbhost );
</del><ins>+                $this-&gt;__construct( $dbuser, $dbpassword, $dbname, $dbhost );
+        }
</ins><span class="cx"> 
</span><ins>+        function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
+                parent::__construct( $dbuser, $dbpassword, $dbname, $dbhost );
+
</ins><span class="cx">                 $args = func_get_args();
</span><span class="cx">                 $args = call_user_func_array( array( &amp;$this, '_init' ), $args );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpforumsbpforumsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-forums/bp-forums-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -17,6 +17,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_Forums_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'forums',
</span><span class="cx">                         __( 'Discussion Forums', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-template.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-template.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-forums/bp-forums-template.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -69,6 +69,10 @@
</span><span class="cx">         var $order;
</span><span class="cx"> 
</span><span class="cx">         function BP_Forums_Template_Forum( $type, $forum_id, $user_id, $page, $per_page, $max, $no_stickies, $search_terms ) {
</span><ins>+                $this-&gt;__construct( $type, $forum_id, $user_id, $page, $per_page, $max, $no_stickies, $search_terms );
+        }
+
+        function __construct( $type, $forum_id, $user_id, $page, $per_page, $max, $no_stickies, $search_terms ) {        
</ins><span class="cx">                 global $bp;
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;pag_page     = isset( $_REQUEST['p'] ) ? intval( $_REQUEST['p'] ) : $page;
</span><span class="lines">@@ -789,6 +793,10 @@
</span><span class="cx">         var $order;
</span><span class="cx"> 
</span><span class="cx">         function BP_Forums_Template_Topic( $topic_id, $per_page, $max, $order ) {
</span><ins>+                $this-&gt;__construct( $topic_id, $per_page, $max, $order );
+        }
+                
+        function __construct( $topic_id, $per_page, $max, $order ) {
</ins><span class="cx">                 global $bp, $current_user, $forum_template;
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;pag_page        = isset( $_REQUEST['topic_page'] ) ? intval( $_REQUEST['topic_page'] ) : 1;
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-classes.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-classes.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-friends/bp-friends-classes.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -14,6 +14,10 @@
</span><span class="cx">         var $friend;
</span><span class="cx"> 
</span><span class="cx">         function bp_friends_friendship( $id = null, $is_request = false, $populate_friend_details = true ) {
</span><ins>+                $this-&gt;__construct( $id, $is_request, $populate_friend_details );
+        }
+
+        function __construct( $id = null, $is_request = false, $populate_friend_details = true ) {
</ins><span class="cx">                 $this-&gt;is_request = $is_request;
</span><span class="cx"> 
</span><span class="cx">                 if ( $id ) {
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-friends/bp-friends-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -17,6 +17,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_Friends_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'friends',
</span><span class="cx">                         __( 'Friend Connections', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-classes.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-classes.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-groups/bp-groups-classes.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -15,6 +15,10 @@
</span><span class="cx">         var $total_member_count;
</span><span class="cx"> 
</span><span class="cx">         function bp_groups_group( $id = null ) {
</span><ins>+                $this-&gt;__construct($id);
+        }
+
+        function __construct( $id = null ) {
</ins><span class="cx">                 if ( $id ) {
</span><span class="cx">                         $this-&gt;id = $id;
</span><span class="cx">                         $this-&gt;populate();
</span><span class="lines">@@ -604,6 +608,10 @@
</span><span class="cx">         var $user;
</span><span class="cx"> 
</span><span class="cx">         function bp_groups_member( $user_id = 0, $group_id = 0, $id = false, $populate = true ) {
</span><ins>+                $this-&gt;__construct($user_id,$group_id,$id,$populate);
+        }
+        
+        function __construct( $user_id = 0, $group_id = 0, $id = false, $populate = true ) {
</ins><span class="cx">                 if ( $user_id &amp;&amp; $group_id &amp;&amp; !$id ) {
</span><span class="cx">                         $this-&gt;user_id = $user_id;
</span><span class="cx">                         $this-&gt;group_id = $group_id;
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-groups/bp-groups-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -20,6 +20,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_Groups_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'groups',
</span><span class="cx">                         __( 'User Groups', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupswidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-widgets.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-widgets.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-groups/bp-groups-widgets.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -10,8 +10,12 @@
</span><span class="cx"> 
</span><span class="cx"> class BP_Groups_Widget extends WP_Widget {
</span><span class="cx">         function bp_groups_widget() {
</span><ins>+                $this-&gt;_construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 $widget_ops = array( 'description' =&gt; __( 'A dynamic list of recently active, popular, and newest groups', 'buddypress' ) );
</span><del>-                parent::WP_Widget( false, __( 'Groups', 'buddypress' ), $widget_ops );
</del><ins>+                parent::__construct( false, __( 'Groups', 'buddypress' ), $widget_ops );
</ins><span class="cx"> 
</span><span class="cx">                 if ( is_active_widget( false, false, $this-&gt;id_base ) ) {
</span><span class="cx">                         if ( defined( 'SCRIPT_DEBUG' ) &amp;&amp; SCRIPT_DEBUG )
</span></span></pre></div>
<a id="trunkbpmembersbpmembersloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-members/bp-members-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -17,6 +17,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_Members_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'members',
</span><span class="cx">                         __( 'Members', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpmembersbpmemberstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-template.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-template.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-members/bp-members-template.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -140,6 +140,10 @@
</span><span class="cx">         var $total_member_count;
</span><span class="cx"> 
</span><span class="cx">         function bp_core_members_template( $type, $page_number, $per_page, $max, $user_id, $search_terms, $include, $populate_extras, $exclude ) {
</span><ins>+                $this-&gt;__construct( $type, $page_number, $per_page, $max, $user_id, $search_terms, $include, $populate_extras, $exclude );
+        }
+
+        function __construct( $type, $page_number, $per_page, $max, $user_id, $search_terms, $include, $populate_extras, $exclude ) {
</ins><span class="cx">                 global $bp;
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;pag_page  = !empty( $_REQUEST['upage'] ) ? intval( $_REQUEST['upage'] ) : (int)$page_number;
</span></span></pre></div>
<a id="trunkbpmessagesbpmessagesclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-classes.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-classes.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-messages/bp-messages-classes.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -9,6 +9,10 @@
</span><span class="cx">         var $unread_count;
</span><span class="cx"> 
</span><span class="cx">         function bp_messages_thread ( $thread_id = false, $order = 'ASC' ) {
</span><ins>+                $this-&gt;__construct( $thread_id, $order);
+        }
+
+        function __construct( $thread_id = false, $order = 'ASC' ) {
</ins><span class="cx">                 if ( $thread_id )
</span><span class="cx">                         $this-&gt;populate( $thread_id, $order );
</span><span class="cx">         }
</span><span class="lines">@@ -245,6 +249,10 @@
</span><span class="cx">         var $recipients = false;
</span><span class="cx"> 
</span><span class="cx">         function bp_messages_message( $id = null ) {
</span><ins>+                $this-&gt;__construct( $id );
+        }
+        
+        function __construct( $id = null ) {
</ins><span class="cx">                 global $bp;
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;date_sent = bp_core_current_time();
</span><span class="lines">@@ -362,6 +370,10 @@
</span><span class="cx">         var $is_active;
</span><span class="cx"> 
</span><span class="cx">         function bp_messages_notice( $id = null ) {
</span><ins>+                $this-&gt;__construct($id);
+        }
+        
+        function __construct( $id = null ) {
</ins><span class="cx">                 if ( $id ) {
</span><span class="cx">                         $this-&gt;id = $id;
</span><span class="cx">                         $this-&gt;populate($id);
</span></span></pre></div>
<a id="trunkbpmessagesbpmessagesloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-messages/bp-messages-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -17,6 +17,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_Messages_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'messages',
</span><span class="cx">                         __( 'Private Messages', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpmessagesbpmessagestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-template.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-template.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-messages/bp-messages-template.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -20,6 +20,10 @@
</span><span class="cx">         var $pag_links;
</span><span class="cx"> 
</span><span class="cx">         function bp_messages_box_template( $user_id, $box, $per_page, $max, $type ) {
</span><ins>+                $this-&gt;__construct( $user_id, $box, $per_page, $max, $type );
+        }
+
+        function __construct( $user_id, $box, $per_page, $max, $type ) {
</ins><span class="cx">                 $this-&gt;pag_page = isset( $_GET['mpage'] ) ? intval( $_GET['mpage'] ) : 1;
</span><span class="cx">                 $this-&gt;pag_num  = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : $per_page;
</span><span class="cx"> 
</span><span class="lines">@@ -611,6 +615,10 @@
</span><span class="cx">         var $total_message_count;
</span><span class="cx"> 
</span><span class="cx">         function bp_messages_thread_template( $thread_id, $order ) {
</span><ins>+                $this-&gt;__construct( $thread_id, $order );
+        }
+
+        function __construct( $thread_id, $order ) {
</ins><span class="cx">                 global $bp;
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;thread = new BP_Messages_Thread( $thread_id, $order );
</span></span></pre></div>
<a id="trunkbpsettingsbpsettingsloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-settings/bp-settings-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-settings/bp-settings-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-settings/bp-settings-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -8,6 +8,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_Settings_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'settings',
</span><span class="cx">                         __( 'Settings', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofileloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-loader.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-loader.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-xprofile/bp-xprofile-loader.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -18,6 +18,10 @@
</span><span class="cx">          * @since BuddyPress {unknown}
</span><span class="cx">          */
</span><span class="cx">         function BP_XProfile_Component() {
</span><ins>+                $this-&gt;__construct();
+        }
+
+        function __construct() {
</ins><span class="cx">                 parent::start(
</span><span class="cx">                         'xprofile',
</span><span class="cx">                         __( 'Extended Profiles', 'buddypress' ),
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofiletemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-template.php (4210 => 4211)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-template.php        2011-04-15 09:30:34 UTC (rev 4210)
+++ trunk/bp-xprofile/bp-xprofile-template.php        2011-04-16 16:47:36 UTC (rev 4211)
</span><span class="lines">@@ -18,6 +18,10 @@
</span><span class="cx">         var $user_id;
</span><span class="cx"> 
</span><span class="cx">         function bp_xprofile_data_template( $user_id, $profile_group_id, $hide_empty_groups = false, $fetch_fields = false, $fetch_field_data = false, $exclude_groups = false, $exclude_fields = false ) {
</span><ins>+                $this-&gt;__construct( $user_id, $profile_group_id, $hide_empty_groups, $fetch_fields, $fetch_field_data, $exclude_groups, $exclude_fields );
+        }
+
+        function __construct( $user_id, $profile_group_id, $hide_empty_groups = false, $fetch_fields = false, $fetch_field_data = false, $exclude_groups = false, $exclude_fields = false ) {
</ins><span class="cx">                 $this-&gt;groups = BP_XProfile_Group::get( array(
</span><span class="cx">                         'profile_group_id'  =&gt; $profile_group_id,
</span><span class="cx">                         'user_id'           =&gt; $user_id,
</span></span></pre>
</div>
</div>

</body>
</html>