Skip to:
Content

bbPress.org

Changeset 5338


Ignore:
Timestamp:
04/04/2014 03:52:52 PM (11 years ago)
Author:
johnjamesjacoby
Message:

When calculating a new reply position, ensure we are using raw, unformatted integers. Fixes bug where formatted numeric strings (I.E. with commas; eg: 1,532) were being passed to the menu_order property, causing broken pagination on topics with over 1k replies. Fixes #2556.

Location:
trunk/src/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/functions.php

    r5301 r5338  
    12911291
    12921292                // Bump the reply position
    1293                 $reply_position = bbp_get_topic_reply_count( $destination_topic->ID ) + 1;
     1293                $reply_position = bbp_get_topic_reply_count( $destination_topic->ID, true ) + 1;
    12941294
    12951295                // Update the reply
  • trunk/src/includes/replies/template.php

    r5291 r5338  
    22862286        $classes[] = 'bbp-parent-forum-'   . bbp_get_reply_forum_id( $reply_id );
    22872287        $classes[] = 'bbp-parent-topic-'   . bbp_get_reply_topic_id( $reply_id );
    2288         $classes[] = 'bbp-reply-position-' . bbp_get_reply_position( $reply_id );
     2288        $classes[] = 'bbp-reply-position-' . bbp_get_reply_position( $reply_id, true );
    22892289        $classes[] = 'user-id-' . bbp_get_reply_author_id( $reply_id );
    22902290        $classes[] = ( bbp_get_reply_author_id( $reply_id ) === bbp_get_topic_author_id( bbp_get_reply_topic_id( $reply_id ) ) ? 'topic-author' : '' );
  • trunk/src/includes/topics/functions.php

    r5310 r5338  
    16291629            // Get topic reply count for existing topic
    16301630            case 'existing' :
    1631                 $reply_position = bbp_get_topic_reply_count( $destination_topic->ID );
     1631                $reply_position = bbp_get_topic_reply_count( $destination_topic->ID, true );
    16321632                break;
    16331633
Note: See TracChangeset for help on using the changeset viewer.