Document Gallery - Version 4.1.13

Version Description

  • Enhancement: HostGator users were noticing an issue where HTTP connection failures would show up while Document Gallery was enabled. This resulted in symptoms like not being able to update plugins. This release modifies behavior to try and bypass this HostGator shortcoming. Work is still being done working with HostGator to try and identify a more complete resolution.
Download this release

Release Info

Developer dan.rossiter
Plugin Icon 128x128 Document Gallery
Version 4.1.13
Comparing to
See all releases

Code changes from version 4.1.12 to 4.1.13

CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
  # Changelog
2
 
 
 
 
 
 
 
3
  ## 4.1.12
4
  * **Bug Fix:** Resolves issues where the visual editor gallery preview was missing for a small subset of shortcode types.
5
 
1
  # Changelog
2
 
3
+ ## 4.1.13
4
+ * **Enhancement:** HostGator users were noticing an issue where HTTP connection failures would show up while Document
5
+ Gallery was enabled. This resulted in symptoms like not being able to update plugins. This release modifies behavior
6
+ to try and bypass this HostGator shortcoming. Work is still being done working with HostGator to try and identify
7
+ a more complete resolution.
8
+
9
  ## 4.1.12
10
  * **Bug Fix:** Resolves issues where the visual editor gallery preview was missing for a small subset of shortcode types.
11
 
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&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 4.1
6
  Tested up to: 4.4
7
- Stable tag: 4.1.12
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -422,6 +422,12 @@ 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.1.12 =
426
  * **Bug Fix:** Resolves issues where the visual editor gallery preview was missing for a small subset of shortcode types.
427
 
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&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 4.1
6
  Tested up to: 4.4
7
+ Stable tag: 4.1.13
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.1.13 =
426
+ * **Enhancement:** HostGator users were noticing an issue where HTTP connection failures would show up while Document
427
+ Gallery was enabled. This resulted in symptoms like not being able to update plugins. This release modifies behavior
428
+ to try and bypass this HostGator shortcoming. Work is still being done working with HostGator to try and identify
429
+ a more complete resolution.
430
+
431
  = 4.1.12 =
432
  * **Bug Fix:** Resolves issues where the visual editor gallery preview was missing for a small subset of shortcode types.
433
 
admin/tabs/thumber-co-tab.php CHANGED
@@ -120,7 +120,12 @@ function dg_render_thumber_co_section() { ?>
120
  <?php if ( ! DG_Util::isPublicSite() ) : ?>
121
  <p>
122
  <em><?php _e( 'NOTE: It appears that you are on a private server not accessible from outside your local network. ' .
123
- 'Thumber.co must be able to access your site in order for thumbnail conversions to work properly.', 'document-gallery' ); ?></em>
 
 
 
 
 
124
  </p>
125
  <?php endif; ?>
126
  <?php }
120
  <?php if ( ! DG_Util::isPublicSite() ) : ?>
121
  <p>
122
  <em><?php _e( 'NOTE: It appears that you are on a private server not accessible from outside your local network. ' .
123
+ 'Thumber must be able to access your site in order for thumbnail conversions to work properly.', 'document-gallery' ); ?></em>
124
+ </p>
125
+ <?php endif; ?>
126
+ <?php if ( !in_array( 'sha256', hash_algos() ) ) : ?>
127
+ <p>
128
+ <em><?php _e( 'NOTE: Your server does not support SHA-256 hashing. You will not be able to communicate with Thumber.', 'document-gallery' ); ?></em>
129
  </p>
130
  <?php endif; ?>
131
  <?php }
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: 4.1.12
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.1.12' );
16
 
17
  if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
18
  add_action( 'admin_notices', 'dg_php_lt_three' );
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: 4.1.13
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.1.13' );
16
 
17
  if ( version_compare( PHP_VERSION, '5.3', '<' ) ) {
18
  add_action( 'admin_notices', 'dg_php_lt_three' );
inc/thumbers/class-imagick-thumber.php CHANGED
@@ -16,21 +16,30 @@ class DG_ImagickThumber extends DG_AbstractThumber {
16
  public static function init() {
17
  $options = DG_Thumber::getOptions();
18
  $active = $options['active'];
19
- if ( $active['imagick'] && self::isImagickAvailable() ) {
20
  parent::init();
 
 
21
 
22
- if ( !(self::$file_formats = DG_Image_Editor_Imagick::query_formats()) ) {
23
- self::$file_formats = array();
24
- }
25
- $image_exts = array( 'jpg', 'jpeg', 'gif', 'png' );
26
- self::$file_formats = array_map( 'strtolower', array_diff( self::$file_formats, $image_exts ) );
 
27
  }
 
 
28
  }
29
 
30
  /**
31
  * @return string[] The extensions supported by this thumber.
32
  */
33
  protected function getThumberExtensions() {
 
 
 
 
34
  return self::$file_formats;
35
  }
36
 
@@ -86,8 +95,7 @@ class DG_ImagickThumber extends DG_AbstractThumber {
86
  /**
87
  * @return int An integer from 0 to 100. Higher priorities will be attempted before lower priority thumbers.
88
  */
89
- public function getPriority()
90
- {
91
  return 50;
92
  }
93
  }
16
  public static function init() {
17
  $options = DG_Thumber::getOptions();
18
  $active = $options['active'];
19
+ if ( $active['imagick'] ) {
20
  parent::init();
21
+ }
22
+ }
23
 
24
+ /**
25
+ * Initialize file formats supported by IMagick.
26
+ */
27
+ private static function initFileFormats() {
28
+ if ( ! self::isImagickAvailable() || !(self::$file_formats = DG_Image_Editor_Imagick::query_formats()) ) {
29
+ self::$file_formats = array();
30
  }
31
+ $image_exts = array( 'jpg', 'jpeg', 'gif', 'png' );
32
+ self::$file_formats = array_map( 'strtolower', array_diff( self::$file_formats, $image_exts ) );
33
  }
34
 
35
  /**
36
  * @return string[] The extensions supported by this thumber.
37
  */
38
  protected function getThumberExtensions() {
39
+ if ( ! isset( self::$file_formats ) ) {
40
+ self::initFileFormats();
41
+ }
42
+
43
  return self::$file_formats;
44
  }
45
 
95
  /**
96
  * @return int An integer from 0 to 100. Higher priorities will be attempted before lower priority thumbers.
97
  */
98
+ public function getPriority() {
 
99
  return 50;
100
  }
101
  }