Version Description
- 12.13.2017
- Fixed: Segfaults on PHP 7.2, 7.1.12, and 7.0.26.
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 2.2.30 |
Comparing to | |
See all releases |
Code changes from version 2.2.18 to 2.2.30
- changelog.txt +3 -0
- nggallery.php +8 -8
- pope/lib/class.extensibleobject.php +1 -1
- products/photocrati_nextgen/modules/fs/package.module.fs.php +8 -20
- products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php +1 -1
- products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php +25 -3
- products/photocrati_nextgen/modules/widget/module.widget.php +8 -3
- readme.txt +4 -1
changelog.txt
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
|
|
|
|
|
|
4 |
= V2.2.18 - 12.04.2017 =
|
5 |
* NEW: Include PHP 7.2.0 in the warning created by NextGen Gallery 2.2.16
|
6 |
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
4 |
+
= V2.2.30 - 12.13.2017
|
5 |
+
* Fixed: Segfaults on PHP 7.2, 7.1.12, and 7.0.26.
|
6 |
+
|
7 |
= V2.2.18 - 12.04.2017 =
|
8 |
* NEW: Include PHP 7.2.0 in the warning created by NextGen Gallery 2.2.16
|
9 |
|
nggallery.php
CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 18 million downloads.
|
7 |
-
* Version: 2.2.
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
@@ -141,7 +141,7 @@ class C_NextGEN_Bootstrap
|
|
141 |
public function php_version_incompatible()
|
142 |
{ ?>
|
143 |
<div class="notice notice-error is-dismissible">
|
144 |
-
<p><?php print __('We’ve detected you are running PHP versions 7.0.26
|
145 |
</div>
|
146 |
<?php
|
147 |
}
|
@@ -151,11 +151,11 @@ class C_NextGEN_Bootstrap
|
|
151 |
// PHP versions 7.1.12, 7.0.26, and the 7.2-RC come with a bug that NextGen Gallery cannot workaround
|
152 |
// see: https://bugs.php.net/bug.php?id=75573
|
153 |
// Additionally 7.2.0 has an issue with NextGen's activation
|
154 |
-
if (PHP_VERSION_ID === 70112 || PHP_VERSION_ID === 70026
|
155 |
-
{
|
156 |
-
add_action('admin_notices', array($this, 'php_version_incompatible'));
|
157 |
-
return;
|
158 |
-
}
|
159 |
|
160 |
set_exception_handler(__CLASS__.'::shutdown');
|
161 |
|
@@ -661,7 +661,7 @@ class C_NextGEN_Bootstrap
|
|
661 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
662 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
663 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
664 |
-
define('NGG_PLUGIN_VERSION', '2.2.
|
665 |
|
666 |
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
|
667 |
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 18 million downloads.
|
7 |
+
* Version: 2.2.30
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
141 |
public function php_version_incompatible()
|
142 |
{ ?>
|
143 |
<div class="notice notice-error is-dismissible">
|
144 |
+
<p><?php print __('We’ve detected you are running PHP versions 7.0.26 or 7.1.12. These versions of PHP have a bug that breaks NextGEN Gallery and causes server crashes in certain conditions. To protect your site, NextGEN Gallery will not load. We recommend asking your host to roll back to an earlier version of PHP. For details on the PHP bug, see: <a target="_blank" href="https://bugs.php.net/bug.php?id=75573">bugs.php.net/bug.php?id=75573</a>', 'nggallery'); ?></p>
|
145 |
</div>
|
146 |
<?php
|
147 |
}
|
151 |
// PHP versions 7.1.12, 7.0.26, and the 7.2-RC come with a bug that NextGen Gallery cannot workaround
|
152 |
// see: https://bugs.php.net/bug.php?id=75573
|
153 |
// Additionally 7.2.0 has an issue with NextGen's activation
|
154 |
+
// if (PHP_VERSION_ID === 70112 || PHP_VERSION_ID === 70026)
|
155 |
+
// {
|
156 |
+
// add_action('admin_notices', array($this, 'php_version_incompatible'));
|
157 |
+
// return;
|
158 |
+
// }
|
159 |
|
160 |
set_exception_handler(__CLASS__.'::shutdown');
|
161 |
|
661 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
662 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
663 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
664 |
+
define('NGG_PLUGIN_VERSION', '2.2.30');
|
665 |
|
666 |
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
|
667 |
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
|
pope/lib/class.extensibleobject.php
CHANGED
@@ -837,4 +837,4 @@ class Mixin extends PopeHelpers
|
|
837 |
{
|
838 |
return $this->object->$property;
|
839 |
}
|
840 |
-
}
|
837 |
{
|
838 |
return $this->object->$property;
|
839 |
}
|
840 |
+
}
|
products/photocrati_nextgen/modules/fs/package.module.fs.php
CHANGED
@@ -252,30 +252,18 @@ class Mixin_Fs_Instance_Methods extends Mixin
|
|
252 |
foreach ($segments as $segment) {
|
253 |
$segment = trim($segment, "/\\");
|
254 |
$pieces = array_values(preg_split('#[/\\\\]#', $segment));
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
$two = array_search($val, $pieces);
|
262 |
-
$one = FALSE === $one ? 0 : count($one) + 1;
|
263 |
-
$two = FALSE === $two ? 0 : count($two) + 1;
|
264 |
-
if (!empty($protocol)) {
|
265 |
-
$existing_val = isset($retval[$ndx]) ? $retval[$ndx] : NULL;
|
266 |
-
if ($existing_val !== $val || $two >= $one) {
|
267 |
-
$retval[] = $val;
|
268 |
-
}
|
269 |
} else {
|
270 |
-
$
|
271 |
-
if ($existing_val !== $val && $two >= $one) {
|
272 |
-
$retval[] = $val;
|
273 |
-
}
|
274 |
}
|
275 |
}
|
276 |
}
|
277 |
-
//
|
278 |
-
$retval = implode(DIRECTORY_SEPARATOR, $retval);
|
279 |
if (strpos($retval, $this->get_document_root()) !== 0 && strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
|
280 |
$retval = DIRECTORY_SEPARATOR . trim($retval, "/\\");
|
281 |
}
|
252 |
foreach ($segments as $segment) {
|
253 |
$segment = trim($segment, "/\\");
|
254 |
$pieces = array_values(preg_split('#[/\\\\]#', $segment));
|
255 |
+
$segment = join(DIRECTORY_SEPARATOR, $pieces);
|
256 |
+
if (!$retval) {
|
257 |
+
$retval = $segment;
|
258 |
+
} else {
|
259 |
+
if (strpos($segment, $retval) !== FALSE) {
|
260 |
+
$retval = $segment;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
} else {
|
262 |
+
$retval = $retval . DIRECTORY_SEPARATOR . $segment;
|
|
|
|
|
|
|
263 |
}
|
264 |
}
|
265 |
}
|
266 |
+
// $retval = join(DIRECTORY_SEPARATOR, $retval);
|
|
|
267 |
if (strpos($retval, $this->get_document_root()) !== 0 && strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
|
268 |
$retval = DIRECTORY_SEPARATOR . trim($retval, "/\\");
|
269 |
}
|
products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php
CHANGED
@@ -101,6 +101,7 @@ class M_NextGen_Admin extends C_Base_Module
|
|
101 |
{
|
102 |
// Register scripts
|
103 |
add_action('init', array($this, 'register_scripts'), 9);
|
|
|
104 |
|
105 |
// Provides menu options for managing NextGEN Settings
|
106 |
add_action('admin_menu', array($this, 'add_menu_pages'), 999);
|
@@ -496,7 +497,6 @@ class M_NextGen_Admin extends C_Base_Module
|
|
496 |
|
497 |
function initialize()
|
498 |
{
|
499 |
-
$this->init_wizards();
|
500 |
}
|
501 |
|
502 |
/**
|
101 |
{
|
102 |
// Register scripts
|
103 |
add_action('init', array($this, 'register_scripts'), 9);
|
104 |
+
add_action('init', array($this, 'init_wizards'), 5);
|
105 |
|
106 |
// Provides menu options for managing NextGEN Settings
|
107 |
add_action('admin_menu', array($this, 'add_menu_pages'), 999);
|
497 |
|
498 |
function initialize()
|
499 |
{
|
|
|
500 |
}
|
501 |
|
502 |
/**
|
products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php
CHANGED
@@ -170,6 +170,7 @@ class A_Gallery_Display_View extends Mixin
|
|
170 |
class C_Display_Type extends C_DataMapper_Model
|
171 |
{
|
172 |
var $_mapper_interface = 'I_Display_Type_Mapper';
|
|
|
173 |
function define($properties = array(), $mapper = FALSE, $context = FALSE)
|
174 |
{
|
175 |
parent::define($mapper, $properties, $context);
|
@@ -200,13 +201,34 @@ class C_Display_Type extends C_DataMapper_Model
|
|
200 |
*/
|
201 |
function &__get($property)
|
202 |
{
|
203 |
-
if (
|
204 |
-
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
206 |
} else {
|
207 |
return parent::__get($property);
|
208 |
}
|
209 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
class Mixin_Display_Type_Validation extends Mixin
|
212 |
{
|
170 |
class C_Display_Type extends C_DataMapper_Model
|
171 |
{
|
172 |
var $_mapper_interface = 'I_Display_Type_Mapper';
|
173 |
+
var $__settings = array();
|
174 |
function define($properties = array(), $mapper = FALSE, $context = FALSE)
|
175 |
{
|
176 |
parent::define($mapper, $properties, $context);
|
201 |
*/
|
202 |
function &__get($property)
|
203 |
{
|
204 |
+
if ($property == 'settings') {
|
205 |
+
if (isset($this->_stdObject->settings)) {
|
206 |
+
//$this->__settings = array_merge($this->_stdObject->settings, $this->__settings);
|
207 |
+
}
|
208 |
+
return $this->_stdObject->settings;
|
209 |
+
}
|
210 |
+
if (isset($this->_stdObject->settings[$property]) && $this->_stdObject->settings[$property] != NULL) {
|
211 |
+
return $this->_stdObject->settings[$property];
|
212 |
} else {
|
213 |
return parent::__get($property);
|
214 |
}
|
215 |
}
|
216 |
+
function &__set($property, $value)
|
217 |
+
{
|
218 |
+
if ($property == 'settings') {
|
219 |
+
$retval = $this->_stdObject->settings = $value;
|
220 |
+
} else {
|
221 |
+
$retval = $this->_stdObject->settings[$property] = $value;
|
222 |
+
}
|
223 |
+
return $retval;
|
224 |
+
}
|
225 |
+
function __isset($property_name)
|
226 |
+
{
|
227 |
+
if ($property_name == 'settings') {
|
228 |
+
return isset($this->_stdObject->settings);
|
229 |
+
}
|
230 |
+
return isset($this->_stdObject->settings[$property_name]) || parent::__isset($property_name);
|
231 |
+
}
|
232 |
}
|
233 |
class Mixin_Display_Type_Validation extends Mixin
|
234 |
{
|
products/photocrati_nextgen/modules/widget/module.widget.php
CHANGED
@@ -37,9 +37,14 @@ class M_Widget extends C_Base_Module
|
|
37 |
*/
|
38 |
function _register_hooks()
|
39 |
{
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
function get_type_list()
|
37 |
*/
|
38 |
function _register_hooks()
|
39 |
{
|
40 |
+
add_action('widgets_init', array($this, 'register_widgets'));
|
41 |
+
}
|
42 |
+
|
43 |
+
function register_widgets()
|
44 |
+
{
|
45 |
+
register_widget("C_Widget_Gallery");
|
46 |
+
register_widget("C_Widget_MediaRSS");
|
47 |
+
register_widget("C_Widget_Slideshow");
|
48 |
}
|
49 |
|
50 |
function get_type_list()
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
-
Stable tag: 2.2.
|
6 |
Tested up to: 4.9.1
|
7 |
License: GPLv2
|
8 |
|
@@ -187,6 +187,9 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
190 |
= V2.2.18 - 12.04.2017 =
|
191 |
* NEW: Include PHP 7.2.0 in the warning created by NextGen Gallery 2.2.16
|
192 |
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
+
Stable tag: 2.2.30
|
6 |
Tested up to: 4.9.1
|
7 |
License: GPLv2
|
8 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= V2.2.30 - 12.13.2017
|
191 |
+
* Fixed: Segfaults on PHP 7.2, 7.1.12, and 7.0.26.
|
192 |
+
|
193 |
= V2.2.18 - 12.04.2017 =
|
194 |
* NEW: Include PHP 7.2.0 in the warning created by NextGen Gallery 2.2.16
|
195 |
|