Make WordPress Core

Changeset 3387


Ignore:
Timestamp:
01/01/2006 10:54:56 PM (18 years ago)
Author:
ryan
Message:

MT import fixes from cubex.

File:
1 edited

Legend:

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

    r3355 r3387  
    5555            ++ $this->j;
    5656            $this->mtnames[$this->j] = $author; //add that new mt author name to an array
    57             $user_id = username_exists($this->newauthornames[$j]); //check if the new author name defined by the user is a pre-existing wp user
     57            $user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user
    5858            if (!$user_id) { //banging my head against the desk now.
    5959                if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname
     
    244244                            break;
    245245                        case 'ALLOW PINGS' :
    246                             $post_allow_pings = trim($meta[2][0]);
    247                             if ($post_allow_pings == 1) {
    248                                 $post_allow_pings = 'open';
     246                            $ping_status = trim($meta[2][0]);
     247                            if ($ping_status == 1) {
     248                                $ping_status = 'open';
    249249                            } else {
    250                                 $post_allow_pings = 'closed';
     250                                $ping_status = 'closed';
    251251                            }
    252252                            break;
     
    291291
    292292                $comment_post_ID = $post_id;
     293                $comment_approved = 1;
    293294
    294295                // Now for comments
     
    322323                        // Check if it's already there
    323324                        if (!comment_exists($comment_author, $comment_date)) {
    324                             $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content');
     325                            $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content', 'comment_approved');
    325326                            $commentdata = wp_filter_comment($commentdata);
    326327                            wp_insert_comment($commentdata);
     
    370371                        // Check if it's already there
    371372                        if (!comment_exists($comment_author, $comment_date)) {
    372                             $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content', 'comment_type');
     373                            $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content', 'comment_type', 'comment_approved');
    373374                            $commentdata = wp_filter_comment($commentdata);
    374375                            wp_insert_comment($commentdata);
Note: See TracChangeset for help on using the changeset viewer.