Version Description
- Enhancement: Improved how Ghostscript executable is detected.
Download this release
Release Info
Developer | dan.rossiter |
Plugin | Document Gallery |
Version | 2.2.6 |
Comparing to | |
See all releases |
Code changes from version 2.2.5 to 2.2.6
- README.txt +9 -6
- document-gallery.php +2 -2
- inc/class-thumber.php +12 -5
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: attachments, thumbnail, documents, gallery, MS office, 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: 3.6
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -26,11 +26,11 @@ Read more in the **Installation** tab!
|
|
26 |
|
27 |
Document Gallery has to-date been translated into **5** languages, listed below.
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
|
35 |
= Developers =
|
36 |
|
@@ -393,6 +393,9 @@ To see a list of features planned for the future as well as to propose your own
|
|
393 |
ideas for future Document Gallery development, take a look at our
|
394 |
[issue tracker](https://github.com/thenadz/document-gallery/issues).
|
395 |
|
|
|
|
|
|
|
396 |
= 2.2.5 =
|
397 |
* **Bug Fix:** Resolves a bug where document descriptions were not being displayed
|
398 |
correctly.
|
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: 3.6
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 2.2.6
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
26 |
|
27 |
Document Gallery has to-date been translated into **5** languages, listed below.
|
28 |
|
29 |
+
1. **French** — *Thanks, Marc Liotard and [Traffic Influence](http://www.trafic-influence.com/)!*
|
30 |
+
1. **Russian** — *Thanks, [demur](http://wordpress.org/support/profile/demur)!*
|
31 |
+
1. **Spanish** — *Thanks, Andrew Kurtis and [WebHostingHub](http://www.webhostinghub.com/)!*
|
32 |
+
1. **Swedish** — *Thanks, [mepmepmep](http://wordpress.org/support/profile/mepmepmep)!*
|
33 |
+
1. **Ukrainian** — *Thanks, [demur](http://wordpress.org/support/profile/demur)!*
|
34 |
|
35 |
= Developers =
|
36 |
|
393 |
ideas for future Document Gallery development, take a look at our
|
394 |
[issue tracker](https://github.com/thenadz/document-gallery/issues).
|
395 |
|
396 |
+
= 2.2.6 =
|
397 |
+
* **Enhancement:** Improved how Ghostscript executable is detected.
|
398 |
+
|
399 |
= 2.2.5 =
|
400 |
* **Bug Fix:** Resolves a bug where document descriptions were not being displayed
|
401 |
correctly.
|
document-gallery.php
CHANGED
@@ -5,14 +5,14 @@ defined('WPINC') OR exit;
|
|
5 |
Plugin Name: Document Gallery
|
6 |
Plugin URI: http://wordpress.org/extend/plugins/document-gallery/
|
7 |
Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
|
8 |
-
Version: 2.2.
|
9 |
Author: Dan Rossiter
|
10 |
Author URI: http://danrossiter.org/
|
11 |
License: GPLv2
|
12 |
Text Domain: document-gallery
|
13 |
*/
|
14 |
|
15 |
-
define('DG_VERSION', '2.2.
|
16 |
|
17 |
// define helper paths & URLs
|
18 |
define('DG_BASENAME', plugin_basename(__FILE__));
|
5 |
Plugin Name: Document Gallery
|
6 |
Plugin URI: http://wordpress.org/extend/plugins/document-gallery/
|
7 |
Description: Display non-images (and images) in gallery format on a page or post with the [dg] shortcode.
|
8 |
+
Version: 2.2.6
|
9 |
Author: Dan Rossiter
|
10 |
Author URI: http://danrossiter.org/
|
11 |
License: GPLv2
|
12 |
Text Domain: document-gallery
|
13 |
*/
|
14 |
|
15 |
+
define('DG_VERSION', '2.2.6');
|
16 |
|
17 |
// define helper paths & URLs
|
18 |
define('DG_BASENAME', plugin_basename(__FILE__));
|
inc/class-thumber.php
CHANGED
@@ -275,17 +275,23 @@ class DG_Thumber {
|
|
275 |
if (is_null($executable)) {
|
276 |
// we must be able to exec()
|
277 |
$executable = self::isExecAvailable();
|
278 |
-
if (!$executable)
|
|
|
|
|
279 |
|
280 |
// find on Windows system
|
281 |
if ('WIN' === strtoupper(substr(PHP_OS, 0, 3))) {
|
282 |
// look for environment variable
|
283 |
$executable = getenv('GSC');
|
284 |
-
if ($executable)
|
|
|
|
|
285 |
|
286 |
// hope GS in the path
|
287 |
$executable = exec('where gswin*c.exe');
|
288 |
-
if (!empty($executable))
|
|
|
|
|
289 |
|
290 |
// look directly in filesystem
|
291 |
// 64- or 32-bit binary
|
@@ -308,8 +314,9 @@ class DG_Thumber {
|
|
308 |
|
309 |
// GoDaddy and others aren't setup in such a way that
|
310 |
// the above works so we need to fallback to a direct
|
311 |
-
// filesystem check
|
312 |
-
|
|
|
313 |
|
314 |
return $executable;
|
315 |
}
|
275 |
if (is_null($executable)) {
|
276 |
// we must be able to exec()
|
277 |
$executable = self::isExecAvailable();
|
278 |
+
if (!$executable) {
|
279 |
+
return $executable;
|
280 |
+
}
|
281 |
|
282 |
// find on Windows system
|
283 |
if ('WIN' === strtoupper(substr(PHP_OS, 0, 3))) {
|
284 |
// look for environment variable
|
285 |
$executable = getenv('GSC');
|
286 |
+
if ($executable) {
|
287 |
+
return $executable;
|
288 |
+
}
|
289 |
|
290 |
// hope GS in the path
|
291 |
$executable = exec('where gswin*c.exe');
|
292 |
+
if (!empty($executable)) {
|
293 |
+
return $executable;
|
294 |
+
}
|
295 |
|
296 |
// look directly in filesystem
|
297 |
// 64- or 32-bit binary
|
314 |
|
315 |
// GoDaddy and others aren't setup in such a way that
|
316 |
// the above works so we need to fallback to a direct
|
317 |
+
// filesystem check in most common location
|
318 |
+
exec('test -e /usr/bin/gs', $dummy, $ret);
|
319 |
+
$executable = ($ret === 0) ? '/usr/bin/gs' : false;
|
320 |
|
321 |
return $executable;
|
322 |
}
|