Skip to:
Content

bbPress.org

Ticket #3389: 3389.patch

File 3389.patch, 1.4 KB (added by Clorith, 7 weeks ago)
  • src/includes/replies/functions.php

     
    796796                return;
    797797        }
    798798
     799        // Check if a revision was created. This should be removed once #30854 is resolved in core.
     800        if ( 0 === count( wp_get_post_revisions( $reply_id ) ) ) {
     801                wp_save_post_revision( $reply_id );
     802        }
     803
    799804        // Check author_id
    800805        if ( empty( $author_id ) ) {
    801806                $author_id = bbp_get_current_user_id();
  • src/includes/topics/functions.php

     
    1919 * @since 2.0.0 bbPress (r3349)
    2020 *
    2121 * @param array $topic_data Forum post data
    22  * @param arrap $topic_meta Forum meta data
     22 * @param array $topic_meta Forum meta data
    2323 */
    2424function bbp_insert_topic( $topic_data = array(), $topic_meta = array() ) {
    2525
     
    739739                return;
    740740        }
    741741
     742        // Check if a revision was created. This should be removed once #30854 is resolved in core.
     743        if ( 0 === count( wp_get_post_revisions( $topic_id ) ) ) {
     744                wp_save_post_revision( $topic_id );
     745        }
     746
    742747        // Check author_id
    743748        if ( empty( $author_id ) ) {
    744749                $author_id = bbp_get_current_user_id();