Ticket #16252: 16252.diff
File 16252.diff, 3.3 KB (added by , 13 years ago) |
---|
-
wp-admin/edit-form-comment.php
105 105 } ?></td> 106 106 <td><input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" tabindex="3" /></td> 107 107 </tr> 108 <tr valign="top"> 109 <td class="first"> 110 <?php _e( 'Comment Parent' );?> 111 </td> 112 <td> 113 <input type="text" id="newcomment_parent" name="newcomment_parent" size="5" class="code" value="<?php echo esc_attr($comment->comment_parent); ?>" tabindex="4" /> 114 </td> 115 </tr> 108 116 </tbody> 109 117 </table> 110 118 <br /> -
wp-admin/includes/comment.php
42 42 $_POST['comment_approved'] = $_POST['comment_status']; 43 43 $_POST['comment_content'] = $_POST['content']; 44 44 $_POST['comment_ID'] = (int) $_POST['comment_ID']; 45 $_POST['comment_parent'] = (int) $_POST['newcomment_parent']; 45 46 46 47 foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) { 47 48 if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) { … … 89 90 $comment->comment_author_email = format_to_edit( $comment->comment_author_email ); 90 91 $comment->comment_author_url = format_to_edit( $comment->comment_author_url ); 91 92 $comment->comment_author_url = esc_url($comment->comment_author_url); 93 $comment->comment_parent =(int) $comment->comment_parent; 92 94 93 95 return $comment; 94 96 } -
wp-includes/comment.php
1335 1335 * @uses wp_filter_comment() Used to filter comment before adding comment. 1336 1336 * @uses wp_allow_comment() checks to see if comment is approved. 1337 1337 * @uses wp_insert_comment() Does the actual comment insertion to the database. 1338 * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object 1338 1339 * 1339 1340 * @param array $commentdata Contains information on the comment. 1340 1341 * @return int The ID of the comment after adding. … … 1365 1366 $comment_ID = wp_insert_comment($commentdata); 1366 1367 1367 1368 do_action('comment_post', $comment_ID, $commentdata['comment_approved']); 1369 wp_transition_comment_status($commentdata['comment_approved'], 'new', (object)$commentdata); 1368 1370 1369 1371 if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching 1370 1372 if ( '0' == $commentdata['comment_approved'] ) … … 1483 1485 else if ( 'approve' == $comment_approved ) 1484 1486 $comment_approved = 1; 1485 1487 1486 $data = compact('comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt' );1488 $data = compact('comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_parent'); 1487 1489 $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) ); 1488 1490 1489 1491 clean_comment_cache($comment_ID);