<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[BuddyPress] [2975] branches/1.2: Fixes #2251</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2975</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2010-04-29 03:50:17 +0000 (Thu, 29 Apr 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixes #2251</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches12bpactivitybpactivitytemplatetagsphp">branches/1.2/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#branches12bpblogsbpblogstemplatetagsphp">branches/1.2/bp-blogs/bp-blogs-templatetags.php</a></li>
<li><a href="#branches12bpcorebpcoretemplatetagsphp">branches/1.2/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#branches12bpforumsbpforumstemplatetagsphp">branches/1.2/bp-forums/bp-forums-templatetags.php</a></li>
<li><a href="#branches12bpgroupsbpgroupstemplatetagsphp">branches/1.2/bp-groups/bp-groups-templatetags.php</a></li>
<li><a href="#branches12bpmessagesbpmessagestemplatetagsphp">branches/1.2/bp-messages/bp-messages-templatetags.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches12bpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-activity/bp-activity-templatetags.php (2974 => 2975)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-activity/bp-activity-templatetags.php        2010-04-28 23:47:16 UTC (rev 2974)
+++ branches/1.2/bp-activity/bp-activity-templatetags.php        2010-04-29 03:50:17 UTC (rev 2975)
</span><span class="lines">@@ -265,11 +265,12 @@
</span><span class="cx">         function bp_get_activity_pagination_count() {
</span><span class="cx">                 global $bp, $activities_template;
</span><span class="cx"> 
</span><del>-                $from_num = bp_core_number_format( intval( ( $activities_template-&gt;pag_page - 1 ) * $activities_template-&gt;pag_num ) + 1 );
-                $to_num = bp_core_number_format( ( $from_num + ( $activities_template-&gt;pag_num - 1 ) &gt; $activities_template-&gt;total_activity_count ) ? $activities_template-&gt;total_activity_count : $from_num + ( $activities_template-&gt;pag_num - 1 ) );
</del><ins>+                $start_num = intval( ( $activities_template-&gt;pag_page - 1 ) * $activities_template-&gt;pag_num ) + 1;
+                $from_num = bp_core_number_format( $start_num );
+                $to_num = bp_core_number_format( ( $start_num + ( $activities_template-&gt;pag_num - 1 ) &gt; $activities_template-&gt;total_activity_count ) ? $activities_template-&gt;total_activity_count : $start_num + ( $activities_template-&gt;pag_num - 1 ) );
</ins><span class="cx">                 $total = bp_core_number_format( $activities_template-&gt;total_activity_count );
</span><span class="cx"> 
</span><del>-                return sprintf( __( 'Viewing item %s to %s (of %s items)', 'buddypress' ), $from_num, $to_num, $total ) . ' &amp;nbsp; &lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;';
</del><ins>+                return sprintf( __( 'Viewing item %1$s to %2$s (of %3$s items)', 'buddypress' ), $from_num, $to_num, $total ) . ' &amp;nbsp; &lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;';
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> function bp_activity_pagination_links() {
</span></span></pre></div>
<a id="branches12bpblogsbpblogstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-blogs/bp-blogs-templatetags.php (2974 => 2975)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-blogs/bp-blogs-templatetags.php        2010-04-28 23:47:16 UTC (rev 2974)
+++ branches/1.2/bp-blogs/bp-blogs-templatetags.php        2010-04-29 03:50:17 UTC (rev 2975)
</span><span class="lines">@@ -162,11 +162,12 @@
</span><span class="cx"> function bp_blogs_pagination_count() {
</span><span class="cx">         global $bp, $blogs_template;
</span><span class="cx"> 
</span><del>-        $from_num = bp_core_number_format( intval( ( $blogs_template-&gt;pag_page - 1 ) * $blogs_template-&gt;pag_num ) + 1 );
-        $to_num = bp_core_number_format( ( $from_num + ( $blogs_template-&gt;pag_num - 1 ) &gt; $blogs_template-&gt;total_blog_count ) ? $blogs_template-&gt;total_blog_count : $from_num + ( $blogs_template-&gt;pag_num - 1 ) );
</del><ins>+        $start_num = intval( ( $blogs_template-&gt;pag_page - 1 ) * $blogs_template-&gt;pag_num ) + 1;
+        $from_num = bp_core_number_format( $start_num );
+        $to_num = bp_core_number_format( ( $start_num + ( $blogs_template-&gt;pag_num - 1 ) &gt; $blogs_template-&gt;total_blog_count ) ? $blogs_template-&gt;total_blog_count : $start_num + ( $blogs_template-&gt;pag_num - 1 ) );
</ins><span class="cx">         $total = bp_core_number_format( $blogs_template-&gt;total_blog_count );
</span><span class="cx"> 
</span><del>-        echo sprintf( __( 'Viewing blog %s to %s (of %s blogs)', 'buddypress' ), $from_num, $to_num, $total ); ?&gt; &amp;nbsp;
</del><ins>+        echo sprintf( __( 'Viewing blog %1$s to %2$s (of %3$s blogs)', 'buddypress' ), $from_num, $to_num, $total ); ?&gt; &amp;nbsp;
</ins><span class="cx">         &lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;&lt;?php
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branches12bpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-core/bp-core-templatetags.php (2974 => 2975)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-core/bp-core-templatetags.php        2010-04-28 23:47:16 UTC (rev 2974)
+++ branches/1.2/bp-core/bp-core-templatetags.php        2010-04-29 03:50:17 UTC (rev 2975)
</span><span class="lines">@@ -175,18 +175,19 @@
</span><span class="cx"> function bp_members_pagination_count() {
</span><span class="cx">         global $bp, $members_template;
</span><span class="cx"> 
</span><del>-        $from_num = bp_core_number_format( intval( ( $members_template-&gt;pag_page - 1 ) * $members_template-&gt;pag_num ) + 1 );
-        $to_num = bp_core_number_format( ( $from_num + ( $members_template-&gt;pag_num - 1 ) &gt; $members_template-&gt;total_member_count ) ? $members_template-&gt;total_member_count : $from_num + ( $members_template-&gt;pag_num - 1) );
</del><ins>+        $start_num = intval( ( $members_template-&gt;pag_page - 1 ) * $members_template-&gt;pag_num ) + 1;
+        $from_num = bp_core_number_format( $start_num );
+        $to_num = bp_core_number_format( ( $start_num + ( $members_template-&gt;pag_num - 1 ) &gt; $members_template-&gt;total_member_count ) ? $members_template-&gt;total_member_count : $start_num + ( $members_template-&gt;pag_num - 1 ) );
</ins><span class="cx">         $total = bp_core_number_format( $members_template-&gt;total_member_count );
</span><span class="cx"> 
</span><span class="cx">         if ( 'active' == $members_template-&gt;type )
</span><del>-                echo sprintf( __( 'Viewing member %s to %s (of %s active members)', 'buddypress' ), $from_num, $to_num, $total );
</del><ins>+                echo sprintf( __( 'Viewing member %1$s to %2$s (of %3$s active members)', 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx">         else if ( 'popular' == $members_template-&gt;type )
</span><del>-                echo sprintf( __( 'Viewing member %s to %s (of %s members with friends)', 'buddypress' ), $from_num, $to_num, $total );
</del><ins>+                echo sprintf( __( 'Viewing member %1$s to %2$s (of %3$s members with friends)', 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx">         else if ( 'online' == $members_template-&gt;type )
</span><del>-                echo sprintf( __( 'Viewing member %s to %s (of %s members online)', 'buddypress' ), $from_num, $to_num, $total );
</del><ins>+                echo sprintf( __( 'Viewing member %1$s to %2$s (of %3$s members online)', 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx">         else
</span><del>-                echo sprintf( __( 'Viewing member %s to %s (of %s members)', 'buddypress' ), $from_num, $to_num, $total );
</del><ins>+                echo sprintf( __( 'Viewing member %1$s to %2$s (of %3$s members)', 'buddypress' ), $from_num, $to_num, $total );
</ins><span class="cx"> 
</span><span class="cx">         ?&gt;&lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;&lt;?php
</span><span class="cx"> }
</span></span></pre></div>
<a id="branches12bpforumsbpforumstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-forums/bp-forums-templatetags.php (2974 => 2975)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-forums/bp-forums-templatetags.php        2010-04-28 23:47:16 UTC (rev 2974)
+++ branches/1.2/bp-forums/bp-forums-templatetags.php        2010-04-29 03:50:17 UTC (rev 2975)
</span><span class="lines">@@ -666,15 +666,16 @@
</span><span class="cx"> function bp_forum_pagination_count() {
</span><span class="cx">         global $bp, $forum_template;
</span><span class="cx"> 
</span><del>-        $from_num = bp_core_number_format( intval( ( $forum_template-&gt;pag_page - 1 ) * $forum_template-&gt;pag_num ) + 1 );
-        $to_num = bp_core_number_format( ( $from_num + ( $forum_template-&gt;pag_num - 1  ) &gt; $forum_template-&gt;total_topic_count ) ? $forum_template-&gt;total_topic_count : $from_num + ( $forum_template-&gt;pag_num - 1 ) );
</del><ins>+        $start_num = intval( ( $forum_template-&gt;pag_page - 1 ) * $forum_template-&gt;pag_num ) + 1;
+        $from_num = bp_core_number_format( $start_num );
+        $to_num = bp_core_number_format( ( $start_num + ( $forum_template-&gt;pag_num - 1  ) &gt; $forum_template-&gt;total_topic_count ) ? $forum_template-&gt;total_topic_count : $start_num + ( $forum_template-&gt;pag_num - 1 ) );
</ins><span class="cx">         $total = bp_core_number_format( $forum_template-&gt;total_topic_count );
</span><span class="cx"> 
</span><span class="cx">         $pag_filter = false;
</span><span class="cx">         if ( 'tags' == $forum_template-&gt;type &amp;&amp; !empty( $forum_template-&gt;search_terms ) )
</span><span class="cx">                 $pag_filter = sprintf( __( ' matching tag &quot;%s&quot;', 'buddypress' ), $forum_template-&gt;search_terms );
</span><span class="cx"> 
</span><del>-        echo apply_filters( 'bp_forum_pagination_count', sprintf( __( 'Viewing topic %s to %s (%s total topics%s)', 'buddypress' ), $from_num, $to_num, $total, $pag_filter ) );
</del><ins>+        echo apply_filters( 'bp_forum_pagination_count', sprintf( __( 'Viewing topic %1$s to %2$s (%3$s total topics%4$s)', 'buddypress' ), $from_num, $to_num, $total, $pag_filter ) );
</ins><span class="cx"> ?&gt;
</span><span class="cx"> &lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;
</span><span class="cx"> &lt;?php
</span><span class="lines">@@ -984,10 +985,12 @@
</span><span class="cx"> function bp_the_topic_pagination_count() {
</span><span class="cx">         global $bp, $topic_template;
</span><span class="cx"> 
</span><del>-        $from_num = intval( ( $topic_template-&gt;pag_page - 1 ) * $topic_template-&gt;pag_num ) + 1;
-        $to_num = ( $from_num + ( $topic_template-&gt;pag_num - 1  ) &gt; $topic_template-&gt;total_post_count ) ? $topic_template-&gt;total_post_count : $from_num + ( $topic_template-&gt;pag_num - 1 );
</del><ins>+        $start_num = intval( ( $topic_template-&gt;pag_page - 1 ) * $topic_template-&gt;pag_num ) + 1;
+        $from_num = bp_core_number_format( $start_num );
+        $to_num = bp_core_number_format( ( $start_num + ( $topic_template-&gt;pag_num - 1  ) &gt; $topic_template-&gt;total_post_count ) ? $topic_template-&gt;total_post_count : $start_num + ( $topic_template-&gt;pag_num - 1 ) );
+        $total = bp_core_number_format( $topic_template-&gt;total_post_count );
</ins><span class="cx"> 
</span><del>-        echo apply_filters( 'bp_the_topic_pagination_count', sprintf( __( 'Viewing post %d to %d (%d total posts)', 'buddypress' ), $from_num, $to_num, $topic_template-&gt;total_post_count ) );
</del><ins>+        echo apply_filters( 'bp_the_topic_pagination_count', sprintf( __( 'Viewing post %1$s to %2$s (%3$s total posts)', 'buddypress' ), $from_num, $to_num, $total ) );
</ins><span class="cx"> ?&gt;
</span><span class="cx">         &lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;
</span><span class="cx"> &lt;?php
</span></span></pre></div>
<a id="branches12bpgroupsbpgroupstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-groups/bp-groups-templatetags.php (2974 => 2975)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-groups/bp-groups-templatetags.php        2010-04-28 23:47:16 UTC (rev 2974)
+++ branches/1.2/bp-groups/bp-groups-templatetags.php        2010-04-29 03:50:17 UTC (rev 2975)
</span><span class="lines">@@ -551,11 +551,12 @@
</span><span class="cx"> function bp_groups_pagination_count() {
</span><span class="cx">         global $bp, $groups_template;
</span><span class="cx"> 
</span><del>-        $from_num = bp_core_number_format( intval( ( $groups_template-&gt;pag_page - 1 ) * $groups_template-&gt;pag_num ) + 1 );
-        $to_num = bp_core_number_format( ( $from_num + ( $groups_template-&gt;pag_num - 1 ) &gt; $groups_template-&gt;total_group_count ) ? $groups_template-&gt;total_group_count : $from_num + ( $groups_template-&gt;pag_num - 1 ) );
</del><ins>+        $start_num = intval( ( $groups_template-&gt;pag_page - 1 ) * $groups_template-&gt;pag_num ) + 1;
+        $from_num = bp_core_number_format( $start_num );
+        $to_num = bp_core_number_format( ( $start_num + ( $groups_template-&gt;pag_num - 1 ) &gt; $groups_template-&gt;total_group_count ) ? $groups_template-&gt;total_group_count : $start_num + ( $groups_template-&gt;pag_num - 1 ) );
</ins><span class="cx">         $total = bp_core_number_format( $groups_template-&gt;total_group_count );
</span><span class="cx"> 
</span><del>-        echo sprintf( __( 'Viewing group %s to %s (of %s groups)', 'buddypress' ), $from_num, $to_num, $total ); ?&gt; &amp;nbsp;
</del><ins>+        echo sprintf( __( 'Viewing group %1$s to %2$s (of %3$s groups)', 'buddypress' ), $from_num, $to_num, $total ); ?&gt; &amp;nbsp;
</ins><span class="cx">         &lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;&lt;?php
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1403,11 +1404,12 @@
</span><span class="cx">         function bp_get_group_member_pagination_count() {
</span><span class="cx">                 global $members_template;
</span><span class="cx"> 
</span><del>-                $from_num = bp_core_number_format( intval( ( $members_template-&gt;pag_page - 1 ) * $members_template-&gt;pag_num ) + 1 );
-                $to_num = bp_core_number_format( ( $from_num + ( $members_template-&gt;pag_num - 1 ) &gt; $members_template-&gt;total_member_count ) ? $members_template-&gt;total_member_count : $from_num + ( $members_template-&gt;pag_num - 1 ) );
</del><ins>+                $start_num = intval( ( $members_template-&gt;pag_page - 1 ) * $members_template-&gt;pag_num ) + 1;
+                $from_num = bp_core_number_format( $start_num );
+                $to_num = bp_core_number_format( ( $start_num + ( $members_template-&gt;pag_num - 1 ) &gt; $members_template-&gt;total_member_count ) ? $members_template-&gt;total_member_count : $start_num + ( $members_template-&gt;pag_num - 1 ) );
</ins><span class="cx">                 $total = bp_core_number_format( $members_template-&gt;total_member_count );
</span><span class="cx"> 
</span><del>-                return apply_filters( 'bp_get_group_member_pagination_count', sprintf( __( 'Viewing members %s to %s (of %s members)', 'buddypress' ), $from_num, $to_num, $total ) );
</del><ins>+                return apply_filters( 'bp_get_group_member_pagination_count', sprintf( __( 'Viewing members %1$s to %2$s (of %3$s members)', 'buddypress' ), $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="branches12bpmessagesbpmessagestemplatetagsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-messages/bp-messages-templatetags.php (2974 => 2975)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-messages/bp-messages-templatetags.php        2010-04-28 23:47:16 UTC (rev 2974)
+++ branches/1.2/bp-messages/bp-messages-templatetags.php        2010-04-29 03:50:17 UTC (rev 2975)
</span><span class="lines">@@ -308,11 +308,12 @@
</span><span class="cx"> function bp_messages_pagination_count() {
</span><span class="cx">         global $messages_template;
</span><span class="cx"> 
</span><del>-        $from_num = bp_core_number_format( intval( ( $messages_template-&gt;pag_page - 1 ) * $messages_template-&gt;pag_num ) + 1 );
-        $to_num = bp_core_number_format( ( $from_num + ( $messages_template-&gt;pag_num - 1 ) &gt; $messages_template-&gt;total_thread_count ) ? $messages_template-&gt;total_thread_count : $from_num + ( $messages_template-&gt;pag_num - 1 ) );
</del><ins>+        $start_num = intval( ( $messages_template-&gt;pag_page - 1 ) * $messages_template-&gt;pag_num ) + 1;
+        $from_num = bp_core_number_format( $start_num );
+        $to_num = bp_core_number_format( ( $start_num + ( $messages_template-&gt;pag_num - 1 ) &gt; $messages_template-&gt;total_thread_count ) ? $messages_template-&gt;total_thread_count : $start_num + ( $messages_template-&gt;pag_num - 1 ) );
</ins><span class="cx">         $total = bp_core_number_format( $messages_template-&gt;total_thread_count );
</span><span class="cx"> 
</span><del>-        echo sprintf( __( 'Viewing message %s to %s (of %s messages)', 'buddypress' ), $from_num, $to_num, $total ); ?&gt; &amp;nbsp;
</del><ins>+        echo sprintf( __( 'Viewing message %1$s to %2$s (of %3$s messages)', 'buddypress' ), $from_num, $to_num, $total ); ?&gt; &amp;nbsp;
</ins><span class="cx">         &lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;&lt;?php
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>