Changeset 2193 for trunk/wp-admin/import-rss.php
- Timestamp:
- 02/01/2005 10:04:01 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import-rss.php
r1950 r2193 111 111 endif; 112 112 113 preg_match('|<guid.+?>(.*?)</guid>|is', $post, $guid); 114 if ($guid) $guid = addslashes( trim($guid[1]) ); 115 else $guid = ''; 116 113 117 preg_match('|<content:encoded>(.*?)</content:encoded>|is', $post, $content); 114 118 $content = str_replace( array('<![CDATA[', ']]>'), '', addslashes( trim($content[1]) ) ); … … 138 142 139 143 $wpdb->query("INSERT INTO $wpdb->posts 140 (post_author, post_date, post_date_gmt, post_content, post_title,post_status, comment_status, ping_status, post_name )144 (post_author, post_date, post_date_gmt, post_content, post_title,post_status, comment_status, ping_status, post_name, guid) 141 145 VALUES 142 ('$post_author', '$post_date', DATE_ADD('$post_date', INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE), '$content', '$title', 'publish', '$comment_status', '$ping_status', '$post_name' )");146 ('$post_author', '$post_date', DATE_ADD('$post_date', INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE), '$content', '$title', 'publish', '$comment_status', '$ping_status', '$post_name', '$guid')"); 143 147 $post_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_title = '$title' AND post_date = '$post_date'"); 144 148 if (!$post_id) die("couldn't get post ID");
Note: See TracChangeset
for help on using the changeset viewer.