Changeset 3204
- Timestamp:
- 11/23/2005 10:02:23 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/mt.php
r3141 r3204 1 1 <?php 2 3 4 // enter the relative path of the import.txt file containing the mt entries. If the file is called import.txt and it is /wp-admin, then this line5 //should be define('MTEXPORT', 'import.txt');6 define('MTEXPORT', 'import.txt');7 2 8 3 class MT_Import { … … 31 26 <p>The importer is smart enough not to import duplicates, so you can run this multiple times without worry if—for whatever reason—it doesn't finish. If you get an <strong>out of memory</strong> error try splitting up the import file into pieces. </p> 32 27 <?php 33 34 35 28 $this->footer(); 36 29 } … … 68 61 $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. 69 62 } else { 70 $wpdb->query("INSERT INTO $wpdb->users (user_level, user_login, user_pass, user_nickname) VALUES ('1', '{$this->newauthornames[$this->j]}', '$md5pass', '{$this->newauthornames[$this->j]}')"); //if not left_blank, insert the user specified name71 63 $user_id = wp_create_user($this->newauthornames[$this->j], $pass); 72 64 } … … 178 170 $this->get_entries(); 179 171 $this->mt_authors_form(); 180 wp_import_cleanup($this->id);181 172 } 182 173 … … 382 373 383 374 echo '</ol>'; 375 376 wp_import_cleanup($this->id); 377 384 378 echo '<h3>'.sprintf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')).'</h3>'; 385 379 } 386 380 387 381 function import() { 382 $this->id = (int) $_GET['id']; 383 $this->file = get_attached_file($this->id); 388 384 $this->get_authors_from_post(); 389 385 $this->get_entries(); … … 405 401 break; 406 402 case 2: 407 echo "ID: {$_GET['id']}<br/>";403 $this->import(); 408 404 break; 409 405 }
Note: See TracChangeset
for help on using the changeset viewer.