Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/19/2012 07:42:49 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Number Formatting:

  • Introduce $integer parameter to template-tags to switch filter for integer usage.
  • Use absint() where appropriate when getting counts.
  • Smarter int type casting.
  • Fixes bug where calculations were being done against formatted strings.
  • Fixes #1974.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bbp-includes/forums/functions.php

    r4249 r4258  
    955955    // Get some counts
    956956    $forum_id          = bbp_get_forum_id( $forum_id );
    957     $topic_count       = bbp_get_forum_topic_count( $forum_id, false );
    958     $total_topic_count = bbp_get_forum_topic_count( $forum_id, true  );
     957    $topic_count       = bbp_get_forum_topic_count( $forum_id, false, false );
     958    $total_topic_count = bbp_get_forum_topic_count( $forum_id, true,  false );
    959959
    960960    // Update this forum id
     
    974974
    975975                // Get forum counts
    976                 $parent_topic_count       = bbp_get_forum_topic_count( $parent_forum_id, false );
    977                 $parent_total_topic_count = bbp_get_forum_topic_count( $parent_forum_id, true  );
     976                $parent_topic_count       = bbp_get_forum_topic_count( $parent_forum_id, false, false );
     977                $parent_total_topic_count = bbp_get_forum_topic_count( $parent_forum_id, true,  false );
    978978
    979979                // Update counts
Note: See TracChangeset for help on using the changeset viewer.