<!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][6674] trunk/bp-groups/bp-groups-admin.php: Escape some output and clean up code in bp-groups-admin.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/6674">6674</a></dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2012-12-26 09:17:49 +0000 (Wed, 26 Dec 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Escape some output and clean up code in bp-groups-admin.php.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpgroupsbpgroupsadminphp">trunk/bp-groups/bp-groups-admin.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpgroupsbpgroupsadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-admin.php (6673 => 6674)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-admin.php        2012-12-25 23:22:13 UTC (rev 6673)
+++ trunk/bp-groups/bp-groups-admin.php        2012-12-26 09:17:49 UTC (rev 6674)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @global object $bp BuddyPress global settings
</span><span class="cx"> * @global BP_Groups_List_Table $bp_groups_list_table Groups screen list table
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.7)
</ins><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_load() {
</span><span class="cx">         global $bp_groups_list_table;
</span><span class="lines">@@ -575,7 +575,7 @@
</span><span class="cx">                 <p><strong><?php _e( 'This action cannot be undone.', 'buddypress' ) ?></strong></p>
</span><span class="cx">
</span><span class="cx">                 <a class="button-primary" href="<?php echo wp_nonce_url( add_query_arg( array( 'action' => 'do_delete', 'gid' => implode( ',', $gids ) ), $base_url ), 'bp-groups-delete' ) ?>"><?php _e( 'Delete Permanently', 'buddypress' ) ?></a>
</span><del>-                <a class="button" href="<?php echo $base_url ?>"><?php _e( 'Cancel', 'buddypress' ) ?></a>
</del><ins>+                <a class="button" href="<?php echo esc_attr( $base_url ); ?>"><?php _e( 'Cancel', 'buddypress' ) ?></a>
</ins><span class="cx">         </div>
</span><span class="cx">
</span><span class="cx">         <?php
</span><span class="lines">@@ -601,15 +601,13 @@
</span><span class="cx">                 if ( $deleted > 0 ) {
</span><span class="cx">                         $messages[] = sprintf( _n( '%s activity has been permanently deleted.', '%s activity items have been permanently deleted.', $deleted, 'buddypress' ), number_format_i18n( $deleted ) );
</span><span class="cx">                 }
</span><del>-
</del><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Prepare the activity items for display
</span><span class="cx">         $bp_groups_list_table->prepare_items();
</span><span class="cx">
</span><span class="cx">         // Call an action for plugins to modify the messages before we display the edit form
</span><del>-        do_action( 'bp_groups_admin_index', $messages );
-?>
</del><ins>+        do_action( 'bp_groups_admin_index', $messages ); ?>
</ins><span class="cx">
</span><span class="cx">         <div class="wrap">
</span><span class="cx">                 <?php screen_icon( 'buddypress-groups' ); ?>
</span><span class="lines">@@ -647,9 +645,8 @@
</span><span class="cx"> * @since BuddyPress (1.7)
</span><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_edit_metabox_settings( $item ) {
</span><del>-        $invite_status = groups_get_groupmeta( $item->id, 'invite_status' );
</del><span class="cx">
</span><del>-?>
</del><ins>+        $invite_status = groups_get_groupmeta( $item->id, 'invite_status' ); ?>
</ins><span class="cx">
</span><span class="cx">         <div class="bp-groups-settings-section" id="bp-groups-settings-section-forum">
</span><span class="cx">                 <label for="group-show-forum"><input type="checkbox" name="group-show-forum" id="group-show-forum" <?php checked( $item->enable_forum ) ?> /> <?php _e( 'Enable discussion forum', 'buddypress' ) ?><br />
</span><span class="lines">@@ -702,7 +699,7 @@
</span><span class="cx">         // We'll also keep track of group members here to place them into a
</span><span class="cx">         // javascript variable, which will help with group member autocomplete
</span><span class="cx">         $member_ids = array();
</span><del>-        $members = array(
</del><ins>+        $members = array(
</ins><span class="cx">                 'admin' => array(),
</span><span class="cx">                 'mod' => array(),
</span><span class="cx">                 'member' => array(),
</span><span class="lines">@@ -772,23 +769,24 @@
</span><span class="cx">                                 </thead>
</span><span class="cx">
</span><span class="cx">                                 <tbody>
</span><ins>+
</ins><span class="cx">                                 <?php foreach ( $type_users as $type_user ) : ?>
</span><del>-                                        <?php $user_link = bp_core_get_user_domain( $type_user->user_id ); ?>
</del><ins>+
</ins><span class="cx">                                         <tr>
</span><del>-                                                <th scope="row" class="uid-column"><?php echo $type_user->user_id ?></th>
</del><ins>+                                                <th scope="row" class="uid-column"><?php echo esc_html( $type_user->user_id ); ?></th>
</ins><span class="cx">
</span><span class="cx">                                                 <td class="uname-column">
</span><del>-                                                        <a style="float: left;" href="<?php echo $user_link ?>"><?php echo bp_core_fetch_avatar( array(
-                                                                        'item_id' => $type_user->user_id,
-                                                                        'width' => '32',
-                                                                        'height' => '32'
-                                                        ) ) ?></a>
</del><ins>+                                                        <a style="float: left;" href="<?php echo bp_core_get_user_domain( $type_user->user_id ); ?>"><?php echo bp_core_fetch_avatar( array(
+                                                                'item_id' => $type_user->user_id,
+                                                                'width' => '32',
+                                                                'height' => '32'
+                                                        ) ); ?></a>
</ins><span class="cx">
</span><span class="cx">                                                         <span style="margin: 8px; float: left;"><?php echo bp_core_get_userlink( $type_user->user_id ) ?></span>
</span><span class="cx">                                                 </td>
</span><span class="cx">
</span><span class="cx">                                                 <td class="urole-column">
</span><del>-                                                        <select class="bp-groups-role" id="bp-groups-role-<?php echo $type_user->user_id ?>" name="bp-groups-role[<?php echo $type_user->user_id ?>]">
</del><ins>+                                                        <select class="bp-groups-role" id="bp-groups-role-<?php echo esc_attr( $type_user->user_id ); ?>" name="bp-groups-role[<?php echo esc_attr( $type_user->user_id ); ?>]">
</ins><span class="cx">                                                                 <option value="admin" <?php selected( 'admin', $member_type ) ?>><?php _e( 'Administrator', 'buddypress' ) ?></option>
</span><span class="cx">                                                                 <option value="mod" <?php selected( 'mod', $member_type ) ?>><?php _e( 'Moderator', 'buddypress' ) ?></option>
</span><span class="cx">                                                                 <option value="member" <?php selected( 'member', $member_type ) ?>><?php _e( 'Member', 'buddypress' ) ?></option>
</span><span class="lines">@@ -796,11 +794,19 @@
</span><span class="cx">                                                                 <option class="remove" value="remove"><?php _e( 'Remove From Group', 'buddypress' ) ?></option>
</span><span class="cx">                                                         </select>
</span><span class="cx">
</span><del>-                                                        <?php /* Store the current role for this user, so we can easily detect changes */ ?>
-                                                        <input type="hidden" name="bp-groups-existing-role[<?php echo $type_user->user_id ?>]" value="<?php echo $member_type ?>" />
</del><ins>+                                                        <?php
+                                                        /**
+                                                         * Store the current role for this user,
+                                                         * so we can easily detect changes.
+                                                         *
+                                                         * @todo remove this, and do database detection on save
+                                                         */ ?>
+                                                        <input type="hidden" name="bp-groups-existing-role[<?php echo esc_attr( $type_user->user_id ); ?>]" value="<?php echo esc_attr( $member_type ); ?>" />
</ins><span class="cx">                                                 </td>
</span><span class="cx">                                         </tr>
</span><ins>+
</ins><span class="cx">                                 <?php endforeach; ?>
</span><ins>+
</ins><span class="cx">                                 </tbody>
</span><span class="cx">                         </table>
</span><span class="cx">
</span><span class="lines">@@ -839,7 +845,6 @@
</span><span class="cx">                         </div>
</span><span class="cx">                         <div class="clear"></div>
</span><span class="cx">                 </div><!-- #major-publishing-actions -->
</span><del>-
</del><span class="cx">         </div><!-- #submitcomment -->
</span><span class="cx">
</span><span class="cx"> <?php
</span><span class="lines">@@ -850,11 +855,12 @@
</span><span class="cx"> *
</span><span class="cx"> * @since BuddyPress (1.7)
</span><span class="cx"> */
</span><del>-function bp_groups_admin_get_usernames_from_ids( $user_ids ) {
</del><ins>+function bp_groups_admin_get_usernames_from_ids( $user_ids = array() ) {
+
</ins><span class="cx">         $usernames = array();
</span><ins>+        $users = new WP_User_Query( array( 'blog_id' => 0, 'include' => $user_ids ) );
</ins><span class="cx">
</span><del>-        $users = new WP_User_Query( array( 'blog_id' => 0, 'include' => $user_ids ) );
-        foreach ( $users->results as $user ) {
</del><ins>+        foreach ( (array) $users->results as $user ) {
</ins><span class="cx">                 $usernames[] = $user->user_login;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -867,23 +873,25 @@
</span><span class="cx"> * @since BuddyPress (1.7)
</span><span class="cx"> */
</span><span class="cx"> function bp_groups_admin_autocomplete_handler() {
</span><del>-        if ( ! current_user_can( 'bp_moderate' ) || is_multisite() && wp_is_large_network( 'users' ) )
</del><ins>+
+        // Bail if user user shouldn't be here, or is a large network
+        if ( ! current_user_can( 'bp_moderate' ) || ( is_multisite() && wp_is_large_network( 'users' ) ) )
</ins><span class="cx">                 wp_die( -1 );
</span><span class="cx">
</span><span class="cx">         $return = array();
</span><span class="cx">
</span><span class="cx">         // Exclude current group members
</span><span class="cx">         $group_members = isset( $_REQUEST['group_members'] ) ? wp_parse_id_list( $_REQUEST['group_members'] ) : array();
</span><del>-
-        $users = get_users( array(
-                'blog_id' => false,
-                'search' => '*' . $_REQUEST['term'] . '*',
-                'exclude' => $group_members,
</del><ins>+        $terms = isset( $_REQUEST['term'] ) ? $_REQUEST['term'] : '';
+        $users = get_users( array(
+                'blog_id' => false,
+                'search' => '*' . $terms . '*',
+                'exclude' => $group_members,
</ins><span class="cx">                 'search_columns' => array( 'user_login', 'user_nicename', 'user_email', 'display_name' ),
</span><del>-                'number' => 10
</del><ins>+                'number' => 10
</ins><span class="cx">         ) );
</span><span class="cx">
</span><del>-        foreach ( $users as $user ) {
</del><ins>+        foreach ( (array) $users as $user ) {
</ins><span class="cx">                 $return[] = array(
</span><span class="cx">                         /* translators: 1: user_login, 2: user_email */
</span><span class="cx">                         'label' => sprintf( __( '%1$s (%2$s)' ), $user->user_login, $user->user_email ),
</span><span class="lines">@@ -898,28 +906,28 @@
</span><span class="cx"> /**
</span><span class="cx"> * List table class for the Groups component admin page.
</span><span class="cx"> *
</span><del>- * @since BuddyPress (1.6)
</del><ins>+ * @since BuddyPress (1.7)
</ins><span class="cx"> */
</span><span class="cx"> class BP_Groups_List_Table extends WP_List_Table {
</span><span class="cx">
</span><span class="cx">         /**
</span><span class="cx">          * What type of view is being displayed? e.g. "All", "Pending", "Approved", "Spam"...
</span><span class="cx">          *
</span><del>-         * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.7)
</ins><span class="cx">         */
</span><span class="cx">         public $view = 'all';
</span><span class="cx">
</span><span class="cx">         /**
</span><span class="cx">          * Group counts for each group type
</span><span class="cx">          *
</span><del>-         * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.7)
</ins><span class="cx">          */
</span><span class="cx">         public $group_counts = 0;
</span><span class="cx">
</span><span class="cx">         /**
</span><span class="cx">          * Constructor
</span><span class="cx">          *
</span><del>-         * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.7)
</ins><span class="cx">          */
</span><span class="cx">         public function __construct() {
</span><span class="cx">
</span><span class="lines">@@ -934,7 +942,7 @@
</span><span class="cx">         /**
</span><span class="cx">          * Handle filtering of data, sorting, pagination, and any other data-manipulation required prior to rendering.
</span><span class="cx">          *
</span><del>-         * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.7)
</ins><span class="cx">          */
</span><span class="cx">         function prepare_items() {
</span><span class="cx">                 global $groups_template;
</span><span class="lines">@@ -942,9 +950,8 @@
</span><span class="cx">                 $screen = get_current_screen();
</span><span class="cx">
</span><span class="cx">                 // Option defaults
</span><del>-                $include_id = false;
-                $search_terms = false;
-                $sort = 'DESC';
</del><ins>+                $include_id = false;
+                $search_terms = false;
</ins><span class="cx">
</span><span class="cx">                 // Set current page
</span><span class="cx">                 $page = $this->get_pagenum();
</span><span class="lines">@@ -955,7 +962,7 @@
</span><span class="cx">                 // Sort order. Note: not supported in bp_has_groups()
</span><span class="cx">                 $order = 'ASC';
</span><span class="cx">                 if ( !empty( $_REQUEST['order'] ) ) {
</span><del>-                        $order = 'desc' == strtolower( $_REQUEST['order'] ) ? 'DESC' : 'ASC';
</del><ins>+                        $order = ( 'desc' == strtolower( $_REQUEST['order'] ) ) ? 'DESC' : 'ASC';
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // Order by - default to newest
</span><span class="lines">@@ -1097,13 +1104,13 @@
</span><span class="cx">          * @param object $item The current item
</span><span class="cx">          * @since BuddyPress (1.7)
</span><span class="cx">          */
</span><del>-        function single_row( $item ) {
</del><ins>+        function single_row( $item = array() ) {
</ins><span class="cx">                 static $row_class = '';
</span><span class="cx">
</span><span class="cx">                 if ( empty( $row_class ) ) {
</span><del>-                        $row_class = ' class="alternate"';
</del><ins>+                        $row_class = ' class="alternate odd"';
</ins><span class="cx">                 } else {
</span><del>-                        $row_class = '';
</del><ins>+                        $row_class = ' class="even"';
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 echo '<tr' . $row_class . ' id="activity-' . esc_attr( $item['id'] ) . '" data-parent_id="' . esc_attr( $item['id'] ) . '" data-root_id="' . esc_attr( $item['id'] ) . '">';
</span><span class="lines">@@ -1136,10 +1143,9 @@
</span><span class="cx">          * @since BuddyPress (1.7)
</span><span class="cx">          */
</span><span class="cx">         function get_bulk_actions() {
</span><del>-                $actions = array();
-                $actions['delete'] = __( 'Delete', 'buddypress' );
-
-                return apply_filters( 'bp_groups_list_table_get_bulk_actions', $actions );
</del><ins>+                return apply_filters( 'bp_groups_list_table_get_bulk_actions', array(
+                        'delete' => __( 'Delete', 'buddypress' )
+                ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /**
</span><span class="lines">@@ -1152,11 +1158,11 @@
</span><span class="cx">         function get_columns() {
</span><span class="cx">                 return array(
</span><span class="cx">                         'cb' => '<input name type="checkbox" />',
</span><del>-                        'comment' => _x( 'Name', 'Groups admin Group Name column header', 'buddypress' ),
</del><ins>+                        'comment' => _x( 'Name', 'Groups admin Group Name column header', 'buddypress' ),
</ins><span class="cx">                         'description' => _x( 'Description', 'Groups admin Group Description column header', 'buddypress' ),
</span><del>-                        'status' => _x( 'Status', 'Groups admin Privacy Status column header', 'buddypress' ),
-                        'members' => _x( '# Members', 'Groups admin Members column header', 'buddypress' ),
-                        'last_active' => _x( 'Last Active', 'Groups admin Last Active column header', 'buddypress' )
</del><ins>+                        'status' => _x( 'Status', 'Groups admin Privacy Status column header', 'buddypress' ),
+                        'members' => _x( '# Members', 'Groups admin Members column header', 'buddypress' ),
+                        'last_active' => _x( 'Last Active', 'Groups admin Last Active column header', 'buddypress' )
</ins><span class="cx">                 );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1168,9 +1174,9 @@
</span><span class="cx">          */
</span><span class="cx">         function get_sortable_columns() {
</span><span class="cx">                 return array(
</span><del>-                        'gid' => array( 'gid', false ),
-                        'comment' => array( 'name', false ),
-                        'members' => array( 'members', false ),
</del><ins>+                        'gid' => array( 'gid', false ),
+                        'comment' => array( 'name', false ),
+                        'members' => array( 'members', false ),
</ins><span class="cx">                         'last_active' => array( 'last_active', false )
</span><span class="cx">                 );
</span><span class="cx">         }
</span><span class="lines">@@ -1180,9 +1186,9 @@
</span><span class="cx">          *
</span><span class="cx">          * @param array $item A singular item (one full row)
</span><span class="cx">          * @see WP_List_Table::single_row_columns()
</span><del>-         * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.7)
</ins><span class="cx">          */
</span><del>-        function column_cb( $item ) {
</del><ins>+        function column_cb( $item = array() ) {
</ins><span class="cx">                 printf( '<input type="checkbox" name="gid[]" value="%d" />', (int) $item['id'] );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1191,9 +1197,9 @@
</span><span class="cx">          *
</span><span class="cx">          * @param array $item A singular item (one full row)
</span><span class="cx">          * @see WP_List_Table::single_row_columns()
</span><del>-         * @since BuddyPress (1.6)
</del><ins>+         * @since BuddyPress (1.7)
</ins><span class="cx">          */
</span><del>-        function column_gid( $item ) {
</del><ins>+        function column_gid( $item = array() ) {
</ins><span class="cx">                 echo '<strong>' . $item['id'] . '</strong>';
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1206,7 +1212,7 @@
</span><span class="cx">          * @see WP_List_Table::single_row_columns()
</span><span class="cx">          * @since BuddyPress (1.7)
</span><span class="cx">          */
</span><del>-        function column_comment( $item ) {
</del><ins>+        function column_comment( $item = array() ) {
</ins><span class="cx">
</span><span class="cx">                 // Preorder items: Visit | Edit | Delete
</span><span class="cx">                 $actions = array(
</span><span class="lines">@@ -1220,7 +1226,6 @@
</span><span class="cx">
</span><span class="cx">                 // Build actions URLs
</span><span class="cx">                 $base_url = bp_get_admin_url( 'admin.php?page=bp-groups&amp;gid=' . $item['id'] );
</span><del>-
</del><span class="cx">                 $delete_url = wp_nonce_url( $base_url . "&amp;action=delete", 'bp-groups-delete' );
</span><span class="cx">                 $edit_url = $base_url . '&amp;action=edit';
</span><span class="cx">                 $visit_url = bp_get_group_permalink( $item_obj );
</span><span class="lines">@@ -1261,7 +1266,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since BuddyPress (1.7)
</span><span class="cx">          */
</span><del>-        function column_description( $item ) {
</del><ins>+        function column_description( $item = array() ) {
</ins><span class="cx">                 echo apply_filters_ref_array( 'bp_get_group_description', array( $item['description'], $item ) );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1270,9 +1275,8 @@
</span><span class="cx">          *
</span><span class="cx">          * @since BuddyPress (1.7)
</span><span class="cx">          */
</span><del>-        function column_status( $item ) {
-                $status = $item['status'];
-
</del><ins>+        function column_status( $item = array() ) {
+                $status = $item['status'];
</ins><span class="cx">                 $status_desc = '';
</span><span class="cx">
</span><span class="cx">                 // @todo This should be abstracted out somewhere for the whole
</span><span class="lines">@@ -1297,7 +1301,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since BuddyPress (1.7)
</span><span class="cx">          */
</span><del>-        function column_members( $item ) {
</del><ins>+        function column_members( $item = array() ) {
</ins><span class="cx">                 $count = groups_get_groupmeta( $item['id'], 'total_member_count' );
</span><span class="cx">                 echo apply_filters_ref_array( 'bp_groups_admin_get_group_member_count', array( (int) $count, $item ) );
</span><span class="cx">         }
</span><span class="lines">@@ -1307,7 +1311,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since BuddyPress (1.7)
</span><span class="cx">          */
</span><del>-        function column_last_active( $item ) {
</del><ins>+        function column_last_active( $item = array() ) {
</ins><span class="cx">                 $last_active = groups_get_groupmeta( $item['id'], 'last_activity' );
</span><span class="cx">                 echo apply_filters_ref_array( 'bp_groups_admin_get_group_last_active', array( $last_active, $item ) );
</span><span class="cx">         }
</span></span></pre>
</div>
</div>
</body>
</html>