WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-admin/import/greymatter.php

    r4608 r5405  
    3535<input type="hidden" name="import" value="greymatter" />
    3636<input type="hidden" name="step" value="1" />
     37<?php wp_nonce_field('import-greymatter'); ?>
    3738<h3><?php _e('Second step: GreyMatter details:') ?></h3>
    3839<p><table cellpadding="0">
     
    8889
    8990        if (!chdir($archivespath))
    90             wp_die(sprintf(__("Wrong path, %s\ndoesn't exist\non the server"), $archivespath));
     91            wp_die(__("Wrong path, the path to the GM entries does not exist on the server"));
    9192
    9293        if (!chdir($gmpath))
    93             wp_die(sprintf(__("Wrong path, %s\ndoesn't exist\non the server"), $gmpath));
    94            
     94            wp_die(__("Wrong path, the path to the GM files does not exist on the server"));
     95
     96        $lastentry = (int) $lastentry;
     97
    9598        $this->header();
    9699?>
     
    129132        $user_id = wp_insert_user($user_info);
    130133        $this->gmnames[$userdata[0]] = $user_id;
    131        
     134
    132135        printf('<li>'.__('user %s...').' <strong>'.__('Done').'</strong></li>', "<em>$user_login</em>");
    133136    }
     
    214217                    $user_url=$wpdb->escape("");
    215218                    $user_joindate=$wpdb->escape($user_joindate);
    216                    
     219
    217220                    $user_info = array("user_login"=>$user_login, "user_pass"=>$pass1, "user_nickname"=>$user_nickname, "user_email"=>$user_email, "user_url"=>$user_url, "user_ip"=>$user_ip, "user_domain"=>$user_domain, "user_browser"=>$user_browser, "dateYMDhour"=>$user_joindate, "user_level"=>0, "user_idmode"=>"nickname");
    218221                    $user_id = wp_insert_user($user_info);
    219222                    $this->gmnames[$postinfo[1]] = $user_id;
    220                    
     223
    221224                    echo ': ';
    222225                    printf(__('registered deleted user %s at level 0 '), "<em>$user_login</em>");
    223226                }
    224            
     227
    225228                if (array_key_exists($postinfo[1], $this->gmnames)) {
    226229                    $post_author = $this->gmnames[$postinfo[1]];
     
    228231                    $post_author = $user_id;
    229232                }
    230            
     233
    231234                $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt');
    232235                $post_ID = wp_insert_post($postdata);
     
    298301                break;
    299302            case 1:
     303                check_admin_referer('import-greymatter');
    300304                $this->import();
    301305                break;
Note: See TracChangeset for help on using the changeset viewer.