Version Description
- Fixed a small bug which could create error messages on some systems when deleting old image files.
Download this release
Release Info
Developer | MungoBBQ |
Plugin | Enable Media Replace |
Version | 2.8.1 |
Comparing to | |
See all releases |
Code changes from version 2.8 to 2.8.1
- enable-media-replace.php +1 -1
- readme.txt +3 -0
- upload.php +6 -2
enable-media-replace.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Enable Media Replace
|
4 |
Plugin URI: http://www.mansjonasson.se/enable-media-replace
|
5 |
Description: Enable replacing media files by uploading a new file in the "Edit Media" section of the WordPress Media Library.
|
6 |
-
Version: 2.8
|
7 |
Author: Måns Jonasson
|
8 |
Author URI: http://www.mansjonasson.se
|
9 |
|
3 |
Plugin Name: Enable Media Replace
|
4 |
Plugin URI: http://www.mansjonasson.se/enable-media-replace
|
5 |
Description: Enable replacing media files by uploading a new file in the "Edit Media" section of the WordPress Media Library.
|
6 |
+
Version: 2.8.1
|
7 |
Author: Måns Jonasson
|
8 |
Author URI: http://www.mansjonasson.se
|
9 |
|
readme.txt
CHANGED
@@ -37,6 +37,9 @@ If you want more control over the format used to display the time, you can use t
|
|
37 |
|
38 |
== Changelog ==
|
39 |
|
|
|
|
|
|
|
40 |
= 2.8 =
|
41 |
* New and safer method for deleting thumbnails when a new image file is uploaded.
|
42 |
* New translations for simplified Chinese (thanks Tunghsiao Liu) and Italian (grazie Marco Chiesi)
|
37 |
|
38 |
== Changelog ==
|
39 |
|
40 |
+
= 2.8.1 =
|
41 |
+
* Fixed a small bug which could create error messages on some systems when deleting old image files.
|
42 |
+
|
43 |
= 2.8 =
|
44 |
* New and safer method for deleting thumbnails when a new image file is uploaded.
|
45 |
* New translations for simplified Chinese (thanks Tunghsiao Liu) and Italian (grazie Marco Chiesi)
|
upload.php
CHANGED
@@ -57,7 +57,9 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
|
|
57 |
$thisfile = $thissize["file"];
|
58 |
if (strlen($thisfile)) {
|
59 |
$thisfile = $current_path . "/" . $thissize["file"];
|
60 |
-
|
|
|
|
|
61 |
}
|
62 |
}
|
63 |
// Old (brutal) method, left here for now
|
@@ -94,7 +96,9 @@ if (is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
|
|
94 |
$thisfile = $thissize["file"];
|
95 |
if (strlen($thisfile)) {
|
96 |
$thisfile = $current_path . "/" . $thissize["file"];
|
97 |
-
|
|
|
|
|
98 |
}
|
99 |
}
|
100 |
// Old (brutal) method, left here for now
|
57 |
$thisfile = $thissize["file"];
|
58 |
if (strlen($thisfile)) {
|
59 |
$thisfile = $current_path . "/" . $thissize["file"];
|
60 |
+
if (file_exists($thisfile)) {
|
61 |
+
unlink($thisfile);
|
62 |
+
}
|
63 |
}
|
64 |
}
|
65 |
// Old (brutal) method, left here for now
|
96 |
$thisfile = $thissize["file"];
|
97 |
if (strlen($thisfile)) {
|
98 |
$thisfile = $current_path . "/" . $thissize["file"];
|
99 |
+
if (file_exists($thisfile)) {
|
100 |
+
unlink($thisfile);
|
101 |
+
}
|
102 |
}
|
103 |
}
|
104 |
// Old (brutal) method, left here for now
|