Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/26/2017 10:14:20 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Queries: Update orderby clauses of last-id queries to ensure more accurate results, specifically for imported forums and posts where IDs and post_date columns might be inverted.

Also update a few tests to be less cranky with exact array results.

Props thebrandonallen. Fixes #3108.

File:
1 edited

Legend:

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

    r6430 r6434  
    21662166                $types['meta_query'] = array(
    21672167                    'key'     => '_bbp_forum_id',
    2168                     'value'   => $forum_ids,
     2168                    'value'   => $types['string'],
    21692169                    'type'    => 'NUMERIC',
    21702170                    'compare' => $compare
     
    23582358        'post_status'     => bbp_get_public_status_id(),
    23592359        'post_type'       => bbp_get_reply_post_type(),
     2360        'orderby'         => array(
     2361            'post_date' => 'DESC',
     2362            'ID'        => 'DESC'
     2363        ),
    23602364
    23612365        // Maybe change these later
Note: See TracChangeset for help on using the changeset viewer.