Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/dotclear.php

    r12270 r12100  
    414414                $message = $wpdb->escape(textconv ($comment_content));
    415415
    416                 $comment = array(
     416                if($cinfo = comment_exists($name, $comment_dt))
     417                {
     418                    // Update comments
     419                    $ret_id = wp_update_comment(array(
     420                            'comment_ID'        => $cinfo,
    417421                            'comment_post_ID'   => $comment_post_ID,
    418422                            'comment_author'    => $name,
     
    423427                            'comment_date_gmt'  => $comment_dt,
    424428                            'comment_content'   => $message,
    425                             'comment_approved'  => $comment_approved);
    426                 $comment = wp_filter_comment($comment);
    427 
    428                 if ( $cinfo = comment_exists($name, $comment_dt) ) {
    429                     // Update comments
    430                     $comment['comment_ID'] = $cinfo;
    431                     $ret_id = wp_update_comment($comment);
    432                 } else {
     429                            'comment_approved'  => $comment_approved)
     430                            );
     431                }
     432                else
     433                {
    433434                    // Insert comments
    434                     $ret_id = wp_insert_comment($comment);
     435                    $ret_id = wp_insert_comment(array(
     436                            'comment_post_ID'   => $comment_post_ID,
     437                            'comment_author'    => $name,
     438                            'comment_author_email'  => $email,
     439                            'comment_author_url'    => $web,
     440                            'comment_author_IP' => $comment_ip,
     441                            'comment_date'      => $comment_dt,
     442                            'comment_date_gmt'  => $comment_dt,
     443                            'comment_content'   => $message,
     444                            'comment_approved'  => $comment_approved)
     445                            );
    435446                }
    436447                $dccm2wpcm[$comment_ID] = $ret_id;
Note: See TracChangeset for help on using the changeset viewer.