<!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][6121] trunk/bp-core/bp-core-classes.php: Removes static and access declarations on methods in bp-core-classes.php</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><a href="http://buddypress.trac.wordpress.org/changeset/6121">6121</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2012-06-19 13:27:00 +0000 (Tue, 19 Jun 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Removes static and access declarations on methods in bp-core-classes.php

See <a href="http://buddypress.trac.wordpress.org/ticket/4274">#4274</a> and r6119</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcoreclassesphp">trunk/bp-core/bp-core-classes.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcoreclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-classes.php (6120 => 6121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-classes.php        2012-06-19 13:16:40 UTC (rev 6120)
+++ trunk/bp-core/bp-core-classes.php        2012-06-19 13:27:00 UTC (rev 6121)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">          * @param integer $user_id The ID for the user
</span><span class="cx">          * @param boolean $populate_extras Whether to fetch extra information such as group/friendship counts or not.
</span><span class="cx">          */
</span><del>-        public function __construct( $user_id, $populate_extras = false ) {
</del><ins>+        function __construct( $user_id, $populate_extras = false ) {
</ins><span class="cx">                 if ( !empty( $user_id ) ) {
</span><span class="cx">                         $this-&gt;id = $user_id;
</span><span class="cx">                         $this-&gt;populate();
</span><span class="lines">@@ -147,7 +147,7 @@
</span><span class="cx">          * @uses bp_core_fetch_avatar() Returns HTML formatted avatar for a user
</span><span class="cx">          * @uses bp_profile_last_updated_date() Returns the last updated date for a user.
</span><span class="cx">          */
</span><del>-        private function populate() {
</del><ins>+        function populate() {
</ins><span class="cx"> 
</span><span class="cx">                 if ( bp_is_active( 'xprofile' ) )
</span><span class="cx">                         $this-&gt;profile_data = $this-&gt;get_profile_data();
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">         /**
</span><span class="cx">          * Populates extra fields such as group and friendship counts.
</span><span class="cx">          */
</span><del>-        private function populate_extras() {
</del><ins>+        function populate_extras() {
</ins><span class="cx"> 
</span><span class="cx">                 if ( bp_is_active( 'friends' ) ) {
</span><span class="cx">                         $this-&gt;total_friends = BP_Friends_Friendship::total_friend_count( $this-&gt;id );
</span><span class="lines">@@ -192,13 +192,13 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        private function get_profile_data() {
</del><ins>+        function get_profile_data() {
</ins><span class="cx">                 return BP_XProfile_ProfileData::get_all_for_user( $this-&gt;id );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /** Static Methods ********************************************************/
</span><span class="cx"> 
</span><del>-        public static function get_users( $type, $limit = 0, $page = 1, $user_id = 0, $include = false, $search_terms = false, $populate_extras = true, $exclude = false, $meta_key = false, $meta_value = false ) {
</del><ins>+        function get_users( $type, $limit = 0, $page = 1, $user_id = 0, $include = false, $search_terms = false, $populate_extras = true, $exclude = false, $meta_key = false, $meta_value = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx"> 
</span><span class="cx">                 $sql = array();
</span><span class="lines">@@ -391,7 +391,7 @@
</span><span class="cx">          * @return mixed False on error, otherwise associative array of results.
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function get_users_by_letter( $letter, $limit = null, $page = 1, $populate_extras = true, $exclude = '' ) {
</del><ins>+        function get_users_by_letter( $letter, $limit = null, $page = 1, $populate_extras = true, $exclude = '' ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 $pag_sql = '';
</span><span class="lines">@@ -453,7 +453,7 @@
</span><span class="cx">          * @return array Associative array
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) {
</del><ins>+        function get_specific_users( $user_ids, $limit = null, $page = 1, $populate_extras = true ) {
</ins><span class="cx">                 global $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 $pag_sql = '';
</span><span class="lines">@@ -498,7 +498,7 @@
</span><span class="cx">          * @return array Associative array
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) {
</del><ins>+        function search_users( $search_terms, $limit = null, $page = 1, $populate_extras = true ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 $user_ids = array();
</span><span class="lines">@@ -542,7 +542,7 @@
</span><span class="cx">          * @return mixed False on error, otherwise associative array of results.
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function get_user_extras( &amp;$paged_users, &amp;$user_ids, $type = false ) {
</del><ins>+        function get_user_extras( &amp;$paged_users, &amp;$user_ids, $type = false ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 if ( empty( $user_ids ) )
</span><span class="lines">@@ -622,7 +622,7 @@
</span><span class="cx">          * @return array Associative array
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function get_core_userdata( $user_id ) {
</del><ins>+        function get_core_userdata( $user_id ) {
</ins><span class="cx">                 global $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 if ( !$user = $wpdb-&gt;get_row( $wpdb-&gt;prepare( &quot;SELECT * FROM $wpdb-&gt;users WHERE ID = %d LIMIT 1&quot;, $user_id ) ) )
</span><span class="lines">@@ -705,7 +705,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @param integer $id
</span><span class="cx">          */
</span><del>-        public function __construct( $id = 0 ) {
</del><ins>+        function __construct( $id = 0 ) {
</ins><span class="cx">                 if ( !empty( $id ) ) {
</span><span class="cx">                         $this-&gt;id = $id;
</span><span class="cx">                         $this-&gt;populate();
</span><span class="lines">@@ -719,7 +719,7 @@
</span><span class="cx">          * @global wpdb $wpdb WordPress database object
</span><span class="cx">          * @return bool Success or failure
</span><span class="cx">          */
</span><del>-        public function save() {
</del><ins>+        function save() {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 // Update
</span><span class="lines">@@ -747,7 +747,7 @@
</span><span class="cx">          * @global BuddyPress $bp The one true BuddyPress instance
</span><span class="cx">          * @global wpdb $wpdb WordPress database object
</span><span class="cx">          */
</span><del>-        private function populate() {
</del><ins>+        function populate() {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 if ( $notification = $wpdb-&gt;get_row( $wpdb-&gt;prepare( &quot;SELECT * FROM {$bp-&gt;core-&gt;table_name_notifications} WHERE id = %d&quot;, $this-&gt;id ) ) ) {
</span><span class="lines">@@ -763,7 +763,7 @@
</span><span class="cx"> 
</span><span class="cx">         /** Static Methods ********************************************************/
</span><span class="cx"> 
</span><del>-        public static function check_access( $user_id, $notification_id ) {
</del><ins>+        function check_access( $user_id, $notification_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx"> 
</span><span class="cx">                 return $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT COUNT(id) FROM {$bp-&gt;core-&gt;table_name_notifications} WHERE id = %d AND user_id = %d&quot;, $notification_id, $user_id ) );
</span><span class="lines">@@ -779,7 +779,7 @@
</span><span class="cx">          * @return array Associative array
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function get_all_for_user( $user_id, $status = 'is_new' ) {
</del><ins>+        function get_all_for_user( $user_id, $status = 'is_new' ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 $is_new = 'is_new' == $status ? ' AND is_new = 1 ' : '';
</span><span class="lines">@@ -797,7 +797,7 @@
</span><span class="cx">          * @param string $component_action
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function delete_for_user_by_type( $user_id, $component_name, $component_action ) {
</del><ins>+        function delete_for_user_by_type( $user_id, $component_name, $component_action ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;core-&gt;table_name_notifications} WHERE user_id = %d AND component_name = %s AND component_action = %s&quot;, $user_id, $component_name, $component_action ) );
</span><span class="lines">@@ -815,7 +815,7 @@
</span><span class="cx">          * @param integer $secondary_item_id (optional) The secondary item id of the notifications that we wish to use to delete.
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
</del><ins>+        function delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 $secondary_item_sql = !empty( $secondary_item_id ) ? $wpdb-&gt;prepare( &quot; AND secondary_item_id = %d&quot;, $secondary_item_id ) : '';
</span><span class="lines">@@ -833,7 +833,7 @@
</span><span class="cx">          * @param string $component_action The action of the component the notification was sent from.
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function delete_from_user_by_type( $user_id, $component_name, $component_action ) {
</del><ins>+        function delete_from_user_by_type( $user_id, $component_name, $component_action ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 return $wpdb-&gt;query( $wpdb-&gt;prepare( &quot;DELETE FROM {$bp-&gt;core-&gt;table_name_notifications} WHERE item_id = %d AND component_name = %s AND component_action = %s&quot;, $user_id, $component_name, $component_action ) );
</span><span class="lines">@@ -850,7 +850,7 @@
</span><span class="cx">          * @param string $secondary_item_id Optional secondary item id that the notifications are to have.
</span><span class="cx">          * @static
</span><span class="cx">          */
</span><del>-        public static function delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) {
</del><ins>+        function delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx"> 
</span><span class="cx">                 if ( $component_action )
</span><span class="lines">@@ -1002,7 +1002,7 @@
</span><span class="cx">          * @param array $args
</span><span class="cx">          * @return bool False if not allowed
</span><span class="cx">          */
</span><del>-        public function __construct( $args = '' ) {
</del><ins>+        function __construct( $args = '' ) {
</ins><span class="cx"> 
</span><span class="cx">                 // Default arguments
</span><span class="cx">                 $defaults = array(
</span><span class="lines">@@ -1106,7 +1106,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @return string
</span><span class="cx">          */
</span><del>-        public function contents() {
</del><ins>+        function contents() {
</ins><span class="cx">                 return $this-&gt;contents;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1115,7 +1115,7 @@
</span><span class="cx">          *
</span><span class="cx">          * Output contents of button
</span><span class="cx">          */
</span><del>-        public function display() {
</del><ins>+        function display() {
</ins><span class="cx">                 if ( !empty( $this-&gt;contents ) )
</span><span class="cx">                         echo $this-&gt;contents;
</span><span class="cx">         }
</span><span class="lines">@@ -1137,7 +1137,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @global unknown $wp_embed
</span><span class="cx">          */
</span><del>-        public function __construct() {
</del><ins>+        function __construct() {
</ins><span class="cx">                 global $wp_embed;
</span><span class="cx"> 
</span><span class="cx">                 // Make sure we populate the WP_Embed handlers array.
</span><span class="lines">@@ -1186,7 +1186,7 @@
</span><span class="cx">          * @param string $url The URL attempting to be embeded.
</span><span class="cx">          * @return string The embed HTML on success, otherwise the original URL.
</span><span class="cx">          */
</span><del>-        public function shortcode( $attr, $url = '' ) {
</del><ins>+        function shortcode( $attr, $url = '' ) {
</ins><span class="cx">                 if ( empty( $url ) )
</span><span class="cx">                         return '';
</span><span class="cx"> 
</span><span class="lines">@@ -1251,7 +1251,7 @@
</span><span class="cx">          * @param array $rawattr Untouched shortcode attributes from {@link WP_Embed::shortcode()}.
</span><span class="cx">          * @return string The embed HTML on success, otherwise the original URL.
</span><span class="cx">          */
</span><del>-        public function parse_oembed( $id, $url, $attr, $rawattr ) {
</del><ins>+        function parse_oembed( $id, $url, $attr, $rawattr ) {
</ins><span class="cx">                 $id = intval( $id );
</span><span class="cx"> 
</span><span class="cx">                 if ( $id ) {
</span></span></pre>
</div>
</div>

</body>
</html>