Changeset 5775
- Timestamp:
- 05/21/2015 09:57:32 PM (11 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 4 edited
-
core/update.php (modified) (1 diff)
-
forums/functions.php (modified) (2 diffs)
-
replies/functions.php (modified) (3 diffs)
-
topics/functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/update.php
r5770 r5775 207 207 'post_content' => $r['topic_content'] 208 208 ), 209 array( 'forum_id' => $forum_id ) 209 array( 210 'forum_id' => $forum_id 211 ) 210 212 ); 211 213 -
trunk/src/includes/forums/functions.php
r5770 r5775 43 43 44 44 // Insert forum 45 $forum_id = wp_insert_post( $forum_data );45 $forum_id = wp_insert_post( $forum_data ); 46 46 47 47 // Bail if no forum was added … … 68 68 update_post_meta( $forum_id, '_bbp_' . $meta_key, $meta_value ); 69 69 } 70 71 // Update the forum and hierarchy 72 bbp_update_forum( array( 73 'forum_id' => $forum_id, 74 ) ); 70 75 71 76 // Return new forum ID -
trunk/src/includes/replies/functions.php
r5770 r5775 43 43 44 44 // Insert reply 45 $reply_id = wp_insert_post( $reply_data );45 $reply_id = wp_insert_post( $reply_data ); 46 46 47 47 // Bail if no reply was added … … 55 55 'forum_id' => 0, 56 56 'topic_id' => 0, 57 'reply_to' => 0 57 58 ), 'insert_reply_meta' ); 58 59 … … 62 63 } 63 64 64 // Update the topic 65 $topic_id = bbp_get_reply_topic_id( $reply_id ); 66 if ( !empty( $topic_id ) ) { 67 bbp_update_topic( $topic_id ); 68 } 65 // Update the reply and hierarchy 66 bbp_update_reply( $reply_id, $reply_meta['topic_id'], $reply_meta['forum_id'], array(), $reply_data['post_author'], false, $reply_meta['reply_to'] ); 69 67 70 68 // Return new reply ID -
trunk/src/includes/topics/functions.php
r5770 r5775 43 43 44 44 // Insert topic 45 $topic_id = wp_insert_post( $topic_data );45 $topic_id = wp_insert_post( $topic_data ); 46 46 47 47 // Bail if no topic was added … … 68 68 } 69 69 70 // Update the forum 71 $forum_id = bbp_get_topic_forum_id( $topic_id ); 72 if ( ! empty( $forum_id ) ) { 73 bbp_update_forum( array( 'forum_id' => $forum_id ) ); 74 } 70 // Update the topic and hierarchy 71 bbp_update_topic( $topic_id, $topic_meta['forum_id'], array(), $topic_data['author_id'], false ); 75 72 76 73 // Return new topic ID
Note: See TracChangeset
for help on using the changeset viewer.