Skip to:
Content

bbPress.org

Changeset 5843


Ignore:
Timestamp:
07/15/2015 09:22:33 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Installation: When creating initial content, use the same current_time( 'mysql' ) for all new posts.

This changeset prevents the related unit test from incorrectly failing by ensuring that no initial content is created 1 second after any other.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/update.php

    r5829 r5843  
    192192    ), 'create_initial_content' );
    193193
     194    // Use the same time for each post
     195    $current_time = current_time( 'mysql' );
     196
    194197    // Create the initial forum
    195198    $forum_id = bbp_insert_forum( array(
     
    197200        'post_status'  => $r['forum_status'],
    198201        'post_title'   => $r['forum_title'],
    199         'post_content' => $r['forum_content']
     202        'post_content' => $r['forum_content'],
     203        'post_date'    => $current_time
    200204    ) );
    201205
     
    205209            'post_parent'  => $forum_id,
    206210            'post_title'   => $r['topic_title'],
    207             'post_content' => $r['topic_content']
     211            'post_content' => $r['topic_content'],
     212            'post_date'    => $current_time
    208213        ),
    209214        array(
     
    216221        array(
    217222            'post_parent'  => $topic_id,
    218             'post_content' => $r['reply_content']
     223            'post_content' => $r['reply_content'],
     224            'post_date'    => $current_time
    219225        ),
    220226        array(
Note: See TracChangeset for help on using the changeset viewer.