NextGEN Gallery – WordPress Gallery Plugin - Version 2.1.9

Version Description

  • 08.25.2015 =
  • NEW: Added ngg_manage_galleries_items_per_page filter
  • NEW: Added ngg_manage_galleries_items_order filter
  • NEW: ngg_manage_galleries_items_orderby
  • Secured: Limit the ability to browse folders outside of NGG_IMPORT_ROOT
Download this release

Release Info

Developer photocrati
Plugin Icon 128x128 NextGEN Gallery – WordPress Gallery Plugin
Version 2.1.9
Comparing to
See all releases

Code changes from version 2.1.7 to 2.1.9

.hg_archival.txt CHANGED
@@ -1,4 +1,4 @@
1
  repo: 2b82bc45fbe039c6f4c9f0c667e9cd1ee4d84cbb
2
- node: b4a06dc685b9d98ae0a082932ef4822be530c429
3
  branch: default
4
- tag: 2.1.7
1
  repo: 2b82bc45fbe039c6f4c9f0c667e9cd1ee4d84cbb
2
+ node: eea6705079b13313be58c29ed93bc36b70a95073
3
  branch: default
4
+ tag: 2.1.9
.hgtags CHANGED
@@ -312,3 +312,5 @@ ca2225de1b2aff836e1fe9d7ff3a0f42820524ce 2.1.2
312
  e60b028280448eca1c164dd54111623c2edc9997 2.1.3
313
  97ec028ec655b132d0426ccb7f14423123ed2f49 2.1.4
314
  9c6f1b018b1503530debfbb579e6917ec9bd4cac 2.1.6
 
 
312
  e60b028280448eca1c164dd54111623c2edc9997 2.1.3
313
  97ec028ec655b132d0426ccb7f14423123ed2f49 2.1.4
314
  9c6f1b018b1503530debfbb579e6917ec9bd4cac 2.1.6
315
+ b4a06dc685b9d98ae0a082932ef4822be530c429 2.1.7
316
+ 1f0097e5ccb465c34be15eeadd3e67d44d19dcf6 2.1.8
changelog.txt CHANGED
@@ -1,6 +1,12 @@
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
 
 
 
 
 
 
4
  = V2.1.7 - 08.12.2015 =
5
  * Changed: "Flush image cache" now removes images from the database w/o a gallery
6
  * Changed: "Show Meta" popup: parse date_format through date_i18n()
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
4
+ = V2.1.9 - 08.25.2015 =
5
+ * NEW: Added ngg_manage_galleries_items_per_page filter
6
+ * NEW: Added ngg_manage_galleries_items_order filter
7
+ * NEW: ngg_manage_galleries_items_orderby
8
+ * Secured: Limit the ability to browse folders outside of NGG_IMPORT_ROOT
9
+
10
  = V2.1.7 - 08.12.2015 =
11
  * Changed: "Flush image cache" now removes images from the database w/o a gallery
12
  * Changed: "Show Meta" popup: parse date_format through date_i18n()
