Version Description
- Bug Fix: Ghostscript thumbnail generation where the attachment name includes non-ASCII characters was failing on some server configurations. Kevin Hock identified the bug AND provided the fix. Gold star!
Download this release
Release Info
Developer | dan.rossiter |
Plugin | Document Gallery |
Version | 4.2.3 |
Comparing to | |
See all releases |
Code changes from version 4.2.2 to 4.2.3
- CHANGELOG.md +4 -0
- README.txt +5 -1
- document-gallery.php +3 -3
- inc/thumbers/class-ghostscript-thumber.php +6 -0
CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
# Changelog
|
2 |
|
|
|
|
|
|
|
|
|
3 |
## 4.2.2
|
4 |
* **Bug Fix:** Ghostscript-based thumbnail generation was failing in a rare corner case. Thanks
|
5 |
[sigvevidnes](https://wordpress.org/support/profile/sigvevidnes) for identifying this issue!
|
1 |
# Changelog
|
2 |
|
3 |
+
## 4.2.3
|
4 |
+
* **Bug Fix:** Ghostscript thumbnail generation where the attachment name includes non-ASCII characters was failing
|
5 |
+
on some server configurations. Kevin Hock identified the bug AND provided the fix. Gold star!
|
6 |
+
|
7 |
## 4.2.2
|
8 |
* **Bug Fix:** Ghostscript-based thumbnail generation was failing in a rare corner case. Thanks
|
9 |
[sigvevidnes](https://wordpress.org/support/profile/sigvevidnes) for identifying this issue!
|
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: attachments, library, thumbnail, documents, gallery, word, pdf
|
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE5LWRLG933EN&lc=US&item_name=Document%20Gallery%20Plugin&item_number=document%2dgallery¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
5 |
Requires at least: 4.1
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 4.2.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -422,6 +422,10 @@ To see a list of features planned for the future as well as to propose your own
|
|
422 |
ideas for future Document Gallery development, take a look at our
|
423 |
[issue tracker](https://github.com/thenadz/document-gallery/issues).
|
424 |
|
|
|
|
|
|
|
|
|
425 |
= 4.2.2 =
|
426 |
* **Bug Fix:** Ghostscript-based thumbnail generation was failing in a rare corner case. Thanks
|
427 |
[sigvevidnes](https://wordpress.org/support/profile/sigvevidnes) for identifying this issue!
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=EE5LWRLG933EN&lc=US&item_name=Document%20Gallery%20Plugin&item_number=document%2dgallery¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
5 |
Requires at least: 4.1
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 4.2.3
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
422 |
ideas for future Document Gallery development, take a look at our
|
423 |
[issue tracker](https://github.com/thenadz/document-gallery/issues).
|
424 |
|
425 |
+
= 4.2.3 =
|
426 |
+
* **Bug Fix:** Ghostscript thumbnail generation where the attachment name includes non-ASCII characters was failing
|
427 |
+
on some server configurations. Kevin Hock identified the bug AND provided the fix. Gold star!
|
428 |
+
|
429 |
= 4.2.2 =
|
430 |
* **Bug Fix:** Ghostscript-based thumbnail generation was failing in a rare corner case. Thanks
|
431 |
[sigvevidnes](https://wordpress.org/support/profile/sigvevidnes) for identifying this issue!
|
document-gallery.php
CHANGED
@@ -3,16 +3,16 @@ defined( 'WPINC' ) OR exit;
|
|
3 |
|
4 |
/*
|
5 |
Plugin Name: Document Gallery
|
6 |
-
Plugin URI:
|
7 |
Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
|
8 |
-
Version: 4.2.
|
9 |
Author: Dan Rossiter
|
10 |
Author URI: http://danrossiter.org/
|
11 |
License: GPLv3
|
12 |
Text Domain: document-gallery
|
13 |
*/
|
14 |
|
15 |
-
define( 'DG_VERSION', '4.2.
|
16 |
|
17 |
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
|
18 |
add_action( 'admin_notices', 'dg_php_lt_three' );
|
3 |
|
4 |
/*
|
5 |
Plugin Name: Document Gallery
|
6 |
+
Plugin URI: https://wordpress.org/plugins/document-gallery/
|
7 |
Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
|
8 |
+
Version: 4.2.3
|
9 |
Author: Dan Rossiter
|
10 |
Author URI: http://danrossiter.org/
|
11 |
License: GPLv3
|
12 |
Text Domain: document-gallery
|
13 |
*/
|
14 |
|
15 |
+
define( 'DG_VERSION', '4.2.3' );
|
16 |
|
17 |
if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
|
18 |
add_action( 'admin_notices', 'dg_php_lt_three' );
|
inc/thumbers/class-ghostscript-thumber.php
CHANGED
@@ -43,7 +43,13 @@ class DG_GhostscriptThumber extends DG_AbstractThumber {
|
|
43 |
$doc_path = get_attached_file( $ID );
|
44 |
$temp_path = DG_Util::getTempFile();
|
45 |
|
|
|
|
|
46 |
$cmd = sprintf( $gs, $pg, escapeshellarg( $temp_path ), escapeshellarg( $doc_path ) );
|
|
|
|
|
|
|
|
|
47 |
DG_Logger::writeLog( DG_LogLevel::Detail, 'Executing: ' . $cmd );
|
48 |
exec( $cmd, $out, $ret );
|
49 |
|
43 |
$doc_path = get_attached_file( $ID );
|
44 |
$temp_path = DG_Util::getTempFile();
|
45 |
|
46 |
+
$old_locale = setlocale( LC_CTYPE, 0 );
|
47 |
+
setlocale( LC_CTYPE, 'en_US.UTF-8' );
|
48 |
$cmd = sprintf( $gs, $pg, escapeshellarg( $temp_path ), escapeshellarg( $doc_path ) );
|
49 |
+
if ( false !== $old_locale ) {
|
50 |
+
setlocale( LC_CTYPE, $old_locale );
|
51 |
+
}
|
52 |
+
|
53 |
DG_Logger::writeLog( DG_LogLevel::Detail, 'Executing: ' . $cmd );
|
54 |
exec( $cmd, $out, $ret );
|
55 |
|