Ticket #986: 986-import.diff
| File 986-import.diff, 23.2 KB (added by Nazgul, 6 years ago) |
|---|
-
wp-admin/import/blogger.php
517 517 $did_one = true; 518 518 } 519 519 $output.= "<p>$archivename $status</p>\n"; 520 }520 } 521 521 if ( ! $did_one ) 522 522 $this->set_next_step(7); 523 523 die( $this->refresher(1000) . $output ); -
wp-admin/import/blogware.php
20 20 $trans_tbl = array_flip($trans_tbl); 21 21 return strtr($string, $trans_tbl); 22 22 } 23 23 24 24 function greet() { 25 25 echo '<p>'.__('Howdy! This importer allows you to extract posts from Blogware XML export file into your blog. Pick a Blogware file to upload and click Import.').'</p>'; 26 26 wp_import_upload_form("admin.php?import=blogware&step=1"); … … 28 28 29 29 function import_posts() { 30 30 global $wpdb, $current_user; 31 31 32 32 set_magic_quotes_runtime(0); 33 33 $importdata = file($this->file); // Read the file into an array 34 34 $importdata = implode('', $importdata); // squish it … … 37 37 preg_match_all('|(<item[^>]+>(.*?)</item>)|is', $importdata, $posts); 38 38 $posts = $posts[1]; 39 39 unset($importdata); 40 echo '<ol>'; 40 echo '<ol>'; 41 41 foreach ($posts as $post) { 42 42 flush(); 43 43 preg_match('|<item type=\"(.*?)\">|is', $post, $post_type); … … 100 100 101 101 preg_match_all('|<comment>(.*?)</comment>|is', $post, $comments); 102 102 $comments = $comments[1]; 103 103 104 104 if ( $comments ) { 105 105 $comment_post_ID = $post_id; 106 106 $num_comments = 0; … … 155 155 $this->file = $file['file']; 156 156 $this->import_posts(); 157 157 wp_import_cleanup($file['id']); 158 158 159 159 echo '<h3>'; 160 160 printf(__('All done. <a href="%s">Have fun!</a>'), get_option('home')); 161 161 echo '</h3>'; … … 168 168 $step = (int) $_GET['step']; 169 169 170 170 $this->header(); 171 171 172 172 switch ($step) { 173 173 case 0 : 174 174 $this->greet(); … … 177 177 $this->import(); 178 178 break; 179 179 } 180 180 181 181 $this->footer(); 182 182 } 183 183 184 184 function BW_Import() { 185 // Nothing. 185 // Nothing. 186 186 } 187 187 } 188 188 -
wp-admin/import/dotclear.php
9 9 **/ 10 10 if(!function_exists('get_catbynicename')) 11 11 { 12 function get_catbynicename($category_nicename) 12 function get_catbynicename($category_nicename) 13 13 { 14 14 global $wpdb; 15 15 … … 60 60 // 61 61 // This cries out for a C-implementation to be included in PHP core 62 62 // 63 function valid_1byte($char) {64 if(!is_int($char)) return false;65 return ($char & 0x80) == 0x00;66 }67 68 function valid_2byte($char) {69 if(!is_int($char)) return false;70 return ($char & 0xE0) == 0xC0;71 }72 63 73 function valid_3byte($char) {74 if(!is_int($char)) return false;75 return ($char & 0xF0) == 0xE0;76 }64 function valid_1byte($char) { 65 if(!is_int($char)) return false; 66 return ($char & 0x80) == 0x00; 67 } 77 68 78 function valid_4byte($char) { 79 if(!is_int($char)) return false; 80 return ($char & 0xF8) == 0xF0; 81 } 82 83 function valid_nextbyte($char) { 84 if(!is_int($char)) return false; 85 return ($char & 0xC0) == 0x80; 86 } 87 88 function valid_utf8($string) { 89 $len = strlen($string); 90 $i = 0; 91 while( $i < $len ) { 92 $char = ord(substr($string, $i++, 1)); 93 if(valid_1byte($char)) { // continue 94 continue; 95 } else if(valid_2byte($char)) { // check 1 byte 96 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 97 return false; 98 } else if(valid_3byte($char)) { // check 2 bytes 99 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 100 return false; 101 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 102 return false; 103 } else if(valid_4byte($char)) { // check 3 bytes 104 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 105 return false; 106 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 107 return false; 108 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 109 return false; 110 } // goto next char 111 } 112 return true; // done 113 } 69 function valid_2byte($char) { 70 if(!is_int($char)) return false; 71 return ($char & 0xE0) == 0xC0; 72 } 114 73 74 function valid_3byte($char) { 75 if(!is_int($char)) return false; 76 return ($char & 0xF0) == 0xE0; 77 } 78 79 function valid_4byte($char) { 80 if(!is_int($char)) return false; 81 return ($char & 0xF8) == 0xF0; 82 } 83 84 function valid_nextbyte($char) { 85 if(!is_int($char)) return false; 86 return ($char & 0xC0) == 0x80; 87 } 88 89 function valid_utf8($string) { 90 $len = strlen($string); 91 $i = 0; 92 while( $i < $len ) { 93 $char = ord(substr($string, $i++, 1)); 94 if(valid_1byte($char)) { // continue 95 continue; 96 } else if(valid_2byte($char)) { // check 1 byte 97 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 98 return false; 99 } else if(valid_3byte($char)) { // check 2 bytes 100 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 101 return false; 102 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 103 return false; 104 } else if(valid_4byte($char)) { // check 3 bytes 105 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 106 return false; 107 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 108 return false; 109 if(!valid_nextbyte(ord(substr($string, $i++, 1)))) 110 return false; 111 } // goto next char 112 } 113 return true; // done 114 } 115 115 116 function csc ($s) { 116 117 if (valid_utf8 ($s)) { 117 118 return $s; … … 129 130 **/ 130 131 class Dotclear_Import { 131 132 132 function header() 133 function header() 133 134 { 134 135 echo '<div class="wrap">'; 135 136 echo '<h2>'.__('Import Dotclear').'</h2>'; 136 137 echo '<p>'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'</p>'; 137 138 } 138 139 139 function footer() 140 function footer() 140 141 { 141 142 echo '</div>'; 142 143 } 143 144 144 function greet() 145 function greet() 145 146 { 146 147 echo '<p>'.__('Howdy! This importer allows you to extract posts from a Dotclear database into your blog. Mileage may vary.').'</p>'; 147 148 echo '<p>'.__('Your Dotclear Configuration settings are as follows:').'</p>'; … … 151 152 echo '</form>'; 152 153 } 153 154 154 function get_dc_cats() 155 function get_dc_cats() 155 156 { 156 157 global $wpdb; 157 158 // General Housekeeping … … 186 187 // Get Posts 187 188 return $dcdb->get_results('SELECT '.$dbprefix.'post.*, '.$dbprefix.'categorie.cat_libelle_url AS post_cat_name 188 189 FROM '.$dbprefix.'post INNER JOIN '.$dbprefix.'categorie 189 ON '.$dbprefix.'post.cat_id = '.$dbprefix.'categorie.cat_id', ARRAY_A);190 ON '.$dbprefix.'post.cat_id = '.$dbprefix.'categorie.cat_id', ARRAY_A); 190 191 } 191 192 192 193 function get_dc_comments() … … 211 212 return $dcdb->get_results('SELECT * FROM '.$dbprefix.'link ORDER BY position', ARRAY_A); 212 213 } 213 214 214 function cat2wp($categories='') 215 function cat2wp($categories='') 215 216 { 216 217 // General Housekeeping 217 218 global $wpdb; … … 221 222 if(is_array($categories)) 222 223 { 223 224 echo '<p>'.__('Importing Categories...').'<br /><br /></p>'; 224 foreach ($categories as $category) 225 foreach ($categories as $category) 225 226 { 226 227 $count++; 227 228 extract($category); … … 283 284 'display_name' => $Realname) 284 285 ); 285 286 } 286 else 287 else 287 288 { 288 289 $ret_id = wp_insert_user(array( 289 290 'user_login' => $user_id, … … 384 385 'comment_count' => $post_nb_comment + $post_nb_trackback) 385 386 ); 386 387 } 387 else 388 else 388 389 { 389 390 $ret_id = wp_insert_post(array( 390 391 'post_author' => $authorid, … … 460 461 'comment_approved' => $comment_approved) 461 462 ); 462 463 } 463 else 464 else 464 465 { 465 466 // Insert comments 466 467 $ret_id = wp_insert_comment(array( … … 547 548 return false; 548 549 } 549 550 550 function import_categories() 551 function import_categories() 551 552 { 552 553 // Category Import 553 554 $cats = $this->get_dc_cats(); … … 565 566 function import_users() 566 567 { 567 568 // User Import 568 $users = $this->get_dc_users(); 569 $users = $this->get_dc_users(); 569 570 $this->users2wp($users); 570 571 571 572 echo '<form action="admin.php?import=dotclear&step=3" method="post">'; … … 655 656 echo '</ul>'; 656 657 } 657 658 658 function dispatch() 659 function dispatch() 659 660 { 660 661 661 662 if (empty ($_GET['step'])) … … 664 665 $step = (int) $_GET['step']; 665 666 $this->header(); 666 667 667 if ( $step > 0 ) 668 if ( $step > 0 ) 668 669 { 669 670 if($_POST['dbuser']) 670 671 { … … 689 690 { 690 691 if(get_option('dchost')) 691 692 delete_option('dchost'); 692 add_option('dchost',$_POST['dbhost']); 693 add_option('dchost',$_POST['dbhost']); 693 694 } 694 695 if($_POST['dccharset']) 695 696 { 696 697 if(get_option('dccharset')) 697 698 delete_option('dccharset'); 698 add_option('dccharset',$_POST['dccharset']); 699 add_option('dccharset',$_POST['dccharset']); 699 700 } 700 701 if($_POST['dbprefix']) 701 702 { 702 703 if(get_option('dcdbprefix')) 703 704 delete_option('dcdbprefix'); 704 add_option('dcdbprefix',$_POST['dbprefix']); 705 add_option('dcdbprefix',$_POST['dbprefix']); 705 706 } 706 707 707 708 708 709 } 709 710 710 switch ($step) 711 switch ($step) 711 712 { 712 713 default: 713 714 case 0 : … … 736 737 $this->footer(); 737 738 } 738 739 739 function Dotclear_Import() 740 function Dotclear_Import() 740 741 { 741 742 // Nothing. 742 743 } -
wp-admin/import/greymatter.php
66 66 $string = str_replace("|*|","<br />\n",$string); 67 67 return($string); 68 68 } 69 69 70 70 function import() { 71 71 global $wpdb; 72 72 73 73 $wpvarstoreset = array('gmpath', 'archivespath', 'lastentry'); 74 74 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 75 75 $wpvar = $wpvarstoreset[$i]; … … 91 91 92 92 if (!chdir($gmpath)) 93 93 die("Wrong path, $gmpath\ndoesn't exist\non the server"); 94 94 95 95 $this->header(); 96 96 ?> 97 97 <p>The importer is running...</p> … … 128 128 $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"=>"1", "user_idmode"=>"nickname"); 129 129 $user_id = wp_insert_user($user_info); 130 130 $this->gmnames[$userdata[0]] = $user_id; 131 131 132 132 echo "<li>user <i>$user_login</i>... <b>Done</b></li>"; 133 133 134 134 } … … 137 137 <li>importing posts, comments, and karma...<br /><ul><?php 138 138 139 139 chdir($archivespath); 140 140 141 141 for($i = 0; $i <= $lastentry; $i = $i + 1) { 142 142 143 143 $entryfile = ""; 144 144 145 145 if ($i<10000000) { 146 146 $entryfile .= "0"; 147 147 if ($i<1000000) { … … 196 196 $post_status = 'publish'; //in greymatter, there are no drafts 197 197 $comment_status = 'open'; 198 198 $ping_status = 'closed'; 199 199 200 200 if ($post_ID = post_exists($post_title, '', $post_date)) { 201 201 echo ' (already exists)'; 202 202 } else { … … 214 214 $user_email=$wpdb->escape("user@deleted.com"); 215 215 $user_url=$wpdb->escape(""); 216 216 $user_joindate=$wpdb->escape($user_joindate); 217 217 218 218 $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"); 219 219 $user_id = wp_insert_user($user_info); 220 220 $this->gmnames[$postinfo[1]] = $user_id; 221 221 222 222 echo ": registered deleted user <i>$user_login</i> at level 0 "; 223 223 } 224 224 225 225 if (array_key_exists($postinfo[1], $this->gmnames)) { 226 226 $post_author = $this->gmnames[$postinfo[1]]; 227 227 } else { 228 228 $post_author = $user_id; 229 229 } 230 230 231 231 $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'); 232 232 $post_ID = wp_insert_post($postdata); 233 233 } … … 302 302 } 303 303 304 304 function GM_Import() { 305 // Nothing. 305 // Nothing. 306 306 } 307 307 } 308 308 -
wp-admin/import/mt.php
53 53 $pass = 'changeme'; 54 54 if (!(in_array($author, $this->mtnames))) { //a new mt author name is found 55 55 ++ $this->j; 56 $this->mtnames[$this->j] = $author; //add that new mt author name to an array 56 $this->mtnames[$this->j] = $author; //add that new mt author name to an array 57 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 58 if (!$user_id) { //banging my head against the desk now. 58 if (!$user_id) { //banging my head against the desk now. 59 59 if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname 60 60 $user_id = wp_create_user($author, $pass); 61 61 $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. … … 397 397 398 398 function import() { 399 399 $this->id = (int) $_GET['id']; 400 400 401 401 $this->file = get_attached_file($this->id); 402 402 $this->get_authors_from_post(); 403 403 $this->get_entries(); -
wp-admin/import/textpattern.php
4 4 **/ 5 5 if(!function_exists('get_catbynicename')) 6 6 { 7 function get_catbynicename($category_nicename) 7 function get_catbynicename($category_nicename) 8 8 { 9 9 global $wpdb; 10 10 … … 38 38 **/ 39 39 class Textpattern_Import { 40 40 41 function header() 41 function header() 42 42 { 43 43 echo '<div class="wrap">'; 44 44 echo '<h2>'.__('Import Textpattern').'</h2>'; 45 45 echo '<p>'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'</p>'; 46 46 } 47 47 48 function footer() 48 function footer() 49 49 { 50 50 echo '</div>'; 51 51 } 52 52 53 function greet() 53 function greet() 54 54 { 55 55 echo '<p>'.__('Howdy! This importer allows you to extract posts from any Textpattern 4.0.2+ into your blog. This has not been tested on previous versions of Textpattern. Mileage may vary.').'</p>'; 56 56 echo '<p>'.__('Your Textpattern Configuration settings are as follows:').'</p>'; … … 69 69 $prefix = get_option('tpre'); 70 70 71 71 // Get Categories 72 return $txpdb->get_results('SELECT 73 id,74 name,75 title76 FROM '.$prefix.'txp_category77 WHERE type = "article"',78 ARRAY_A);72 return $txpdb->get_results('SELECT 73 id, 74 name, 75 title 76 FROM '.$prefix.'txp_category 77 WHERE type = "article"', 78 ARRAY_A); 79 79 } 80 80 81 81 function get_txp_users() … … 89 89 // Get Users 90 90 91 91 return $txpdb->get_results('SELECT 92 user_id,93 name,94 RealName,95 email,96 privs97 FROM '.$prefix.'txp_users', ARRAY_A);92 user_id, 93 name, 94 RealName, 95 email, 96 privs 97 FROM '.$prefix.'txp_users', ARRAY_A); 98 98 } 99 99 100 100 function get_txp_posts() … … 105 105 $prefix = get_option('tpre'); 106 106 107 107 // Get Posts 108 return $txpdb->get_results('SELECT 109 ID,110 Posted,111 AuthorID,112 LastMod,113 Title,114 Body,115 Excerpt,116 Category1,117 Category2,118 Status,119 Keywords,120 url_title,121 comments_count122 FROM '.$prefix.'textpattern123 ', ARRAY_A);108 return $txpdb->get_results('SELECT 109 ID, 110 Posted, 111 AuthorID, 112 LastMod, 113 Title, 114 Body, 115 Excerpt, 116 Category1, 117 Category2, 118 Status, 119 Keywords, 120 url_title, 121 comments_count 122 FROM '.$prefix.'textpattern 123 ', ARRAY_A); 124 124 } 125 125 126 126 function get_txp_comments() … … 142 142 set_magic_quotes_runtime(0); 143 143 $prefix = get_option('tpre'); 144 144 145 return $txpdb->get_results('SELECT 146 id,147 date,148 category,149 url,150 linkname,151 description152 FROM '.$prefix.'txp_link',153 ARRAY_A);145 return $txpdb->get_results('SELECT 146 id, 147 date, 148 category, 149 url, 150 linkname, 151 description 152 FROM '.$prefix.'txp_link', 153 ARRAY_A); 154 154 } 155 155 156 function cat2wp($categories='') 156 function cat2wp($categories='') 157 157 { 158 158 // General Housekeeping 159 159 global $wpdb; … … 163 163 if(is_array($categories)) 164 164 { 165 165 echo '<p>'.__('Importing Categories...').'<br /><br /></p>'; 166 foreach ($categories as $category) 166 foreach ($categories as $category) 167 167 { 168 168 $count++; 169 169 extract($category); … … 225 225 'display_name' => $name) 226 226 ); 227 227 } 228 else 228 else 229 229 { 230 230 $ret_id = wp_insert_user(array( 231 231 'user_login' => $name, … … 301 301 if($pinfo = post_exists($Title,$Body)) 302 302 { 303 303 $ret_id = wp_insert_post(array( 304 'ID' => $pinfo,305 'post_date' => $Posted,306 'post_date_gmt' => $post_date_gmt,307 'post_author' => $authorid,308 'post_modified' => $LastMod,309 'post_modified_gmt' => $post_modified_gmt,310 'post_title' => $Title,311 'post_content' => $Body,312 'post_excerpt' => $Excerpt,313 'post_status' => $post_status,314 'post_name' => $url_title,315 'comment_count' => $comments_count)316 );304 'ID' => $pinfo, 305 'post_date' => $Posted, 306 'post_date_gmt' => $post_date_gmt, 307 'post_author' => $authorid, 308 'post_modified' => $LastMod, 309 'post_modified_gmt' => $post_modified_gmt, 310 'post_title' => $Title, 311 'post_content' => $Body, 312 'post_excerpt' => $Excerpt, 313 'post_status' => $post_status, 314 'post_name' => $url_title, 315 'comment_count' => $comments_count) 316 ); 317 317 } 318 else 318 else 319 319 { 320 320 $ret_id = wp_insert_post(array( 321 'post_date' => $Posted,322 'post_date_gmt' => $post_date_gmt,323 'post_author' => $authorid,324 'post_modified' => $LastMod,325 'post_modified_gmt' => $post_modified_gmt,326 'post_title' => $Title,327 'post_content' => $Body,328 'post_excerpt' => $Excerpt,329 'post_status' => $post_status,330 'post_name' => $url_title,331 'comment_count' => $comments_count)332 );321 'post_date' => $Posted, 322 'post_date_gmt' => $post_date_gmt, 323 'post_author' => $authorid, 324 'post_modified' => $LastMod, 325 'post_modified_gmt' => $post_modified_gmt, 326 'post_title' => $Title, 327 'post_content' => $Body, 328 'post_excerpt' => $Excerpt, 329 'post_status' => $post_status, 330 'post_name' => $url_title, 331 'comment_count' => $comments_count) 332 ); 333 333 } 334 334 $txpposts2wpposts[$ID] = $ret_id; 335 335 … … 378 378 { 379 379 // Update comments 380 380 $ret_id = wp_update_comment(array( 381 'comment_ID' => $cinfo,382 'comment_post_ID' => $comment_post_ID,383 'comment_author' => $name,384 'comment_author_email' => $email,385 'comment_author_url' => $web,386 'comment_date' => $posted,387 'comment_content' => $message,388 'comment_approved' => $comment_approved)389 );381 'comment_ID' => $cinfo, 382 'comment_post_ID' => $comment_post_ID, 383 'comment_author' => $name, 384 'comment_author_email' => $email, 385 'comment_author_url' => $web, 386 'comment_date' => $posted, 387 'comment_content' => $message, 388 'comment_approved' => $comment_approved) 389 ); 390 390 } 391 else 391 else 392 392 { 393 393 // Insert comments 394 394 $ret_id = wp_insert_comment(array( 395 'comment_post_ID' => $comment_post_ID,396 'comment_author' => $name,397 'comment_author_email' => $email,398 'comment_author_url' => $web,399 'comment_author_IP' => $ip,400 'comment_date' => $posted,401 'comment_content' => $message,402 'comment_approved' => $comment_approved)403 );395 'comment_post_ID' => $comment_post_ID, 396 'comment_author' => $name, 397 'comment_author_email' => $email, 398 'comment_author_url' => $web, 399 'comment_author_IP' => $ip, 400 'comment_date' => $posted, 401 'comment_content' => $message, 402 'comment_approved' => $comment_approved) 403 ); 404 404 } 405 405 $txpcm2wpcm[$comment_ID] = $ret_id; 406 406 } … … 449 449 'link_updated' => $date) 450 450 ); 451 451 } 452 else 452 else 453 453 { 454 454 $ret_id = wp_insert_link(array( 455 455 'link_url' => $url, … … 471 471 return false; 472 472 } 473 473 474 function import_categories() 474 function import_categories() 475 475 { 476 476 // Category Import 477 477 $cats = $this->get_txp_cats(); … … 489 489 function import_users() 490 490 { 491 491 // User Import 492 $users = $this->get_txp_users(); 492 $users = $this->get_txp_users(); 493 493 $this->users2wp($users); 494 494 495 495 echo '<form action="admin.php?import=textpattern&step=3" method="post">'; … … 577 577 echo '</ul>'; 578 578 } 579 579 580 function dispatch() 580 function dispatch() 581 581 { 582 582 583 583 if (empty ($_GET['step'])) … … 586 586 $step = (int) $_GET['step']; 587 587 $this->header(); 588 588 589 if ( $step > 0 ) 589 if ( $step > 0 ) 590 590 { 591 591 if($_POST['dbuser']) 592 592 { … … 611 611 { 612 612 if(get_option('txphost')) 613 613 delete_option('txphost'); 614 add_option('txphost',$_POST['dbhost']); 614 add_option('txphost',$_POST['dbhost']); 615 615 } 616 616 if($_POST['dbprefix']) 617 617 { 618 618 if(get_option('tpre')) 619 619 delete_option('tpre'); 620 add_option('tpre',$_POST['dbprefix']); 620 add_option('tpre',$_POST['dbprefix']); 621 621 } 622 622 623 623 624 624 } 625 625 626 switch ($step) 626 switch ($step) 627 627 { 628 628 default: 629 629 case 0 : … … 652 652 $this->footer(); 653 653 } 654 654 655 function Textpattern_Import() 655 function Textpattern_Import() 656 656 { 657 657 // Nothing. 658 658 } -
wp-admin/import/wordpress.php
56 56 $pass = 'changeme'; 57 57 if (!(in_array($author, $this->mtnames))) { //a new mt author name is found 58 58 ++ $this->j; 59 $this->mtnames[$this->j] = $author; //add that new mt author name to an array 59 $this->mtnames[$this->j] = $author; //add that new mt author name to an array 60 60 $user_id = username_exists($this->newauthornames[$this->j]); //check if the new author name defined by the user is a pre-existing wp user 61 if (!$user_id) { //banging my head against the desk now. 61 if (!$user_id) { //banging my head against the desk now. 62 62 if ($newauthornames[$this->j] == 'left_blank') { //check if the user does not want to change the authorname 63 63 $user_id = wp_create_user($author, $pass); 64 64 $this->newauthornames[$this->j] = $author; //now we have a name, in the place of left_blank. … … 271 271 272 272 function import() { 273 273 $this->id = (int) $_GET['id']; 274 274 275 275 $this->file = get_attached_file($this->id); 276 276 $this->get_authors_from_post(); 277 277 $this->get_entries();
