Changeset 8799
- Timestamp:
- 09/03/2008 06:34:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/wordpress.php
r8645 r8799 106 106 if ( !$is_wxr_file && preg_match('|xmlns:wp="http://wordpress[.]org/export/\d+[.]\d+/"|', $importline) ) 107 107 $is_wxr_file = true; 108 108 109 if ( false !== strpos($importline, '<wp:base_site_url>') ) { 110 preg_match('|<wp:base_site_url>(.*?)</wp:base_site_url>|is', $importline, $url); 111 $this->base_url = $url[1]; 112 continue; 113 } 109 114 if ( false !== strpos($importline, '<wp:category>') ) { 110 115 preg_match('|<wp:category>(.*?)</wp:category>|is', $importline, $category); … … 540 545 if ($this->fetch_attachments and $remote_url) { 541 546 printf( __('Importing attachment <em>%s</em>... '), htmlspecialchars($remote_url) ); 547 548 // If the URL is absolute, but does not contain http, upload it assuming the base_site_url variable 549 if ( preg_match('/^\/[\w\W]+$/', $remote_url) ) 550 $remote_url = rtrim($this->base_url,'/').$remote_url; 551 542 552 $upload = $this->fetch_remote_file($postdata, $remote_url); 543 553 if ( is_wp_error($upload) ) {
Note: See TracChangeset
for help on using the changeset viewer.