Skip to:
Content

bbPress.org

Ticket #3428: 3428.02.patch

File 3428.02.patch, 1.3 KB (added by johnjamesjacoby, 2 years ago)
  • src/includes/common/functions.php

     
    516516        }
    517517
    518518        // Tally the tallies
    519         $counts = array_filter( array_map( 'absint', compact(
     519        $counts = array_map( 'absint', compact(
    520520                'user_count',
    521521                'forum_count',
    522522                'topic_count',
     
    525525                'reply_count_hidden',
    526526                'topic_tag_count',
    527527                'empty_topic_tag_count'
    528         ) ) );
     528        ) );
    529529
    530530        // Define return value
    531531        $statistics = array();
    532532
    533533        // Loop through and store the integer and i18n formatted counts.
    534534        foreach ( $counts as $key => $count ) {
    535                 $statistics[ $key ]         = bbp_number_format_i18n( $count );
    536                 $statistics[ "{$key}_int" ] = $count;
     535                $not_negative               = bbp_number_not_negative( $count );
     536                $statistics[ $key ]         = bbp_number_format_i18n( $not_negative );
     537                $statistics[ "{$key}_int" ] = $not_negative;
    537538        }
    538539
    539540        // Add the hidden (topic/reply) count title attribute strings because we
  • src/templates/default/bbpress/content-statistics.php

     
    1313// Get the statistics
    1414$stats = bbp_get_statistics(); ?>
    1515
    16 <dl role="main">
     16<dl role="main" class="bbp-stats">
    1717
    1818        <?php do_action( 'bbp_before_statistics' ); ?>
    1919