nggallery.php CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
4
  /**
5
  * Plugin Name: NextGEN Gallery by Photocrati
6
  * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 12 million downloads.
7
- * Version: 2.1.7
8
  * Author: Photocrati Media
9
  * Plugin URI: http://www.nextgen-gallery.com
10
  * Author URI: http://www.photocrati.com
@@ -587,7 +587,7 @@ class C_NextGEN_Bootstrap
587
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
588
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
589
  define('NGG_PLUGIN_STARTED_AT', microtime());
590
- define('NGG_PLUGIN_VERSION', '2.1.7');
591
 
592
  if (!defined('NGG_HIDE_STRICT_ERRORS')) {
593
  define('NGG_HIDE_STRICT_ERRORS', TRUE);
4
  /**
5
  * Plugin Name: NextGEN Gallery by Photocrati
6
  * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 12 million downloads.
7
+ * Version: 2.1.9
8
  * Author: Photocrati Media
9
  * Plugin URI: http://www.nextgen-gallery.com
10
  * Author URI: http://www.photocrati.com
587
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
588
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
589
  define('NGG_PLUGIN_STARTED_AT', microtime());
590
+ define('NGG_PLUGIN_VERSION', '2.1.9');
591
 
592
  if (!defined('NGG_HIDE_STRICT_ERRORS')) {
593
  define('NGG_HIDE_STRICT_ERRORS', TRUE);
products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php CHANGED
@@ -154,7 +154,7 @@ class A_NextGen_AddGallery_Ajax extends Mixin
154
  if ($dir = urldecode($this->param('dir'))) {
155
  $fs = C_Fs::get_instance();
156
  $root = $this->get_import_root_abspath();
157
- if ($dir != '.' && $dir != '..') {
158
  $browse_path = $fs->join_paths($root, $dir);
159
  if (@file_exists($browse_path)) {
160
  $files = scandir($browse_path);
154
  if ($dir = urldecode($this->param('dir'))) {
155
  $fs = C_Fs::get_instance();
156
  $root = $this->get_import_root_abspath();
157
+ if (!(strpos($dir, '.') === 0 || strpos($dir, '/.') === 0 || strpos($dir, '\\.') === 0)) {
158
  $browse_path = $fs->join_paths($root, $dir);
159
  if (@file_exists($browse_path)) {
160
  $files = scandir($browse_path);
products/photocrati_nextgen/modules/ngglegacy/admin/manage-galleries.php CHANGED
@@ -10,12 +10,19 @@ function nggallery_manage_gallery_main() {
10
  //Build the pagination for more than 25 galleries
11
  $_GET['paged'] = isset($_GET['paged']) && ($_GET['paged'] > 0) ? absint($_GET['paged']) : 1;
12
 
13
- $items_per_page = 25;
14
 
15
  $start = ( $_GET['paged'] - 1 ) * $items_per_page;
16
 
17
- $order = ( isset ( $_GET['order'] ) && $_GET['order'] == 'desc' ) ? 'DESC' : 'ASC';
18
- $orderby = ( isset ( $_GET['orderby'] ) && ( in_array( $_GET['orderby'], array('gid', 'title', 'author') )) ) ? $_GET['orderby'] : 'gid';
 
 
 
 
 
 
 
19
 
20
  $mapper = C_Gallery_Mapper::get_instance();
21
  $total_number_of_galleries = $mapper->count();
10
  //Build the pagination for more than 25 galleries
11
  $_GET['paged'] = isset($_GET['paged']) && ($_GET['paged'] > 0) ? absint($_GET['paged']) : 1;
12
 
13
+ $items_per_page = apply_filters('ngg_manage_galleries_items_per_page', 25);
14
 
15
  $start = ( $_GET['paged'] - 1 ) * $items_per_page;
16
 
17
+ if (!empty($_GET['order']) && in_array($_GET['order'], array('DESC', 'ASC')))
18
+ $order = $_GET['order'];
19
+ else
20
+ $order = apply_filters('ngg_manage_galleries_items_order', 'ASC');
21
+
22
+ if (!empty($_GET['orderby']) && in_array($_GET['orderby'], array('gid', 'title', 'author')))
23
+ $orderby = $_GET['orderby'];
24
+ else
25
+ $orderby = apply_filters('ngg_manage_galleries_items_orderby', 'gid');
26
 
27
  $mapper = C_Gallery_Mapper::get_instance();
28
  $total_number_of_galleries = $mapper->count();
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: photocrati
3
  Tags: nextgen, nextgen gallery, gallery, galleries, image, images, image gallery, photo, photos, photo gallery, picture, pictures, picture gallery, album, albums, photo albums, image album, media, media gallery, thumbnails, thumbnail gallery, thumbnail galleries, slideshow, slideshows, slideshow gallery, slideshow galleries, fancybox, lightbox, responsive, responsive gallery, responsive galleries, wordpress responsive gallery, nextcellent, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugins, best gallery plugin, free photo gallery, singlepic, image captions imagebrowser, watermarks, watermarking, photography, photographer
4
  Requires at least: 3.6.1
5
- Tested up to: 4.3.0
6
- Stable tag: 2.1.7
7
  License: GPLv2
8
 
9
  The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 13 million downloads.
@@ -199,6 +199,12 @@ For more information, feel free to visit the official website for the NextGEN Ga
199
 
200
  == Changelog ==
201
 
 
 
 
 
 
 
202
  = V2.1.7 - 08.12.2015 =
203
  * Changed: "Flush image cache" now removes images from the database w/o a gallery
204
  * Changed: "Show Meta" popup: parse date_format through date_i18n()
2
  Contributors: photocrati
3
  Tags: nextgen, nextgen gallery, gallery, galleries, image, images, image gallery, photo, photos, photo gallery, picture, pictures, picture gallery, album, albums, photo albums, image album, media, media gallery, thumbnails, thumbnail gallery, thumbnail galleries, slideshow, slideshows, slideshow gallery, slideshow galleries, fancybox, lightbox, responsive, responsive gallery, responsive galleries, wordpress responsive gallery, nextcellent, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugins, best gallery plugin, free photo gallery, singlepic, image captions imagebrowser, watermarks, watermarking, photography, photographer
4
  Requires at least: 3.6.1
5
+ Tested up to: 4.3
6
+ Stable tag: 2.1.9
7
  License: GPLv2
8
 
9
  The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 13 million downloads.
199
 
200
  == Changelog ==
201
 
202
+ = V2.1.9 - 08.25.2015 =
203
+ * NEW: Added ngg_manage_galleries_items_per_page filter
204
+ * NEW: Added ngg_manage_galleries_items_order filter
205
+ * NEW: ngg_manage_galleries_items_orderby
206
+ * Secured: Limit the ability to browse folders outside of NGG_IMPORT_ROOT
207
+
208
  = V2.1.7 - 08.12.2015 =
209
  * Changed: "Flush image cache" now removes images from the database w/o a gallery
210
  * Changed: "Show Meta" popup: parse date_format through date_i18n()