WordPress Importer - Version 0.5.2

Version Description

  • Double check that the uploaded export file exists before processing it. This prevents incorrect error messages when an export file is uploaded to a server with bad permissions and WordPress 3.3 or 3.3.1 is being used.
Download this release

Release Info

Developer duck_
Plugin Icon 128x128 WordPress Importer
Version 0.5.2
Comparing to
See all releases

Code changes from version 0.5 to 0.5.2

Files changed (2) hide show
  1. readme.txt +9 -2
  2. wordpress-importer.php +6 -1
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wordpressdotorg
3
  Donate link:
4
  Tags: importer, wordpress
5
  Requires at least: 3.0
6
- Tested up to: 3.2.1
7
- Stable tag: 0.5
8
 
9
  Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.
10
 
@@ -37,6 +37,10 @@ If you would prefer to do things manually then follow these instructions:
37
 
38
  == Changelog ==
39
 
 
 
 
 
40
  = 0.5 =
41
  * Import comment meta (requires export from WordPress 3.2)
42
  * Minor bugfixes and enhancements
@@ -57,6 +61,9 @@ If you would prefer to do things manually then follow these instructions:
57
 
58
  == Upgrade Notice ==
59
 
 
 
 
60
  = 0.5 =
61
  Import comment meta and other minor bugfixes and enhancements.
62
 
3
  Donate link:
4
  Tags: importer, wordpress
5
  Requires at least: 3.0
6
+ Tested up to: 3.3.1
7
+ Stable tag: 0.5.2
8
 
9
  Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.
10
 
37
 
38
  == Changelog ==
39
 
40
+ = 0.5.2 =
41
+ * Double check that the uploaded export file exists before processing it. This prevents incorrect error messages when
42
+ an export file is uploaded to a server with bad permissions and WordPress 3.3 or 3.3.1 is being used.
43
+
44
  = 0.5 =
45
  * Import comment meta (requires export from WordPress 3.2)
46
  * Minor bugfixes and enhancements
61
 
62
  == Upgrade Notice ==
63
 
64
+ = 0.5.2 =
65
+ Fix incorrect error message when the export file could not be uploaded.
66
+
67
  = 0.5 =
68
  Import comment meta and other minor bugfixes and enhancements.
69
 
wordpress-importer.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpress.org/extend/plugins/wordpress-importer/
5
  Description: Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.
6
  Author: wordpressdotorg
7
  Author URI: http://wordpress.org/
8
- Version: 0.5
9
  Text Domain: wordpress-importer
10
  License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
  */
@@ -194,6 +194,11 @@ class WP_Import extends WP_Importer {
194
  echo '<p><strong>' . __( 'Sorry, there has been an error.', 'wordpress-importer' ) . '</strong><br />';
195
  echo esc_html( $file['error'] ) . '</p>';
196
  return false;
 
 
 
 
 
197
  }
198
 
199
  $this->id = (int) $file['id'];
5
  Description: Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.
6
  Author: wordpressdotorg
7
  Author URI: http://wordpress.org/
8
+ Version: 0.5.2
9
  Text Domain: wordpress-importer
10
  License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
  */
194
  echo '<p><strong>' . __( 'Sorry, there has been an error.', 'wordpress-importer' ) . '</strong><br />';
195
  echo esc_html( $file['error'] ) . '</p>';
196
  return false;
197
+ } else if ( ! file_exists( $file['file'] ) ) {
198
+ echo '<p><strong>' . __( 'Sorry, there has been an error.', 'wordpress-importer' ) . '</strong><br />';
199
+ printf( __( 'The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem.', 'wordpress-importer' ), esc_html( $file['file'] ) );
200
+ echo '</p>';
201
+ return false;
202
  }
203
 
204
  $this->id = (int) $file['id'];