Changeset 3124
- Timestamp:
- 05/09/2011 05:39:31 AM (15 years ago)
- Location:
- branches/plugin/bbp-includes
- Files:
-
- 2 edited
-
bbp-reply-functions.php (modified) (2 diffs)
-
bbp-topic-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-reply-functions.php
r3120 r3124 326 326 if ( !is_wp_error( $bbp->errors ) || !$bbp->errors->get_error_codes() ) { 327 327 328 $reply_edit_reason = !empty( $_POST['bbp_reply_edit_reason'] ) ? esc_attr( strip_tags( $_POST['bbp_reply_edit_reason'] ) ) : '';329 330 if ( !empty( $_POST['bbp_log_reply_edit'] ) && 1 == $_POST['bbp_log_reply_edit'] && $revision_id = wp_save_post_revision( $reply_id ) )331 bbp_update_reply_revision_log( array( 'reply_id' => $reply_id, 'revision_id' => $revision_id, 'author_id' => bbp_get_current_user_id(), 'reason' => $reply_edit_reason ) );332 333 328 // Add the content of the form to $post as an array 334 329 $reply_data = array( … … 340 335 // Insert reply 341 336 $reply_id = wp_update_post( $reply_data ); 337 338 // Revisions 339 $reply_edit_reason = !empty( $_POST['bbp_reply_edit_reason'] ) ? esc_attr( strip_tags( $_POST['bbp_reply_edit_reason'] ) ) : ''; 340 341 if ( !empty( $_POST['bbp_log_reply_edit'] ) && 1 == $_POST['bbp_log_reply_edit'] && $revision_id = wp_save_post_revision( $reply_id ) ) 342 bbp_update_reply_revision_log( array( 'reply_id' => $reply_id, 'revision_id' => $revision_id, 'author_id' => bbp_get_current_user_id(), 'reason' => $reply_edit_reason ) ); 342 343 343 344 // Check for missing reply_id or error -
branches/plugin/bbp-includes/bbp-topic-functions.php
r3120 r3124 308 308 if ( !is_wp_error( $bbp->errors ) || !$bbp->errors->get_error_codes() ) { 309 309 310 $topic_edit_reason = !empty( $_POST['bbp_topic_edit_reason'] ) ? esc_attr( strip_tags( $_POST['bbp_topic_edit_reason'] ) ) : '';311 312 if ( !empty( $_POST['bbp_log_topic_edit'] ) && 1 == $_POST['bbp_log_topic_edit'] && $revision_id = wp_save_post_revision( $topic_id ) )313 bbp_update_topic_revision_log( array( 'topic_id' => $topic_id, 'revision_id' => $revision_id, 'author_id' => bbp_get_current_user_id(), 'reason' => $topic_edit_reason ) );314 315 310 // Stick status 316 311 if ( !empty( $_POST['bbp_stick_topic'] ) && in_array( $_POST['bbp_stick_topic'], array( 'stick', 'super', 'unstick' ) ) ) { … … 343 338 // Insert topic 344 339 $topic_id = wp_update_post( $topic_data ); 340 341 // Revisions 342 $topic_edit_reason = !empty( $_POST['bbp_topic_edit_reason'] ) ? esc_attr( strip_tags( $_POST['bbp_topic_edit_reason'] ) ) : ''; 343 344 if ( !empty( $_POST['bbp_log_topic_edit'] ) && 1 == $_POST['bbp_log_topic_edit'] && $revision_id = wp_save_post_revision( $topic_id ) ) 345 bbp_update_topic_revision_log( array( 'topic_id' => $topic_id, 'revision_id' => $revision_id, 'author_id' => bbp_get_current_user_id(), 'reason' => $topic_edit_reason ) ); 345 346 346 347 // Check for missing topic_id or error
Note: See TracChangeset
for help on using the changeset viewer.