<!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][10531] trunk/src/bp-groups: Fix misnamed file for `BP_Groups_Membership_Requests_Template`.</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/10531">10531</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/10531","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>boonebgorges</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-02-05 06:32:27 +0000 (Fri, 05 Feb 2016)</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'>Fix misnamed file for `BP_Groups_Membership_Requests_Template`.
Introduced in <a href="http://buddypress.trac.wordpress.org/changeset/10520">[10520]</a>.
See <a href="http://buddypress.trac.wordpress.org/ticket/6870">#6870</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpgroupsbpgroupstemplatephp">trunk/src/bp-groups/bp-groups-template.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunksrcbpgroupsclassesclassbpgroupsmembershiprequeststemplatephp">trunk/src/bp-groups/classes/class-bp-groups-membership-requests-template.php</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunksrcbpgroupsclassesclassbpgroupsmembershipsrequeststemplatephp">trunk/src/bp-groups/classes/class-bp-groups-memberships-requests-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpgroupsbpgroupstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/bp-groups-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/bp-groups-template.php 2016-02-05 06:24:29 UTC (rev 10530)
+++ trunk/src/bp-groups/bp-groups-template.php 2016-02-05 06:32:27 UTC (rev 10531)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,7 +12,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> require dirname( __FILE__ ) . '/classes/class-bp-groups-template.php';
</span><span class="cx" style="display: block; padding: 0 10px"> require dirname( __FILE__ ) . '/classes/class-bp-groups-group-members-template.php';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-require dirname( __FILE__ ) . '/classes/class-bp-groups-memberships-requests-template.php';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+require dirname( __FILE__ ) . '/classes/class-bp-groups-membership-requests-template.php';
</ins><span class="cx" style="display: block; padding: 0 10px"> require dirname( __FILE__ ) . '/classes/class-bp-groups-invite-template.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcbpgroupsclassesclassbpgroupsmembershiprequeststemplatephpfromrev10530trunksrcbpgroupsclassesclassbpgroupsmembershipsrequeststemplatephp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: trunk/src/bp-groups/classes/class-bp-groups-membership-requests-template.php (from rev 10530, trunk/src/bp-groups/classes/class-bp-groups-memberships-requests-template.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/classes/class-bp-groups-membership-requests-template.php (rev 0)
+++ trunk/src/bp-groups/classes/class-bp-groups-membership-requests-template.php 2016-02-05 06:32:27 UTC (rev 10531)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,255 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * BuddyPress Groups membership request template loop class.
+ *
+ * @package BuddyPress
+ * @since 1.0.0
+ */
+
+// Exit if accessed directly.
+defined( 'ABSPATH' ) || exit;
+
+/**
+ * Membership request template loop class.
+ *
+ * @since 1.0.0
+ */
+class BP_Groups_Membership_Requests_Template {
+
+ /**
+ * @since 1.0.0
+ * @var int
+ */
+ public $current_request = -1;
+
+ /**
+ * @since 1.0.0
+ * @var int
+ */
+ public $request_count;
+
+ /**
+ * @since 1.0.0
+ * @var array
+ */
+ public $requests;
+
+ /**
+ * @since 1.0.0
+ * @var object
+ */
+ public $request;
+
+ /**
+ * @sine 1.0.0
+ * @var bool
+ */
+ public $in_the_loop;
+
+ /**
+ * @since 1.0.0
+ * @var int
+ */
+ public $pag_page;
+
+ /**
+ * @since 1.0.0
+ * @var int
+ */
+ public $pag_num;
+
+ /**
+ * @since 1.0.0
+ * @var array|string|void
+ */
+ public $pag_links;
+
+ /**
+ * @since 1.0.0
+ * @var int
+ */
+ public $total_request_count;
+
+ /**
+ * Constructor method.
+ *
+ * @since 1.5.0
+ *
+ * @param array $args {
+ * @type int $group_id ID of the group whose membership requests
+ * are being queried. Default: current group id.
+ * @type int $per_page Number of records to return per page of
+ * results. Default: 10.
+ * @type int $page Page of results to show. Default: 1.
+ * @type int $max Max items to return. Default: false (show all)
+ * }
+ */
+ public function __construct( $args = array() ) {
+
+ // Backward compatibility with old method of passing arguments.
+ if ( ! is_array( $args ) || func_num_args() > 1 ) {
+ _deprecated_argument( __METHOD__, '2.0.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 => 'group_id',
+ 1 => 'per_page',
+ 2 => 'max',
+ );
+
+ $func_args = func_get_args();
+ $args = bp_core_parse_args_array( $old_args_keys, $func_args );
+ }
+
+ $r = wp_parse_args( $args, array(
+ 'page' => 1,
+ 'per_page' => 10,
+ 'page_arg' => 'mrpage',
+ 'max' => false,
+ 'type' => 'first_joined',
+ 'group_id' => bp_get_current_group_id(),
+ ) );
+
+ $this->pag_arg = sanitize_key( $r['page_arg'] );
+ $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page'] );
+ $this->pag_num = bp_sanitize_pagination_arg( 'num', $r['per_page'] );
+
+ $mquery = new BP_Group_Member_Query( array(
+ 'group_id' => $r['group_id'],
+ 'type' => $r['type'],
+ 'per_page' => $this->pag_num,
+ 'page' => $this->pag_page,
+
+ // These filters ensure we only get pending requests.
+ 'is_confirmed' => false,
+ 'inviter_id' => 0,
+ ) );
+
+ $this->requests = array_values( $mquery->results );
+ $this->request_count = count( $this->requests );
+
+ // Compatibility with legacy format of request data objects.
+ foreach ( $this->requests as $rk => $rv ) {
+ // For legacy reasons, the 'id' property of each
+ // request must match the membership id, not the ID of
+ // the user (as it's returned by BP_Group_Member_Query).
+ $this->requests[ $rk ]->user_id = $rv->ID;
+ $this->requests[ $rk ]->id = $rv->membership_id;
+
+ // Miscellaneous values.
+ $this->requests[ $rk ]->group_id = $r['group_id'];
+ }
+
+ if ( empty( $r['max'] ) || ( $r['max'] >= (int) $mquery->total_users ) ) {
+ $this->total_request_count = (int) $mquery->total_users;
+ } else {
+ $this->total_request_count = (int) $r['max'];
+ }
+
+ if ( empty( $r['max'] ) || ( $r['max'] >= count( $this->requests ) ) ) {
+ $this->request_count = count( $this->requests );
+ } else {
+ $this->request_count = (int) $r['max'];
+ }
+
+ $this->pag_links = paginate_links( array(
+ 'base' => add_query_arg( $this->pag_arg, '%#%' ),
+ 'format' => '',
+ 'total' => ceil( $this->total_request_count / $this->pag_num ),
+ 'current' => $this->pag_page,
+ 'prev_text' => '←',
+ 'next_text' => '→',
+ 'mid_size' => 1,
+ 'add_args' => array(),
+ ) );
+ }
+
+ /**
+ * Whether or not there are requests to show.
+ *
+ * @since 1.0.0
+ *
+ * @return bool
+ */
+ public function has_requests() {
+ if ( ! empty( $this->request_count ) ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Moves up to the next request.
+ *
+ * @since 1.0.0
+ *
+ * @return object
+ */
+ public function next_request() {
+ $this->current_request++;
+ $this->request = $this->requests[ $this->current_request ];
+
+ return $this->request;
+ }
+
+ /**
+ * Rewinds the requests to the first in the list.
+ *
+ * @since 1.0.0
+ */
+ public function rewind_requests() {
+ $this->current_request = -1;
+
+ if ( $this->request_count > 0 ) {
+ $this->request = $this->requests[0];
+ }
+ }
+
+ /**
+ * Finishes up the requests to display.
+ *
+ * @since 1.0.0
+ *
+ * @return bool
+ */
+ public function requests() {
+ $tick = intval( $this->current_request + 1 );
+ if ( $tick < $this->request_count ) {
+ return true;
+ } elseif ( $tick == $this->request_count ) {
+
+ /**
+ * Fires right before the rewinding of group membership requests list.
+ *
+ * @since 1.5.0
+ */
+ do_action( 'group_request_loop_end' );
+ // Do some cleaning up after the loop.
+ $this->rewind_requests();
+ }
+
+ $this->in_the_loop = false;
+ return false;
+ }
+
+ /**
+ * Sets up the request to display.
+ *
+ * @since 1.0.0
+ */
+ public function the_request() {
+ $this->in_the_loop = true;
+ $this->request = $this->next_request();
+
+ // Loop has just started.
+ if ( 0 == $this->current_request ) {
+
+ /**
+ * Fires if the current group membership request item is the first in the loop.
+ *
+ * @since 1.1.0
+ */
+ do_action( 'group_request_loop_start' );
+ }
+ }
+}
</ins></span></pre></div>
<a id="trunksrcbpgroupsclassesclassbpgroupsmembershipsrequeststemplatephp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/src/bp-groups/classes/class-bp-groups-memberships-requests-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/classes/class-bp-groups-memberships-requests-template.php 2016-02-05 06:24:29 UTC (rev 10530)
+++ trunk/src/bp-groups/classes/class-bp-groups-memberships-requests-template.php 2016-02-05 06:32:27 UTC (rev 10531)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,255 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-/**
- * BuddyPress Groups membership request template loop class.
- *
- * @package BuddyPress
- * @since 1.0.0
- */
-
-// Exit if accessed directly.
-defined( 'ABSPATH' ) || exit;
-
-/**
- * Membership request template loop class.
- *
- * @since 1.0.0
- */
-class BP_Groups_Membership_Requests_Template {
-
- /**
- * @since 1.0.0
- * @var int
- */
- public $current_request = -1;
-
- /**
- * @since 1.0.0
- * @var int
- */
- public $request_count;
-
- /**
- * @since 1.0.0
- * @var array
- */
- public $requests;
-
- /**
- * @since 1.0.0
- * @var object
- */
- public $request;
-
- /**
- * @sine 1.0.0
- * @var bool
- */
- public $in_the_loop;
-
- /**
- * @since 1.0.0
- * @var int
- */
- public $pag_page;
-
- /**
- * @since 1.0.0
- * @var int
- */
- public $pag_num;
-
- /**
- * @since 1.0.0
- * @var array|string|void
- */
- public $pag_links;
-
- /**
- * @since 1.0.0
- * @var int
- */
- public $total_request_count;
-
- /**
- * Constructor method.
- *
- * @since 1.5.0
- *
- * @param array $args {
- * @type int $group_id ID of the group whose membership requests
- * are being queried. Default: current group id.
- * @type int $per_page Number of records to return per page of
- * results. Default: 10.
- * @type int $page Page of results to show. Default: 1.
- * @type int $max Max items to return. Default: false (show all)
- * }
- */
- public function __construct( $args = array() ) {
-
- // Backward compatibility with old method of passing arguments.
- if ( ! is_array( $args ) || func_num_args() > 1 ) {
- _deprecated_argument( __METHOD__, '2.0.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 => 'group_id',
- 1 => 'per_page',
- 2 => 'max',
- );
-
- $func_args = func_get_args();
- $args = bp_core_parse_args_array( $old_args_keys, $func_args );
- }
-
- $r = wp_parse_args( $args, array(
- 'page' => 1,
- 'per_page' => 10,
- 'page_arg' => 'mrpage',
- 'max' => false,
- 'type' => 'first_joined',
- 'group_id' => bp_get_current_group_id(),
- ) );
-
- $this->pag_arg = sanitize_key( $r['page_arg'] );
- $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page'] );
- $this->pag_num = bp_sanitize_pagination_arg( 'num', $r['per_page'] );
-
- $mquery = new BP_Group_Member_Query( array(
- 'group_id' => $r['group_id'],
- 'type' => $r['type'],
- 'per_page' => $this->pag_num,
- 'page' => $this->pag_page,
-
- // These filters ensure we only get pending requests.
- 'is_confirmed' => false,
- 'inviter_id' => 0,
- ) );
-
- $this->requests = array_values( $mquery->results );
- $this->request_count = count( $this->requests );
-
- // Compatibility with legacy format of request data objects.
- foreach ( $this->requests as $rk => $rv ) {
- // For legacy reasons, the 'id' property of each
- // request must match the membership id, not the ID of
- // the user (as it's returned by BP_Group_Member_Query).
- $this->requests[ $rk ]->user_id = $rv->ID;
- $this->requests[ $rk ]->id = $rv->membership_id;
-
- // Miscellaneous values.
- $this->requests[ $rk ]->group_id = $r['group_id'];
- }
-
- if ( empty( $r['max'] ) || ( $r['max'] >= (int) $mquery->total_users ) ) {
- $this->total_request_count = (int) $mquery->total_users;
- } else {
- $this->total_request_count = (int) $r['max'];
- }
-
- if ( empty( $r['max'] ) || ( $r['max'] >= count( $this->requests ) ) ) {
- $this->request_count = count( $this->requests );
- } else {
- $this->request_count = (int) $r['max'];
- }
-
- $this->pag_links = paginate_links( array(
- 'base' => add_query_arg( $this->pag_arg, '%#%' ),
- 'format' => '',
- 'total' => ceil( $this->total_request_count / $this->pag_num ),
- 'current' => $this->pag_page,
- 'prev_text' => '←',
- 'next_text' => '→',
- 'mid_size' => 1,
- 'add_args' => array(),
- ) );
- }
-
- /**
- * Whether or not there are requests to show.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function has_requests() {
- if ( ! empty( $this->request_count ) ) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Moves up to the next request.
- *
- * @since 1.0.0
- *
- * @return object
- */
- public function next_request() {
- $this->current_request++;
- $this->request = $this->requests[ $this->current_request ];
-
- return $this->request;
- }
-
- /**
- * Rewinds the requests to the first in the list.
- *
- * @since 1.0.0
- */
- public function rewind_requests() {
- $this->current_request = -1;
-
- if ( $this->request_count > 0 ) {
- $this->request = $this->requests[0];
- }
- }
-
- /**
- * Finishes up the requests to display.
- *
- * @since 1.0.0
- *
- * @return bool
- */
- public function requests() {
- $tick = intval( $this->current_request + 1 );
- if ( $tick < $this->request_count ) {
- return true;
- } elseif ( $tick == $this->request_count ) {
-
- /**
- * Fires right before the rewinding of group membership requests list.
- *
- * @since 1.5.0
- */
- do_action( 'group_request_loop_end' );
- // Do some cleaning up after the loop.
- $this->rewind_requests();
- }
-
- $this->in_the_loop = false;
- return false;
- }
-
- /**
- * Sets up the request to display.
- *
- * @since 1.0.0
- */
- public function the_request() {
- $this->in_the_loop = true;
- $this->request = $this->next_request();
-
- // Loop has just started.
- if ( 0 == $this->current_request ) {
-
- /**
- * Fires if the current group membership request item is the first in the loop.
- *
- * @since 1.1.0
- */
- do_action( 'group_request_loop_start' );
- }
- }
-}
</del></span></pre>
</div>
</div>
</body>
</html>