<!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][9301] trunk/src/bp-messages: Messages: Refactor `bp_has_message_threads()` stack to use array-style parameters.</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 { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { 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" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/9301">9301</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/9301","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>r-a-y</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-01-06 03:51:19 +0000 (Tue, 06 Jan 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Messages: Refactor `bp_has_message_threads()` stack to use array-style parameters.
Props Mamaduka.
See <a href="http://buddypress.trac.wordpress.org/ticket/3767">#3767</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpmessagesbpmessagesclassesphp">trunk/src/bp-messages/bp-messages-classes.php</a></li>
<li><a href="#trunksrcbpmessagesbpmessagestemplatephp">trunk/src/bp-messages/bp-messages-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpmessagesbpmessagesclassesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-messages/bp-messages-classes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-messages/bp-messages-classes.php 2015-01-06 03:38:23 UTC (rev 9300)
+++ trunk/src/bp-messages/bp-messages-classes.php 2015-01-06 03:51:19 UTC (rev 9301)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -319,42 +319,73 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since BuddyPress (1.0.0)
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $user_id The user ID.
- * @param string $box The type of mailbox to get. Either 'inbox' or 'sentbox'.
- * Defaults to 'inbox'.
- * @param string $type The type of messages to get. Either 'all' or 'unread'
- * or 'read'. Defaults to 'all'.
- * @param int $limit The number of messages to get. Defaults to null.
- * @param int $page The page number to get. Defaults to null.
- * @param string $search_terms The search term to use. Defaults to ''.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args {
+ * Array of arguments.
+ * @type int $user_id The user ID.
+ * @type string $box The type of mailbox to get. Either 'inbox' or 'sentbox'.
+ * Defaults to 'inbox'.
+ * @type string $type The type of messages to get. Either 'all' or 'unread'
+ * or 'read'. Defaults to 'all'.
+ * @type int $limit The number of messages to get. Defaults to null.
+ * @type int $page The page number to get. Defaults to null.
+ * @type string $search_terms The search term to use. Defaults to ''.
+ * @type array $meta_query Meta query arguments. See WP_Meta_Query for more details.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array|bool Array on success. Boolean false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public static function get_current_threads_for_user( $user_id, $box = 'inbox', $type = 'all', $limit = null, $page = null, $search_terms = '' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public static function get_current_threads_for_user( $args = array() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wpdb, $bp;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Backward compatibility with old method of passing arguments
+ if ( ! is_array( $args ) || func_num_args() > 1 ) {
+ _deprecated_argument( __METHOD__, '2.2.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );
+
+ $old_args_keys = array(
+ 0 => 'user_id',
+ 1 => 'box',
+ 2 => 'type',
+ 3 => 'limit',
+ 4 => 'page',
+ 5 => 'search_terms',
+ );
+
+ $func_args = func_get_args();
+ $args = bp_core_parse_args_array( $old_args_keys, $func_args );
+ }
+
+ $defaults = array(
+ 'user_id' => false,
+ 'box' => 'inbox',
+ 'type' => 'all',
+ 'limit' => null,
+ 'page' => null,
+ 'search_terms' => ''
+ );
+ $r = wp_parse_args( $args, $defaults );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $user_id_sql = $pag_sql = $type_sql = $search_sql = '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $limit && $page ) {
- $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $r['limit'] && $r['page'] ) {
+ $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $r['page'] - 1 ) * $r['limit'] ), intval( $r['limit'] ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $type == 'unread' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $r['type'] == 'unread' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $type_sql = " AND r.unread_count != 0 ";
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( $type == 'read' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( $r['type'] == 'read' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $type_sql = " AND r.unread_count = 0 ";
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! empty( $search_terms ) ) {
- $search_terms_like = '%' . bp_esc_like( $search_terms ) . '%';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $r['search_terms'] ) ) {
+ $search_terms_like = '%' . bp_esc_like( $r['search_terms'] ) . '%';
</ins><span class="cx" style="display: block; padding: 0 10px"> $search_sql = $wpdb->prepare( "AND ( subject LIKE %s OR message LIKE %s )", $search_terms_like, $search_terms_like );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'sentbox' == $box ) {
- $user_id_sql = $wpdb->prepare( 'm.sender_id = %d', $user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'sentbox' == $r['box'] ) {
+ $user_id_sql = $wpdb->prepare( 'm.sender_id = %d', $r['user_id'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $thread_ids = $wpdb->get_results( "SELECT m.thread_id, MAX(m.date_sent) AS date_sent FROM {$bp->messages->table_name_recipients} r, {$bp->messages->table_name_messages} m WHERE m.thread_id = r.thread_id AND m.sender_id = r.user_id AND {$user_id_sql} AND r.is_deleted = 0 {$search_sql} GROUP BY m.thread_id ORDER BY date_sent DESC {$pag_sql}" );
</span><span class="cx" style="display: block; padding: 0 10px"> $total_threads = $wpdb->get_var( "SELECT COUNT( DISTINCT m.thread_id ) FROM {$bp->messages->table_name_recipients} r, {$bp->messages->table_name_messages} m WHERE m.thread_id = r.thread_id AND m.sender_id = r.user_id AND {$user_id_sql} AND r.is_deleted = 0 {$search_sql} " );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $user_id_sql = $wpdb->prepare( 'r.user_id = %d', $user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id_sql = $wpdb->prepare( 'r.user_id = %d', $r['user_id'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $thread_ids = $wpdb->get_results( "SELECT m.thread_id, MAX(m.date_sent) AS date_sent FROM {$bp->messages->table_name_recipients} r, {$bp->messages->table_name_messages} m WHERE m.thread_id = r.thread_id AND r.is_deleted = 0 AND {$user_id_sql} AND r.sender_only = 0 {$type_sql} {$search_sql} GROUP BY m.thread_id ORDER BY date_sent DESC {$pag_sql}" );
</span><span class="cx" style="display: block; padding: 0 10px"> $total_threads = $wpdb->get_var( "SELECT COUNT( DISTINCT m.thread_id ) FROM {$bp->messages->table_name_recipients} r, {$bp->messages->table_name_messages} m WHERE m.thread_id = r.thread_id AND r.is_deleted = 0 AND {$user_id_sql} AND r.sender_only = 0 {$type_sql} {$search_sql}" );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcbpmessagesbpmessagestemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-messages/bp-messages-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-messages/bp-messages-template.php 2015-01-06 03:38:23 UTC (rev 9300)
+++ trunk/src/bp-messages/bp-messages-template.php 2015-01-06 03:51:19 UTC (rev 9301)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,34 +114,65 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Constructor method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $user_id ID of the user whose Messages box is being
- * viewed.
- * @param string $box Type of box being viewed ('notices', 'sentbox',
- * 'inbox').
- * @param int $per_page Number of thread to return per page of results.
- * @param int $max Max number of results to return.
- * @param string $type Type of results to return. 'unread', 'read',
- * or 'all'.
- * @param string $search_terms Search terms for limiting results.
- * @param string $page_arg Optional. URL argument for pagination
- * parameter. Default: 'mpage'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args {
+ * Array of arguments. See bp_has_message_threads() for full description.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function __construct( $user_id, $box, $per_page, $max, $type, $search_terms, $page_arg = 'mpage' ) {
- $this->pag_page = isset( $_GET[$page_arg] ) ? intval( $_GET[$page_arg] ) : 1;
- $this->pag_num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : $per_page;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function __construct( $args = array() ) {
+ global $wpdb, $bp;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->user_id = $user_id;
- $this->box = $box;
- $this->type = $type;
- $this->search_terms = $search_terms;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Backward compatibility with old method of passing arguments
+ if ( ! is_array( $args ) || func_num_args() > 1 ) {
+ _deprecated_argument( __METHOD__, '2.2.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $old_args_keys = array(
+ 0 => 'user_id',
+ 1 => 'box',
+ 2 => 'per_page',
+ 3 => 'max',
+ 4 => 'type',
+ 5 => 'search_terms',
+ 6 => 'page_arg'
+ );
+
+ $func_args = func_get_args();
+ $args = bp_core_parse_args_array( $old_args_keys, $func_args );
+ }
+
+ $r = wp_parse_args( $args, array(
+ 'user_id' => bp_loggedin_user_id(),
+ 'box' => 'inbox',
+ 'per_page' => 10,
+ 'max' => false,
+ 'type' => 'all',
+ 'search_terms' => '',
+ 'page_arg' => 'mpage',
+ 'meta_query' => array(),
+ ) );
+
+ $this->pag_page = isset( $_GET[ $r['page_arg'] ] ) ? intval( $_GET[ $r['page_arg'] ] ) : 1;
+ $this->pag_num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : $r['per_page'];
+
+ $this->user_id = $r['user_id'];
+ $this->box = $r['box'];
+ $this->type = $r['type'];
+ $this->search_terms = $r['search_terms'];
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'notices' == $this->box ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->threads = BP_Messages_Notice::get_notices( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'pag_num' => $this->pag_num,
</span><span class="cx" style="display: block; padding: 0 10px"> 'pag_page' => $this->pag_page
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $threads = BP_Messages_Thread::get_current_threads_for_user( $this->user_id, $this->box, $this->type, $this->pag_num, $this->pag_page, $this->search_terms );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $threads = BP_Messages_Thread::get_current_threads_for_user( array(
+ 'user_id' => $this->user_id,
+ 'box' => $this->box,
+ 'type' => $this->type,
+ 'limit' => $this->pag_num,
+ 'page' => $this->pag_page,
+ 'search_terms' => $this->search_terms,
+ 'meta_query' => $r['meta_query'],
+ ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->threads = $threads['threads'];
</span><span class="cx" style="display: block; padding: 0 10px"> $this->total_thread_count = $threads['total'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -153,19 +184,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $total_notice_count = BP_Messages_Notice::get_total_notice_count();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( !$max || $max >= (int) $total_notice_count ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $r['max'] || $r['max'] >= (int) $total_notice_count ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'notices' == $this->box ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->total_thread_count = (int) $total_notice_count;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->total_thread_count = (int) $max;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->total_thread_count = (int) $r['max'];
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $max ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $r['max'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $max >= count( $this->threads ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->thread_count = count( $this->threads );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->thread_count = (int) $max;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->thread_count = (int) $r['max'];
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->thread_count = count( $this->threads );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -174,7 +205,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( (int) $this->total_thread_count && (int) $this->pag_num ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $pag_args = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $page_arg => '%#%',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $r['page_arg'] => '%#%',
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( defined( 'DOING_AJAX' ) && true === (bool) DOING_AJAX ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -382,15 +413,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Load the messages loop global up with messages
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $messages_template = new BP_Messages_Box_Template(
- $r['user_id'],
- $r['box'],
- $r['per_page'],
- $r['max'],
- $r['type'],
- $r['search_terms'],
- $r['page_arg']
- );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $messages_template = new BP_Messages_Box_Template( $r );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters if there are any message threads to display in inbox/sentbox/notices.
</span></span></pre>
</div>
</div>
</body>
</html>