Changeset 12469 for trunk/wp-admin/import/wordpress.php
- Timestamp:
- 12/21/2009 03:26:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/wordpress.php
r12301 r12469 61 61 global $wpdb; 62 62 preg_match("|<$tag.*?>(.*?)</$tag>|is", $string, $return); 63 $return = preg_replace('|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1]); 64 $return = $wpdb->escape( trim( $return ) ); 63 if ( isset($return[1]) ) { 64 $return = preg_replace('|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1]); 65 $return = $wpdb->escape( trim( $return ) ); 66 } else { 67 $return = ''; 68 } 65 69 return $return; 66 70 } … … 191 195 $user_id = wp_create_user($new_author_name, wp_generate_password()); 192 196 } 193 194 $this->author_ids[$in_author_name] = $user_id; 197 198 if ( !is_wp_error( $user_id ) ) { 199 $this->author_ids[$in_author_name] = $user_id; 200 } 195 201 } 196 202 … … 843 849 case 2: 844 850 check_admin_referer('import-wordpress'); 845 $result = $this->import( $_GET['id'], $_POST['attachments'] ); 851 $fetch_attachments = (!empty($_POST['attachments'])) ? true : false; 852 $result = $this->import( $_GET['id'], $fetch_attachments); 846 853 if ( is_wp_error( $result ) ) 847 854 echo $result->get_error_message();
Note: See TracChangeset
for help on using the changeset viewer.