<!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][7513] trunk: Don't double number-format directory pagination counts</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">
<dt>Revision</dt> <dd><a href="http://buddypress.trac.wordpress.org/changeset/7513">7513</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2013-11-05 14:04:59 +0000 (Tue, 05 Nov 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Don't double number-format directory pagination counts
By running total item counts through number_format_i18n() twice, certain
number formats were getting messed up.
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/5228">#5228</a>
Props sgr33n</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivitytemplatephp">trunk/bp-activity/bp-activity-template.php</a></li>
<li><a href="#trunkbpblogsbpblogstemplatephp">trunk/bp-blogs/bp-blogs-template.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatephp">trunk/bp-forums/bp-forums-template.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatephp">trunk/bp-groups/bp-groups-template.php</a></li>
<li><a href="#trunkbpmembersbpmemberstemplatephp">trunk/bp-members/bp-members-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivitytemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-template.php (7512 => 7513)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-template.php 2013-11-04 04:33:02 UTC (rev 7512)
+++ trunk/bp-activity/bp-activity-template.php 2013-11-05 14:04:59 UTC (rev 7513)
</span><span class="lines">@@ -691,7 +691,7 @@
</span><span class="cx"> $to_num = bp_core_number_format( ( $start_num + ( $activities_template->pag_num - 1 ) > $activities_template->total_activity_count ) ? $activities_template->total_activity_count : $start_num + ( $activities_template->pag_num - 1 ) );
</span><span class="cx"> $total = bp_core_number_format( $activities_template->total_activity_count );
</span><span class="cx">
</span><del>- return sprintf( _n( 'Viewing item %1$s to %2$s (of %3$s item)', 'Viewing item %1$s to %2$s (of %3$s items)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
</del><ins>+ return sprintf( _n( 'Viewing item %1$s to %2$s (of %3$s item)', 'Viewing item %1$s to %2$s (of %3$s items)', $total, 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkbpblogsbpblogstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-template.php (7512 => 7513)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-template.php 2013-11-04 04:33:02 UTC (rev 7512)
+++ trunk/bp-blogs/bp-blogs-template.php 2013-11-05 14:04:59 UTC (rev 7513)
</span><span class="lines">@@ -420,7 +420,7 @@
</span><span class="cx"> $to_num = bp_core_number_format( ( $start_num + ( $blogs_template->pag_num - 1 ) > $blogs_template->total_blog_count ) ? $blogs_template->total_blog_count : $start_num + ( $blogs_template->pag_num - 1 ) );
</span><span class="cx"> $total = bp_core_number_format( $blogs_template->total_blog_count );
</span><span class="cx">
</span><del>- echo sprintf( _n( 'Viewing site %1$s to %2$s (of %3$s site)', 'Viewing site %1$s to %2$s (of %3$s sites)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
</del><ins>+ echo sprintf( _n( 'Viewing site %1$s to %2$s (of %3$s site)', 'Viewing site %1$s to %2$s (of %3$s sites)', $total, 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-template.php (7512 => 7513)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-template.php 2013-11-04 04:33:02 UTC (rev 7512)
+++ trunk/bp-forums/bp-forums-template.php 2013-11-05 14:04:59 UTC (rev 7513)
</span><span class="lines">@@ -965,7 +965,7 @@
</span><span class="cx"> if ( 'tags' == $forum_template->type && !empty( $forum_template->search_terms ) )
</span><span class="cx"> $pag_filter = sprintf( __( ' matching tag "%s"', 'buddypress' ), $forum_template->search_terms );
</span><span class="cx">
</span><del>- return apply_filters( 'bp_get_forum_pagination_count', sprintf( _n( 'Viewing topic %s to %s (of %d topic%s)', 'Viewing topic %s to %s (of %d total topics%s)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ), $pag_filter ), $from_num, $to_num, $total );
</del><ins>+ return apply_filters( 'bp_get_forum_pagination_count', sprintf( _n( 'Viewing topic %s to %s (of %d topic%s)', 'Viewing topic %s to %s (of %d total topics%s)', $total, 'buddypress' ), $from_num, $to_num, $total, $pag_filter ), $from_num, $to_num, $total );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_edit_topic() {
</span><span class="lines">@@ -1305,7 +1305,7 @@
</span><span class="cx"> $to_num = bp_core_number_format( ( $start_num + ( $topic_template->pag_num - 1 ) > $topic_template->total_post_count ) ? $topic_template->total_post_count : $start_num + ( $topic_template->pag_num - 1 ) );
</span><span class="cx"> $total = bp_core_number_format( $topic_template->total_post_count );
</span><span class="cx">
</span><del>- echo apply_filters( 'bp_the_topic_pagination_count', sprintf( _n( 'Viewing post %1$s to %2$s (%3$s post)', 'Viewing post %1$s to %2$s (%3$s total posts)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) ), $from_num, $to_num, $total );
</del><ins>+ echo apply_filters( 'bp_the_topic_pagination_count', sprintf( _n( 'Viewing post %1$s to %2$s (%3$s post)', 'Viewing post %1$s to %2$s (%3$s total posts)', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_is_last_page() {
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-template.php (7512 => 7513)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-template.php 2013-11-04 04:33:02 UTC (rev 7512)
+++ trunk/bp-groups/bp-groups-template.php 2013-11-05 14:04:59 UTC (rev 7513)
</span><span class="lines">@@ -929,7 +929,7 @@
</span><span class="cx"> $to_num = bp_core_number_format( ( $start_num + ( $groups_template->pag_num - 1 ) > $groups_template->total_group_count ) ? $groups_template->total_group_count : $start_num + ( $groups_template->pag_num - 1 ) );
</span><span class="cx"> $total = bp_core_number_format( $groups_template->total_group_count );
</span><span class="cx">
</span><del>- return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing group %1$s to %2$s (of %3$s group)', 'Viewing group %1$s to %2$s (of %3$s groups)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) ), $from_num, $to_num, $total );
</del><ins>+ return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing group %1$s to %2$s (of %3$s group)', 'Viewing group %1$s to %2$s (of %3$s groups)', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_groups_auto_join() {
</span><span class="lines">@@ -2168,7 +2168,7 @@
</span><span class="cx"> $to_num = bp_core_number_format( ( $start_num + ( $members_template->pag_num - 1 ) > $members_template->total_member_count ) ? $members_template->total_member_count : $start_num + ( $members_template->pag_num - 1 ) );
</span><span class="cx"> $total = bp_core_number_format( $members_template->total_member_count );
</span><span class="cx">
</span><del>- return apply_filters( 'bp_get_group_member_pagination_count', sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member)', 'Viewing members %1$s to %2$s (of %3$s members)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) ), $from_num, $to_num, $total );
</del><ins>+ return apply_filters( 'bp_get_group_member_pagination_count', sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member)', 'Viewing members %1$s to %2$s (of %3$s members)', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_group_member_admin_pagination() {
</span></span></pre></div>
<a id="trunkbpmembersbpmemberstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-template.php (7512 => 7513)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-template.php 2013-11-04 04:33:02 UTC (rev 7512)
+++ trunk/bp-members/bp-members-template.php 2013-11-05 14:04:59 UTC (rev 7513)
</span><span class="lines">@@ -344,13 +344,13 @@
</span><span class="cx"> $total = bp_core_number_format( $members_template->total_member_count );
</span><span class="cx">
</span><span class="cx"> if ( 'active' == $members_template->type )
</span><del>- $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s active member)', 'Viewing member %1$s to %2$s (of %3$s active members)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
</del><ins>+ $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s active member)', 'Viewing member %1$s to %2$s (of %3$s active members)', $total, 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx"> else if ( 'popular' == $members_template->type )
</span><del>- $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member with friends)', 'Viewing member %1$s to %2$s (of %3$s members with friends)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
</del><ins>+ $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member with friends)', 'Viewing member %1$s to %2$s (of %3$s members with friends)', $total, 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx"> else if ( 'online' == $members_template->type )
</span><del>- $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member online)', 'Viewing member %1$s to %2$s (of %3$s members online)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
</del><ins>+ $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member online)', 'Viewing member %1$s to %2$s (of %3$s members online)', $total, 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx"> else
</span><del>- $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member)', 'Viewing member %1$s to %2$s (of %3$s members)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
</del><ins>+ $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member)', 'Viewing member %1$s to %2$s (of %3$s members)', $total, 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx">
</span><span class="cx"> return apply_filters( 'bp_members_pagination_count', $pag );
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>