Changeset 1355 for trunk/wp-admin/import-blogger.php
- Timestamp:
- 05/24/2004 08:22:18 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import-blogger.php
r1285 r1355 64 64 $post_author = trim(addslashes($postinfo[1])); 65 65 // we'll check the author is registered already 66 $user = $wpdb->get_row("SELECT * FROM $ tableusers WHERE user_login = '$post_author'");66 $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE user_login = '$post_author'"); 67 67 if (!$user) { // seems s/he's not, so let's register 68 68 $user_ip = '127.0.0.1'; … … 77 77 $user_joindate = addslashes($user_joindate); 78 78 $result = $wpdb->query(" 79 INSERT INTO $ tableusers (79 INSERT INTO $wpdb->users ( 80 80 user_login, 81 81 user_pass, … … 106 106 } 107 107 108 $post_author_ID = $wpdb->get_var("SELECT ID FROM $ tableusers WHERE user_login = '$post_author'");108 $post_author_ID = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_login = '$post_author'"); 109 109 110 110 $post_date = explode(' ', $post_date); … … 129 129 130 130 // Quick-n-dirty check for dups: 131 $dupcheck = $wpdb->get_results("SELECT ID,post_date,post_title FROM $ tableposts WHERE post_date='$post_date' AND post_title='$post_title' LIMIT 1",ARRAY_A);131 $dupcheck = $wpdb->get_results("SELECT ID,post_date,post_title FROM $wpdb->posts WHERE post_date='$post_date' AND post_title='$post_title' LIMIT 1",ARRAY_A); 132 132 if ($dupcheck[0]['ID']) { 133 133 print "<br />\nSkipping duplicate post, ID = '" . $dupcheck[0]['ID'] . "'<br />\n"; … … 138 138 139 139 $result = $wpdb->query(" 140 INSERT INTO $ tableposts140 INSERT INTO $wpdb->posts 141 141 (post_author,post_date,post_content,post_title,post_category) 142 142 VALUES … … 152 152 /* we've still got a bug that adds some empty posts with the date 0000-00-00 00:00:00 153 153 here's the bugfix: */ 154 $result = $wpdb->query("DELETE FROM $ tableposts WHERE post_date=\"0000-00-00 00:00:00\"");154 $result = $wpdb->query("DELETE FROM $wpdb->posts WHERE post_date=\"0000-00-00 00:00:00\""); 155 155 156 156 upgrade_all();
Note: See TracChangeset
for help on using the changeset viewer.