<!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][6119] trunk/bp-groups/bp-groups-classes.php: Removes access declarations on legacy methods in bp-groups-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/6119">6119</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2012-06-19 13:09:29 +0000 (Tue, 19 Jun 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Removes access declarations on legacy methods in bp-groups-classes.php
Prior versions of BuddyPress were written for PHP4 compatibility, which meant
that method visibility/access/static was not possible. WP and BP now require
PHP5, which means that new methods can use PHP5+ access declarations. However,
explicitly declaring 'static' or visibility on existing methods causes
backward compatibility issues, because any existing plugin that extends these
classes will throw fatal errors if they do not declare the same visibility/
static as the parent class.
See <a href="http://buddypress.trac.wordpress.org/ticket/4274">#4274</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpgroupsbpgroupsclassesphp">trunk/bp-groups/bp-groups-classes.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpgroupsbpgroupsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-classes.php (6118 => 6119)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-classes.php        2012-06-19 12:36:16 UTC (rev 6118)
+++ trunk/bp-groups/bp-groups-classes.php        2012-06-19 13:09:29 UTC (rev 6119)
</span><span class="lines">@@ -48,14 +48,14 @@
</span><span class="cx">          */
</span><span class="cx">         public $user_has_access;
</span><span class="cx">
</span><del>-        public function __construct( $id = null ) {
</del><ins>+        function __construct( $id = null ) {
</ins><span class="cx">                 if ( !empty( $id ) ) {
</span><span class="cx">                         $this->id = $id;
</span><span class="cx">                         $this->populate();
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        private function populate() {
</del><ins>+        function populate() {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( $group = $wpdb->get_row( $wpdb->prepare( "SELECT g.* FROM {$bp->groups->table_name} g WHERE g.id = %d", $this->id ) ) ) {                        
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function save() {
</del><ins>+        function save() {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $this->creator_id = apply_filters( 'groups_group_creator_id_before_save', $this->creator_id, $this->id );
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function delete() {
</del><ins>+        function delete() {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 // Delete groupmeta for the group
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx">
</span><span class="cx">         /** Static Methods ********************************************************/
</span><span class="cx">
</span><del>-        public static function group_exists( $slug, $table_name = false ) {
</del><ins>+        function group_exists( $slug, $table_name = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $table_name ) )
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">                 return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$table_name} WHERE slug = %s", $slug ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_id_from_slug( $slug ) {
</del><ins>+        function get_id_from_slug( $slug ) {
</ins><span class="cx">                 return BP_Groups_Group::group_exists( $slug );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">                 return $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->groups->table_name_members} WHERE group_id = %d and is_confirmed = 0 AND inviter_id = %d", $group_id, $user_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function filter_user_groups( $filter, $user_id = 0, $order = false, $limit = null, $page = null ) {
</del><ins>+        function filter_user_groups( $filter, $user_id = 0, $order = false, $limit = null, $page = null ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function search_groups( $filter, $limit = null, $page = null, $sort_by = false, $order = false ) {
</del><ins>+        function search_groups( $filter, $limit = null, $page = null, $sort_by = false, $order = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $filter = like_escape( $wpdb->escape( $filter ) );
</span><span class="lines">@@ -263,19 +263,19 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function check_slug( $slug ) {
</del><ins>+        function check_slug( $slug ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM {$bp->groups->table_name} WHERE slug = %s", $slug ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_slug( $group_id ) {
</del><ins>+        function get_slug( $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM {$bp->groups->table_name} WHERE id = %d", $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function has_members( $group_id ) {
</del><ins>+        function has_members( $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $members = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name_members} WHERE group_id = %d", $group_id ) );
</span><span class="lines">@@ -286,13 +286,13 @@
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function has_membership_requests( $group_id ) {
</del><ins>+        function has_membership_requests( $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 0", $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_membership_requests( $group_id, $limit = null, $page = null ) {
</del><ins>+        function get_membership_requests( $group_id, $limit = null, $page = null ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( !empty( $limit ) && !empty( $page ) ) {
</span><span class="lines">@@ -305,7 +305,7 @@
</span><span class="cx">                 return array( 'requests' => $paged_requests, 'total' => $total_requests );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get( $type = 'newest', $per_page = null, $page = null, $user_id = 0, $search_terms = false, $include = false, $populate_extras = true, $exclude = false, $show_hidden = false ) {
</del><ins>+        function get( $type = 'newest', $per_page = null, $page = null, $user_id = 0, $search_terms = false, $include = false, $populate_extras = true, $exclude = false, $show_hidden = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $sql = array();
</span><span class="lines">@@ -430,7 +430,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_by_most_forum_topics( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
</del><ins>+        function get_by_most_forum_topics( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
</ins><span class="cx">                 global $wpdb, $bp, $bbdb;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $bbdb ) )
</span><span class="lines">@@ -471,7 +471,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_by_most_forum_posts( $limit = null, $page = null, $search_terms = false, $populate_extras = true, $exclude = false ) {
</del><ins>+        function get_by_most_forum_posts( $limit = null, $page = null, $search_terms = false, $populate_extras = true, $exclude = false ) {
</ins><span class="cx">                 global $wpdb, $bp, $bbdb;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $bbdb ) )
</span><span class="lines">@@ -512,7 +512,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_by_letter( $letter, $limit = null, $page = null, $populate_extras = true, $exclude = false ) {
</del><ins>+        function get_by_letter( $letter, $limit = null, $page = null, $populate_extras = true, $exclude = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 // Multibyte compliance
</span><span class="lines">@@ -552,7 +552,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_random( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
</del><ins>+        function get_random( $limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $pag_sql = $hidden_sql = $search_sql = $exclude_sql = '';
</span><span class="lines">@@ -591,7 +591,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_group_extras( &$paged_groups, &$group_ids, $type = false ) {
</del><ins>+        function get_group_extras( &$paged_groups, &$group_ids, $type = false ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $group_ids ) )
</span><span class="lines">@@ -623,13 +623,13 @@
</span><span class="cx">                 return $paged_groups;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function delete_all_invites( $group_id ) {
</del><ins>+        function delete_all_invites( $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE group_id = %d AND invite_sent = 1", $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_total_group_count() {
</del><ins>+        function get_total_group_count() {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $hidden_sql = '';
</span><span class="lines">@@ -639,7 +639,7 @@
</span><span class="cx">                 return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name} {$hidden_sql}" ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_global_forum_topic_count( $type ) {
</del><ins>+        function get_global_forum_topic_count( $type ) {
</ins><span class="cx">                 global $bbdb, $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( 'unreplied' == $type )
</span><span class="lines">@@ -650,7 +650,7 @@
</span><span class="cx">                 return $wpdb->get_var( "SELECT COUNT(t.topic_id) FROM {$bbdb->topics} AS t, {$bp->groups->table_name} AS g LEFT JOIN {$bp->groups->table_name_groupmeta} AS gm ON g.id = gm.group_id WHERE (gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id) AND g.status = 'public' AND t.topic_status = '0' AND t.topic_sticky != '2' {$extra_sql} " );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_total_member_count( $group_id ) {
</del><ins>+        function get_total_member_count( $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0", $group_id ) );
</span><span class="lines">@@ -665,7 +665,7 @@
</span><span class="cx">          * @param str $status 'public', 'private', 'hidden', 'all' Which group types to count
</span><span class="cx">          * @return int The topic count
</span><span class="cx">          */
</span><del>-        public static function get_global_topic_count( $status = 'public', $search_terms = false ) {
</del><ins>+        function get_global_topic_count( $status = 'public', $search_terms = false ) {
</ins><span class="cx">                 global $bbdb, $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 switch ( $status ) {
</span><span class="lines">@@ -719,8 +719,8 @@
</span><span class="cx">         var $invite_sent;
</span><span class="cx">         var $user;
</span><span class="cx">
</span><del>-        public function __construct( $user_id = 0, $group_id = 0, $id = false, $populate = true ) {
-                
</del><ins>+        function __construct( $user_id = 0, $group_id = 0, $id = false, $populate = true ) {
+
</ins><span class="cx">                 // User and group are not empty, and ID is
</span><span class="cx">                 if ( !empty( $user_id ) && !empty( $group_id ) && empty( $id ) ) {
</span><span class="cx">                         $this->user_id = $user_id;
</span><span class="lines">@@ -741,7 +741,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        private function populate() {
</del><ins>+        function populate() {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( $this->user_id && $this->group_id && !$this->id )
</span><span class="lines">@@ -770,7 +770,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function save() {
</del><ins>+        function save() {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $this->user_id = apply_filters( 'groups_member_user_id_before_save', $this->user_id, $this->id );
</span><span class="lines">@@ -808,7 +808,7 @@
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function promote( $status = 'mod' ) {
</del><ins>+        function promote( $status = 'mod' ) {
</ins><span class="cx">                 if ( 'mod' == $status ) {
</span><span class="cx">                         $this->is_admin = 0;
</span><span class="cx">                         $this->is_mod = 1;
</span><span class="lines">@@ -824,7 +824,7 @@
</span><span class="cx">                 return $this->save();
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function demote() {
</del><ins>+        function demote() {
</ins><span class="cx">                 $this->is_mod = 0;
</span><span class="cx">                 $this->is_admin = 0;
</span><span class="cx">                 $this->user_title = false;
</span><span class="lines">@@ -832,7 +832,7 @@
</span><span class="cx">                 return $this->save();
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function ban() {
</del><ins>+        function ban() {
</ins><span class="cx">
</span><span class="cx">                 if ( !empty( $this->is_admin ) )
</span><span class="cx">                         return false;
</span><span class="lines">@@ -849,7 +849,7 @@
</span><span class="cx">                 return $this->save();
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function unban() {
</del><ins>+        function unban() {
</ins><span class="cx">
</span><span class="cx">                 if ( !empty( $this->is_admin ) )
</span><span class="cx">                         return false;
</span><span class="lines">@@ -862,7 +862,7 @@
</span><span class="cx">                 return $this->save();
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function accept_invite() {
</del><ins>+        function accept_invite() {
</ins><span class="cx">
</span><span class="cx">                 $this->inviter_id = 0;
</span><span class="cx">                 $this->is_confirmed = 1;
</span><span class="lines">@@ -871,7 +871,7 @@
</span><span class="cx">                 bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function accept_request() {
</del><ins>+        function accept_request() {
</ins><span class="cx">
</span><span class="cx">                 $this->is_confirmed = 1;
</span><span class="cx">                 $this->date_modified = bp_core_current_time();
</span><span class="lines">@@ -879,7 +879,7 @@
</span><span class="cx">                 bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public function remove() {
</del><ins>+        function remove() {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $sql = $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $this->user_id, $this->group_id );
</span><span class="lines">@@ -898,13 +898,13 @@
</span><span class="cx">
</span><span class="cx">         /** Static Methods ********************************************************/
</span><span class="cx">
</span><del>-        public static function delete( $user_id, $group_id ) {
</del><ins>+        function delete( $user_id, $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_group_ids( $user_id, $limit = false, $page = false ) {
</del><ins>+        function get_group_ids( $user_id, $limit = false, $page = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $pag_sql = '';
</span><span class="lines">@@ -925,7 +925,7 @@
</span><span class="cx">                 return array( 'groups' => $groups, 'total' => (int) $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_recently_joined( $user_id, $limit = false, $page = false, $filter = false ) {
</del><ins>+        function get_recently_joined( $user_id, $limit = false, $page = false, $filter = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $pag_sql = $hidden_sql = $filter_sql = '';
</span><span class="lines">@@ -947,7 +947,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_is_admin_of( $user_id, $limit = false, $page = false, $filter = false ) {
</del><ins>+        function get_is_admin_of( $user_id, $limit = false, $page = false, $filter = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $pag_sql = $hidden_sql = $filter_sql = '';
</span><span class="lines">@@ -969,7 +969,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_is_mod_of( $user_id, $limit = false, $page = false, $filter = false ) {
</del><ins>+        function get_is_mod_of( $user_id, $limit = false, $page = false, $filter = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $pag_sql = $hidden_sql = $filter_sql = '';
</span><span class="lines">@@ -991,7 +991,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function total_group_count( $user_id = 0 ) {
</del><ins>+        function total_group_count( $user_id = 0 ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1004,7 +1004,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_invites( $user_id, $limit = false, $page = false, $exclude = false ) {
</del><ins>+        function get_invites( $user_id, $limit = false, $page = false, $exclude = false ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 $pag_sql = ( !empty( $limit ) && !empty( $page ) ) ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ) : '';
</span><span class="lines">@@ -1017,7 +1017,7 @@
</span><span class="cx">                 return array( 'groups' => $paged_groups, 'total' => $total_groups );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function check_has_invite( $user_id, $group_id, $type = 'sent' ) {
</del><ins>+        function check_has_invite( $user_id, $group_id, $type = 'sent' ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1031,7 +1031,7 @@
</span><span class="cx">                 return $wpdb->get_var( $wpdb->prepare( $sql, $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function delete_invite( $user_id, $group_id ) {
</del><ins>+        function delete_invite( $user_id, $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1040,7 +1040,7 @@
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND inviter_id != 0 AND invite_sent = 1", $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function delete_request( $user_id, $group_id ) {
</del><ins>+        function delete_request( $user_id, $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1049,7 +1049,7 @@
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND inviter_id = 0 AND invite_sent = 0", $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function check_is_admin( $user_id, $group_id ) {
</del><ins>+        function check_is_admin( $user_id, $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1058,7 +1058,7 @@
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_admin = 1 AND is_banned = 0", $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function check_is_mod( $user_id, $group_id ) {
</del><ins>+        function check_is_mod( $user_id, $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1067,7 +1067,7 @@
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_mod = 1 AND is_banned = 0", $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function check_is_member( $user_id, $group_id ) {
</del><ins>+        function check_is_member( $user_id, $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1076,7 +1076,7 @@
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 1 AND is_banned = 0", $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function check_is_banned( $user_id, $group_id ) {
</del><ins>+        function check_is_banned( $user_id, $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1094,7 +1094,7 @@
</span><span class="cx">          * @param int $group_id
</span><span class="cx">          * @since 1.2.6
</span><span class="cx">          */
</span><del>-        public static function check_is_creator( $user_id, $group_id ) {
</del><ins>+        function check_is_creator( $user_id, $group_id ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1103,7 +1103,7 @@
</span><span class="cx">                 return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name} WHERE creator_id = %d AND id = %d", $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function check_for_membership_request( $user_id, $group_id ) {
</del><ins>+        function check_for_membership_request( $user_id, $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="lines">@@ -1112,7 +1112,7 @@
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND is_banned = 0 AND inviter_id = 0", $user_id, $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_random_groups( $user_id, $total_groups = 5 ) {
</del><ins>+        function get_random_groups( $user_id, $total_groups = 5 ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 // If the user is logged in and viewing their random groups, we can show hidden and private groups
</span><span class="lines">@@ -1123,31 +1123,31 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_group_member_ids( $group_id ) {
</del><ins>+        function get_group_member_ids( $group_id ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0", $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_group_administrator_ids( $group_id ) {
</del><ins>+        function get_group_administrator_ids( $group_id ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->get_results( $wpdb->prepare( "SELECT user_id, date_modified FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_admin = 1 AND is_banned = 0", $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_group_moderator_ids( $group_id ) {
</del><ins>+        function get_group_moderator_ids( $group_id ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->get_results( $wpdb->prepare( "SELECT user_id, date_modified FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_mod = 1 AND is_banned = 0", $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_all_membership_request_user_ids( $group_id ) {
</del><ins>+        function get_all_membership_request_user_ids( $group_id ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 0 AND inviter_id = 0", $group_id ) );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function get_all_for_group( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) {
</del><ins>+        function get_all_for_group( $group_id, $limit = false, $page = false, $exclude_admins_mods = true, $exclude_banned = true, $exclude = false ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 $pag_sql = '';
</span><span class="lines">@@ -1199,7 +1199,7 @@
</span><span class="cx">                 return array( 'members' => $members, 'count' => $total_member_count );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        public static function delete_all( $group_id ) {
</del><ins>+        function delete_all( $group_id ) {
</ins><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><span class="cx">                 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE group_id = %d", $group_id ) );
</span><span class="lines">@@ -1214,7 +1214,7 @@
</span><span class="cx">          * @since 1.0
</span><span class="cx">          * @uses BP_Groups_Member
</span><span class="cx">          */
</span><del>-        public static function delete_all_for_user( $user_id ) {
</del><ins>+        function delete_all_for_user( $user_id ) {
</ins><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><span class="cx">                 // Get all the group ids for the current user's groups and update counts
</span></span></pre>
</div>
</div>
</body>
</html>