Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r12100 r12270  
    414414                $message = $wpdb->escape(textconv ($comment_content));
    415415
    416                 if($cinfo = comment_exists($name, $comment_dt))
    417                 {
    418                     // Update comments
    419                     $ret_id = wp_update_comment(array(
    420                             'comment_ID'        => $cinfo,
     416                $comment = array(
    421417                            'comment_post_ID'   => $comment_post_ID,
    422418                            'comment_author'    => $name,
     
    427423                            'comment_date_gmt'  => $comment_dt,
    428424                            'comment_content'   => $message,
    429                             'comment_approved'  => $comment_approved)
    430                             );
    431                 }
    432                 else
    433                 {
     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 {
    434433                    // Insert comments
    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                             );
     434                    $ret_id = wp_insert_comment($comment);
    446435                }
    447436                $dccm2wpcm[$comment_ID] = $ret_id;
Note: See TracChangeset for help on using the changeset viewer.