NextGEN Gallery – WordPress Gallery Plugin - Version 2.2.12

Version Description

  • 08.01.2017 =
  • Secured: Disabled Flash backend in plupload
  • Changed: Upgraded PHP-Parser version used when building plugin zips
  • Changed: Added DESC as an option to nggTags::find_images_for_tags()
  • Fixed: Fixed useage of parse_str for PHP 7 (thanks Bodo Graumann)
  • Fixed: Made transients manager flush only expired transients
  • Fixed: Compatibility with Spider Calendar
  • Fixed: Problem with validation code of DataMapper Models
  • Fixed: Convert script/style urls to arrays in the lightbox installer
Download this release

Release Info

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

Code changes from version 2.2.10 to 2.2.12

Files changed (21) hide show
  1. changelog.txt +10 -0
  2. nggallery.php +13 -6
  3. non_pope/class.photocrati_transient_manager.php +84 -19
  4. products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php +29 -25
  5. products/photocrati_nextgen/modules/i18n/lang/nggallery-sv_SE.mo +0 -0
  6. products/photocrati_nextgen/modules/i18n/lang/nggallery-sv_SE.po +2 -6
  7. products/photocrati_nextgen/modules/i18n/lang/nggallery.po +4 -8
  8. products/photocrati_nextgen/modules/lightbox/package.module.lightbox.php +15 -2
  9. products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php +1 -1
  10. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload-2.1.1/Moxie.swf +0 -0
  11. products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php +1 -0
  12. products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php +53 -1
  13. products/photocrati_nextgen/modules/ngglegacy/admin/album.php +8 -8
  14. products/photocrati_nextgen/modules/ngglegacy/admin/manage.php +2 -2
  15. products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php +2 -2
  16. products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php +2 -2
  17. products/photocrati_nextgen/modules/ngglegacy/lib/tags.php +26 -20
  18. products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php +12 -0
  19. products/photocrati_nextgen/modules/validation/package.module.validation.php +1 -1
  20. products/photocrati_nextgen/modules/widget/package.module.widget.php +14 -1
  21. readme.txt +12 -2
changelog.txt CHANGED
@@ -1,6 +1,16 @@
1
  NextGEN Gallery
2
  by Imagely
3
 
 
 
 
 
 
 
 
 
 
 
4
  = V2.2.10 - 06.14.2017 =
5
  * Fixed: Ensure that the plugin works when PHP isn't compiled against libxml
6
 
1
  NextGEN Gallery
2
  by Imagely
3
 
4
+ = V2.2.12 - 08.01.2017 =
5
+ * Secured: Disabled Flash backend in plupload
6
+ * Changed: Upgraded PHP-Parser version used when building plugin zips
7
+ * Changed: Added DESC as an option to nggTags::find_images_for_tags()
8
+ * Fixed: Fixed useage of parse_str for PHP 7 (thanks Bodo Graumann)
9
+ * Fixed: Made transients manager flush only expired transients
10
+ * Fixed: Compatibility with Spider Calendar
11
+ * Fixed: Problem with validation code of DataMapper Models
12
+ * Fixed: Convert script/style urls to arrays in the lightbox installer
13
+
14
  = V2.2.10 - 06.14.2017 =
15
  * Fixed: Ensure that the plugin works when PHP isn't compiled against libxml
16
 
nggallery.php CHANGED
@@ -3,8 +3,8 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
3
 
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 17 million downloads.
7
- * Version: 2.2.10
8
  * Author: Imagely
9
  * Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
10
  * Author URI: https://www.imagely.com
@@ -178,11 +178,18 @@ class C_NextGEN_Bootstrap
178
  // Load caching component
179
  include_once('non_pope/class.photocrati_transient_manager.php');
180
 
181
- if (isset($_REQUEST['ngg_flush']) OR isset($_REQUEST['ngg_flush_expired'])) {
 
182
  C_Photocrati_Transient_Manager::flush();
183
  die("Flushed all caches");
184
  }
185
 
 
 
 
 
 
 
186
  // Load Settings Manager
187
  include_once('non_pope/class.photocrati_settings_manager.php');
188
  include_once('non_pope/class.nextgen_settings.php');
@@ -385,7 +392,7 @@ class C_NextGEN_Bootstrap
385
  // Delete displayed gallery transients periodically
386
  if (NGG_CRON_ENABLED) {
387
  add_filter('cron_schedules', array(&$this, 'add_ngg_schedule'));
388
- add_action('ngg_delete_expired_transients', array(&$this, 'delete_expired_transients'));
389
  add_action('wp', array(&$this, 'schedule_cron_jobs'));
390
  }
391
 
@@ -494,7 +501,7 @@ class C_NextGEN_Bootstrap
494
  */
495
  function delete_expired_transients()
496
  {
497
- C_Photocrati_Transient_Manager::flush();
498
  }
499
 
500
  /**
@@ -637,7 +644,7 @@ class C_NextGEN_Bootstrap
637
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
638
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
639
  define('NGG_PLUGIN_STARTED_AT', microtime());
640
- define('NGG_PLUGIN_VERSION', '2.2.10');
641
 
642
  if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
643
  define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
3
 
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.12
8
  * Author: Imagely
9
  * Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
10
  * Author URI: https://www.imagely.com
178
  // Load caching component
179
  include_once('non_pope/class.photocrati_transient_manager.php');
180
 
181
+ if (isset($_REQUEST['ngg_flush']))
182
+ {
183
  C_Photocrati_Transient_Manager::flush();
184
  die("Flushed all caches");
185
  }
186
 
187
+ if (isset($_REQUEST['ngg_flush_expired']))
188
+ {
189
+ C_Photocrati_Transient_Manager::get_instance()->flush_expired();
190
+ die("Flushed all expired caches");
191
+ }
192
+
193
  // Load Settings Manager
194
  include_once('non_pope/class.photocrati_settings_manager.php');
195
  include_once('non_pope/class.nextgen_settings.php');
392
  // Delete displayed gallery transients periodically
393
  if (NGG_CRON_ENABLED) {
394
  add_filter('cron_schedules', array(&$this, 'add_ngg_schedule'));
395
+ add_action('ngg_delete_expired_transients', array($this, 'delete_expired_transients'));
396
  add_action('wp', array(&$this, 'schedule_cron_jobs'));
397
  }
398
 
501
  */
502
  function delete_expired_transients()
503
  {
504
+ C_Photocrati_Transient_Manager::get_instance()->flush_expired();
505
  }
506
 
507
  /**
644
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
645
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
646
  define('NGG_PLUGIN_STARTED_AT', microtime());
647
+ define('NGG_PLUGIN_VERSION', '2.2.12');
648
 
649
  if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
650
  define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
non_pope/class.photocrati_transient_manager.php CHANGED
@@ -106,65 +106,130 @@ class C_Photocrati_Transient_Manager
106
  function _track_key($key)
107
  {
108
  global $_wp_using_ext_object_cache;
109
- if ($_wp_using_ext_object_cache) {
 
110
  $parts = explode('__', $key);
111
  $group = $parts[0];
112
  $id = $parts[1];
113
- if (!isset($this->_tracker[$group])) $this->_tracker[$group] = array();
 
114
  $this->_tracker[$group][] = $id;
115
  }
116
  }
117
 
118
- function set($key, $value, $ttl=0)
119
  {
120
  $retval = FALSE;
121
  $enabled = TRUE;
122
- if (defined('PHOTOCRATI_CACHE')) $enabled = PHOTOCRATI_CACHE;
123
- if (defined('PHOTOCRATI_CACHE_TTL') && !$ttl) $ttl = PHOTOCRATI_CACHE_TTL;
124
- if ($enabled) {
 
 
 
 
 
125
  $retval = set_transient($key, json_encode($value), $ttl);
126
- if ($retval) $this->_track_key($key);
 
127
  }
128
 
129
  return $retval;
130
  }
131
 
132
- function delete($key)
133
  {
134
  return delete_transient($key);
135
  }
136
 
137
- function clear($group=NULL)
 
 
 
 
 
 
138
  {
 
 
 
139
  if (is_string($group) && !empty($group))
140
  {
141
  global $wpdb;
142
- // Note: The wildcard % matches any number of characters, _ matches a single character and should be escaped
143
- $query = "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_transient%' AND option_name LIKE '%{$this->get_group_id($group)}\_\_%'";
144
- $wpdb->query($query);
145
- $this->delete_tracked($group);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  }
147
  else foreach ($this->_groups as $name => $params) {
148
- $this->clear($name);
149
  }
150
  }
151
 
152
- static function update($key, $value, $ttl=NULL)
153
  {
154
  return self::get_instance()->set($key, $value, $ttl);
155
  }
156
 
157
- static function fetch($key, $default=NULL)
158
  {
159
  return self::get_instance()->get($key, $default);
160
  }
161
 
162
- static function flush($group=NULL)
163
  {
164
- return self::get_instance()->clear($group);
165
  }
166
 
167
- static function create_key($group, $params=array())
 
 
 
 
 
168
  {
169
  return self::get_instance()->generate_key($group, $params);
170
  }
106
  function _track_key($key)
107
  {
108
  global $_wp_using_ext_object_cache;
109
+ if ($_wp_using_ext_object_cache)
110
+ {
111
  $parts = explode('__', $key);
112
  $group = $parts[0];
113
  $id = $parts[1];
114
+ if (!isset($this->_tracker[$group]))
115
+ $this->_tracker[$group] = array();
116
  $this->_tracker[$group][] = $id;
117
  }
118
  }
119
 
120
+ public function set($key, $value, $ttl=0)
121
  {
122
  $retval = FALSE;
123
  $enabled = TRUE;
124
+
125
+ if (defined('PHOTOCRATI_CACHE'))
126
+ $enabled = PHOTOCRATI_CACHE;
127
+ if (defined('PHOTOCRATI_CACHE_TTL')
128
+ && !$ttl) $ttl = PHOTOCRATI_CACHE_TTL;
129
+
130
+ if ($enabled)
131
+ {
132
  $retval = set_transient($key, json_encode($value), $ttl);
133
+ if ($retval)
134
+ $this->_track_key($key);
135
  }
136
 
137
  return $retval;
138
  }
139
 
140
+ public function delete($key)
141
  {
142
  return delete_transient($key);
143
  }
144
 
145
+ /**
146
+ * Clears all (or only expired) transients managed by this utility
147
+ *
148
+ * @param string $group Group name to purge
149
+ * @param bool $expired Whether to clear all transients (FALSE) or to clear expired transients (TRUE)
150
+ */
151
+ public function clear($group = NULL, $expired = FALSE)
152
  {
153
+ if ($group === '__counter')
154
+ return;
155
+
156
  if (is_string($group) && !empty($group))
157
  {
158
  global $wpdb;
159
+
160
+ // A little query building is necessary here..
161
+ // Clear transients for "the" site or for the current multisite instance
162
+ $expired_sql = '';
163
+ $params = array($wpdb->esc_like('_transient_') . '%',
164
+ '%' . $wpdb->esc_like("{$this->get_group_id($group)}__") . '%',
165
+ $wpdb->esc_like('_transient_timeout_') . '%');
166
+ if ($expired)
167
+ {
168
+ $params[] = time();
169
+ $expired_sql = $expired ? "AND b.option_value < %d" : '';
170
+ }
171
+
172
+ $sql = "DELETE a, b
173
+ FROM {$wpdb->options} a, {$wpdb->options} b
174
+ WHERE a.option_name LIKE %s
175
+ AND a.option_name LIKE %s
176
+ AND a.option_name NOT LIKE %s
177
+ AND b.option_name = CONCAT('_transient_timeout_', SUBSTRING(a.option_name, 12))
178
+ {$expired_sql}";
179
+
180
+ $wpdb->query($wpdb->prepare($sql, $params));
181
+
182
+ // Clear transients for the main site of a multisite network
183
+ if (is_main_site() && is_main_network())
184
+ {
185
+ $expired_sql = '';
186
+ $params = array($wpdb->esc_like('_site_transient_') . '%',
187
+ '%' . $wpdb->esc_like("{$this->get_group_id($group)}__") . '%',
188
+ $wpdb->esc_like('_site_transient_timeout_') . '%');
189
+ if ($expired)
190
+ {
191
+ $params[] = time();
192
+ $expired_sql = $expired ? "AND b.option_value < %d" : '';
193
+ }
194
+ $sql = "DELETE a, b
195
+ FROM {$wpdb->options} a, {$wpdb->options} b
196
+ WHERE a.option_name LIKE %s
197
+ AND a.option_name LIKE %s
198
+ AND a.option_name NOT LIKE %s
199
+ AND b.option_name = CONCAT('_site_transient_timeout_', SUBSTRING(a.option_name, 17))
200
+ {$expired_sql}";
201
+ $wpdb->query($wpdb->prepare($sql, $params));
202
+ }
203
+
204
+ if ($expired)
205
+ $this->delete_tracked($group);
206
  }
207
  else foreach ($this->_groups as $name => $params) {
208
+ $this->clear($name, $expired);
209
  }
210
  }
211
 
212
+ public static function update($key, $value, $ttl=NULL)
213
  {
214
  return self::get_instance()->set($key, $value, $ttl);
215
  }
216
 
217
+ public static function fetch($key, $default=NULL)
218
  {
219
  return self::get_instance()->get($key, $default);
220
  }
221
 
222
+ public static function flush($group = NULL)
223
  {
224
+ self::get_instance()->clear($group);
225
  }
226
 
227
+ public static function flush_expired($group = NULL)
228
+ {
229
+ self::get_instance()->clear($group, TRUE);
230
+ }
231
+
232
+ public static function create_key($group, $params=array())
233
  {
234
  return self::get_instance()->generate_key($group, $params);
235
  }
products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php CHANGED
@@ -257,33 +257,37 @@ class C_Attach_Controller extends C_NextGen_Admin_Page_Controller
257
  add_action('wp_print_scripts', array($this, '_handle_scripts'), 9999);
258
  }
259
  }
260
- function _handle_scripts()
261
  {
262
- if (is_admin() && $this->_is_rendering) {
263
- global $wp_scripts;
264
- $queue = $wp_scripts->queue;
265
- $marked = $this->_marked_scripts;
266
- foreach ($marked as $tag => $value) {
267
- $this->_handle_script($tag, $queue);
268
- }
269
- foreach ($queue as $extra) {
270
- wp_dequeue_script($extra);
271
  }
272
  }
 
273
  }
274
- function _handle_script($tag, &$queue)
275
  {
276
- global $wp_scripts;
277
- $registered = $wp_scripts->registered;
278
- $idx = array_search($tag, $queue);
279
- if ($idx !== false) {
280
- unset($queue[$idx]);
281
- }
282
- if (isset($registered[$tag])) {
283
- $script = $registered[$tag];
284
- if ($script->deps) {
285
- foreach ($script->deps as $dep) {
286
- $this->_handle_script($dep, $queue);
 
 
 
287
  }
288
  }
289
  }
@@ -311,9 +315,9 @@ class Mixin_Attach_To_Post extends Mixin
311
  $this->object->_displayed_gallery = $mapper->create();
312
  }
313
  }
314
- function mark_script($script_tag)
315
  {
316
- $this->object->_marked_scripts[$script_tag] = true;
317
  }
318
  function enqueue_display_tab_js()
319
  {
@@ -356,7 +360,7 @@ class Mixin_Attach_To_Post extends Mixin
356
  usort($display_types, array($this->object, '_display_type_list_sort'));
357
  wp_enqueue_script('ngg_display_tab', $this->get_static_url('photocrati-attach_to_post#display_tab.js'), array('jquery', 'backbone', 'underscore.string', 'photocrati_ajax'));
358
  $this->object->mark_script('ngg_display_tab');
359
- wp_localize_script('ngg_display_tab', 'igw_data', array('displayed_gallery_preview_url' => $settings->gallery_preview_url, 'displayed_gallery' => $this->object->_displayed_gallery->get_entity(), 'sources' => $sources->get_all(), 'gallery_primary_key' => $gallery_mapper->get_primary_key_column(), 'galleries' => $gallery_mapper->find_all(), 'albums' => $album_mapper->find_all(), 'tags' => $tags, 'display_types' => $display_types, 'sec_token' => $security->get_request_token('nextgen_edit_displayed_gallery')->get_json(), 'image_primary_key' => $image_mapper->get_primary_key_column(), 'display_type_priority_base' => NGG_DISPLAY_PRIORITY_BASE, 'display_type_priority_step' => NGG_DISPLAY_PRIORITY_STEP, 'shortcode_ref' => isset($_REQUEST['ref']) ? floatval($_REQUEST['ref']) : null, 'i18n' => array('sources' => __('Sources', 'nggallery'), 'optional' => __('(optional)', 'nggallery'), 'slug_tooltip' => __('Sets an SEO-friendly name to this gallery for URLs. Currently only in use by the Pro Lightbox', 'nggallery'), 'slug_label' => __('Slug', 'nggallery'), 'no_entities' => __('No entities to display for this source', 'nggallery'), 'exclude_question' => __('Exlude?', 'nggallery'), 'select_gallery' => __('Select a gallery', 'nggallery'), 'galleries' => __('Galleries', 'nggallery'), 'albums' => __('Albums', 'nggallery'))));
360
  }
361
  function enqueue_backend_resources()
362
  {
257
  add_action('wp_print_scripts', array($this, '_handle_scripts'), 9999);
258
  }
259
  }
260
+ function get_script_dependencies($handle)
261
  {
262
+ $retval = array();
263
+ global $wp_scripts;
264
+ if (($index = array_search($handle, $wp_scripts->registered)) !== FALSE) {
265
+ $registered_script = $wp_scripts->registered[$index];
266
+ if ($registered_script->deps) {
267
+ foreach ($registered_script->deps as $dep) {
268
+ $retval[] = $dep;
269
+ $retval = array_merge($retval, $this->get_script_dependencies($handle));
270
+ }
271
  }
272
  }
273
+ return $retval;
274
  }
275
+ function get_marked_scripts()
276
  {
277
+ $retval = $this->_marked_scripts;
278
+ foreach ($this->_marked_scripts as $handle) {
279
+ $retval = array_merge($retval, $this->get_script_dependencies($handle));
280
+ }
281
+ return array_unique($retval);
282
+ }
283
+ function _handle_scripts()
284
+ {
285
+ if (M_Attach_To_Post::is_atp_url()) {
286
+ global $wp_scripts;
287
+ $marked_scripts = $this->get_marked_scripts();
288
+ foreach ($wp_scripts->queue as $handle) {
289
+ if (array_search($handle, $marked_scripts) === FALSE) {
290
+ wp_dequeue_script($handle);
291
  }
292
  }
293
  }
315
  $this->object->_displayed_gallery = $mapper->create();
316
  }
317
  }
318
+ function mark_script($handle)
319
  {
320
+ $this->object->_marked_scripts[] = $handle;
321
  }
322
  function enqueue_display_tab_js()
323
  {
360
  usort($display_types, array($this->object, '_display_type_list_sort'));
361
  wp_enqueue_script('ngg_display_tab', $this->get_static_url('photocrati-attach_to_post#display_tab.js'), array('jquery', 'backbone', 'underscore.string', 'photocrati_ajax'));
362
  $this->object->mark_script('ngg_display_tab');
363
+ wp_localize_script('ngg_display_tab', 'igw_data', array('displayed_gallery_preview_url' => $settings->gallery_preview_url, 'displayed_gallery' => $this->object->_displayed_gallery->get_entity(), 'sources' => $sources->get_all(), 'gallery_primary_key' => $gallery_mapper->get_primary_key_column(), 'galleries' => $gallery_mapper->find_all(), 'albums' => $album_mapper->find_all(), 'tags' => $tags, 'display_types' => $display_types, 'sec_token' => $security->get_request_token('nextgen_edit_displayed_gallery')->get_json(), 'image_primary_key' => $image_mapper->get_primary_key_column(), 'display_type_priority_base' => NGG_DISPLAY_PRIORITY_BASE, 'display_type_priority_step' => NGG_DISPLAY_PRIORITY_STEP, 'shortcode_ref' => isset($_REQUEST['ref']) ? floatval($_REQUEST['ref']) : null, 'i18n' => array('sources' => __('Sources', 'nggallery'), 'optional' => __('(optional)', 'nggallery'), 'slug_tooltip' => __('Sets an SEO-friendly name to this gallery for URLs. Currently only in use by the Pro Lightbox', 'nggallery'), 'slug_label' => __('Slug', 'nggallery'), 'no_entities' => __('No entities to display for this source', 'nggallery'), 'exclude_question' => __('Exclude?', 'nggallery'), 'select_gallery' => __('Select a gallery', 'nggallery'), 'galleries' => __('Galleries', 'nggallery'), 'albums' => __('Albums', 'nggallery'))));
364
  }
365
  function enqueue_backend_resources()
366
  {
products/photocrati_nextgen/modules/i18n/lang/nggallery-sv_SE.mo CHANGED
Binary file
products/photocrati_nextgen/modules/i18n/lang/nggallery-sv_SE.po CHANGED
@@ -1635,7 +1635,7 @@ msgstr "Fuskar du?"
1635
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:180
1636
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:209
1637
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:253
1638
- msgid "Update Successfully"
1639
  msgstr "Uppdatering klar"
1640
 
1641
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:227
@@ -2317,10 +2317,6 @@ msgstr "Bilder har tagits bort"
2317
  msgid "Tags changed"
2318
  msgstr "Etiketter ändrade"
2319
 
2320
- #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:818
2321
- msgid "Update successful"
2322
- msgstr "Uppdatering klar"
2323
-
2324
  #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:853
2325
  msgid "New gallery page ID"
2326
  msgstr "ID för ny gallerisida"
@@ -2878,7 +2874,7 @@ msgid "These are maximum values"
2878
  msgstr "Dessa är maximivärden"
2879
 
2880
  #: products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php:33
2881
- msgid "Update successfully"
2882
  msgstr "Uppdatering klar"
2883
 
2884
  #: products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php:48
1635
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:180
1636
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:209
1637
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:253
1638
+ msgid "Updated Successfully"
1639
  msgstr "Uppdatering klar"
1640
 
1641
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:227
2317
  msgid "Tags changed"
2318
  msgstr "Etiketter ändrade"
2319
 
 
 
 
 
2320
  #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:853
2321
  msgid "New gallery page ID"
2322
  msgstr "ID för ny gallerisida"
2874
  msgstr "Dessa är maximivärden"
2875
 
2876
  #: products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php:33
2877
+ msgid "Updated successfully"
2878
  msgstr "Uppdatering klar"
2879
 
2880
  #: products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php:48
products/photocrati_nextgen/modules/i18n/lang/nggallery.po CHANGED
@@ -1652,7 +1652,7 @@ msgstr ""
1652
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:180
1653
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:209
1654
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:253
1655
- msgid "Update Successfully"
1656
  msgstr ""
1657
 
1658
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:227
@@ -2232,7 +2232,7 @@ msgid "Alt & Title Text / Description"
2232
  msgstr ""
2233
 
2234
  #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:213
2235
- msgid "Exclude ?"
2236
  msgstr ""
2237
 
2238
  #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:298
@@ -2328,10 +2328,6 @@ msgstr ""
2328
  msgid "Tags changed"
2329
  msgstr ""
2330
 
2331
- #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:818
2332
- msgid "Update successful"
2333
- msgstr ""
2334
-
2335
  #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:853
2336
  msgid "New gallery page ID"
2337
  msgstr ""
@@ -2450,7 +2446,7 @@ msgid "Server Settings"
2450
  msgstr ""
2451
 
2452
  #: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97
2453
- msgid "NextGEN Gallery is one of the most popular WordPress plugins of all time with over 17 million downloads."
2454
  msgstr ""
2455
 
2456
  #: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97
@@ -2887,7 +2883,7 @@ msgid "These are maximum values"
2887
  msgstr ""
2888
 
2889
  #: products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php:33
2890
- msgid "Update successfully"
2891
  msgstr ""
2892
 
2893
  #: products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php:48
1652
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:180
1653
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:209
1654
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:253
1655
+ msgid "Updated Successfully"
1656
  msgstr ""
1657
 
1658
  #: products/photocrati_nextgen/modules/ngglegacy/admin/album.php:227
2232
  msgstr ""
2233
 
2234
  #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:213
2235
+ msgid "Exclude?"
2236
  msgstr ""
2237
 
2238
  #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:298
2328
  msgid "Tags changed"
2329
  msgstr ""
2330
 
 
 
 
 
2331
  #: products/photocrati_nextgen/modules/ngglegacy/admin/manage.php:853
2332
  msgid "New gallery page ID"
2333
  msgstr ""
2446
  msgstr ""
2447
 
2448
  #: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97
2449
+ msgid "NextGEN Gallery is one of the most popular WordPress plugins of all time with over 18 million downloads."
2450
  msgstr ""
2451
 
2452
  #: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97
2883
  msgstr ""
2884
 
2885
  #: products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php:33
2886
+ msgid "Updated successfully"
2887
  msgstr ""
2888
 
2889
  #: products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php:48
products/photocrati_nextgen/modules/lightbox/package.module.lightbox.php CHANGED
@@ -14,7 +14,13 @@ class C_Lightbox_Installer
14
  }
15
  function install_lightbox($name, $title, $code, $stylesheet_paths = array(), $script_paths = array(), $values = array(), $i18n = array())
16
  {
17
- $lightbox = new C_NGG_Lightbox($name, array('title' => $title, 'code' => $code, 'styles' => is_array($stylesheet_paths) ? implode("\n", $stylesheet_paths) : $stylesheet_paths, 'scripts' => is_array($script_paths) ? implode("\n", $script_paths) : $script_paths, 'values' => $values, 'i18n' => $i18n));
 
 
 
 
 
 
18
  C_Lightbox_Library_Manager::get_instance()->register($name, $lightbox);
19
  }
20
  }
@@ -183,7 +189,14 @@ class C_Lightbox_Library_Manager
183
  }
184
  // Make the path to the static resources available for libraries
185
  // Shutter-Reloaded in particular depends on this
186
- $this->_add_script_data('ngg_common', 'nextgen_lightbox_settings', array('static_path' => $router->get_static_url('', 'photocrati-lightbox'), 'context' => $thumbEffectContext), TRUE, TRUE);
 
 
 
 
 
 
 
187
  // Enqueue lightbox resources, only if we have a configured lightbox
188
  if ($lightbox) {
189
  // Add lightbox script data
14
  }
15
  function install_lightbox($name, $title, $code, $stylesheet_paths = array(), $script_paths = array(), $values = array(), $i18n = array())
16
  {
17
+ if (!is_array($stylesheet_paths) && is_string($stylesheet_paths) && FALSE !== strpos($stylesheet_paths, "\n")) {
18
+ $stylesheet_paths = explode("\n", $stylesheet_paths);
19
+ }
20
+ if (!is_array($script_paths) && is_string($script_paths) && FALSE !== strpos($script_paths, "\n")) {
21
+ $script_paths = explode("\n", $script_paths);
22
+ }
23
+ $lightbox = new C_NGG_Lightbox($name, array('title' => $title, 'code' => $code, 'styles' => $stylesheet_paths, 'scripts' => $script_paths, 'values' => $values, 'i18n' => $i18n));
24
  C_Lightbox_Library_Manager::get_instance()->register($name, $lightbox);
25
  }
26
  }
189
  }
190
  // Make the path to the static resources available for libraries
191
  // Shutter-Reloaded in particular depends on this
192
+ $this->_add_script_data(
193
+ 'ngg_common',
194
+ // TODO: Should this be ngg_lightbox_context instead?
195
+ 'nextgen_lightbox_settings',
196
+ array('static_path' => $router->get_static_url('', 'photocrati-lightbox'), 'context' => $thumbEffectContext),
197
+ TRUE,
198
+ TRUE
199
+ );
200
  // Enqueue lightbox resources, only if we have a configured lightbox
201
  if ($lightbox) {
202
  // Add lightbox script data
products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php CHANGED
@@ -431,7 +431,7 @@ class A_Upload_Images_Form extends Mixin
431
  function get_plupload_options()
432
  {
433
  $retval = array();
434
- $retval['runtimes'] = 'gears,browserplus,html5,flash,silverlight,html4';
435
  $retval['max_file_size'] = strval(round((int) wp_max_upload_size() / 1024)) . 'kb';
436
  $retval['filters'] = $this->object->get_plupload_filters();
437
  $retval['flash_swf_url'] = includes_url('js/plupload/plupload.flash.swf');
431
  function get_plupload_options()
432
  {
433
  $retval = array();
434
+ $retval['runtimes'] = 'browserplus,html5,silverlight,html4';
435
  $retval['max_file_size'] = strval(round((int) wp_max_upload_size() / 1024)) . 'kb';
436
  $retval['filters'] = $this->object->get_plupload_filters();
437
  $retval['flash_swf_url'] = includes_url('js/plupload/plupload.flash.swf');
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload-2.1.1/Moxie.swf DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php CHANGED
@@ -458,6 +458,7 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination
458
  return $output;
459
  } else {
460
  if ($album = $this->param('album')) {
 
461
  $mapper = C_Album_Mapper::get_instance();
462
  $result = $mapper->select()->where(array('slug = %s', $album))->limit(1)->run_query();
463
  $result = array_pop($result);
458
  return $output;
459
  } else {
460
  if ($album = $this->param('album')) {
461
+ // Are we to display a sub-album?
462
  $mapper = C_Album_Mapper::get_instance();
463
  $result = $mapper->select()->where(array('slug = %s', $album))->limit(1)->run_query();
464
  $result = array_pop($result);
products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php CHANGED
@@ -2118,7 +2118,59 @@ class C_Image_Wrapper
2118
  $columns = 0;
2119
  }
2120
  // Public variables
2121
- $defaults = array('errmsg' => '', 'error' => FALSE, 'imageURL' => '', 'thumbURL' => '', 'imagePath' => '', 'thumbPath' => '', 'href' => '', 'thumbPrefix' => 'thumbs_', 'thumbFolder' => '/thumbs/', 'galleryid' => 0, 'pid' => 0, 'filename' => '', 'description' => '', 'alttext' => '', 'imagedate' => '', 'exclude' => '', 'thumbcode' => '', 'name' => '', 'path' => '', 'title' => '', 'pageid' => 0, 'previewpic' => 0, 'style' => $columns > 0 ? 'style="width:' . floor(100 / $columns) . '%;"' : '', 'hidden' => FALSE, 'permalink' => '', 'tags' => '');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2122
  // convert the image to an array and apply the defaults
2123
  $this->_orig_image = $image;
2124
  $image = (array) $image;
2118
  $columns = 0;
2119
  }
2120
  // Public variables
2121
+ $defaults = array(
2122
+ 'errmsg' => '',
2123
+ // Error message to display, if any
2124
+ 'error' => FALSE,
2125
+ // Error state
2126
+ 'imageURL' => '',
2127
+ // URL Path to the image
2128
+ 'thumbURL' => '',
2129
+ // URL Path to the thumbnail
2130
+ 'imagePath' => '',
2131
+ // Server Path to the image
2132
+ 'thumbPath' => '',
2133
+ // Server Path to the thumbnail
2134
+ 'href' => '',
2135
+ // A href link code
2136
+ // Mostly constant
2137
+ 'thumbPrefix' => 'thumbs_',
2138
+ // FolderPrefix to the thumbnail
2139
+ 'thumbFolder' => '/thumbs/',
2140
+ // Foldername to the thumbnail
2141
+ // Image Data
2142
+ 'galleryid' => 0,
2143
+ // Gallery ID
2144
+ 'pid' => 0,
2145
+ // Image ID
2146
+ 'filename' => '',
2147
+ // Image filename
2148
+ 'description' => '',
2149
+ // Image description
2150
+ 'alttext' => '',
2151
+ // Image alttext
2152
+ 'imagedate' => '',
2153
+ // Image date/time
2154
+ 'exclude' => '',
2155
+ // Image exclude
2156
+ 'thumbcode' => '',
2157
+ // Image effect code
2158
+ // Gallery Data
2159
+ 'name' => '',
2160
+ // Gallery name
2161
+ 'path' => '',
2162
+ // Gallery path
2163
+ 'title' => '',
2164
+ // Gallery title
2165
+ 'pageid' => 0,
2166
+ // Gallery page ID
2167
+ 'previewpic' => 0,
2168
+ // Gallery preview pic
2169
+ 'style' => $columns > 0 ? 'style="width:' . floor(100 / $columns) . '%;"' : '',
2170
+ 'hidden' => FALSE,
2171
+ 'permalink' => '',
2172
+ 'tags' => '',
2173
+ );
2174
  // convert the image to an array and apply the defaults
2175
  $this->_orig_image = $image;
2176
  $image = (array) $image;
products/photocrati_nextgen/modules/ngglegacy/admin/album.php CHANGED
@@ -176,7 +176,7 @@ class nggManageAlbum {
176
  $this->currentID = $_REQUEST['act_album'] = $album->{$album->id_field};
177
  $this->albums[$this->currentID] = $album;
178
  do_action('ngg_add_album', $this->currentID);
179
- nggGallery::show_message(__('Update Successfully','nggallery'));
180
  }
181
  else {
182
  $this->currentID = $_REQUEST['act_album'] = 0;
@@ -184,17 +184,17 @@ class nggManageAlbum {
184
  }
185
 
186
  else if ( isset($_POST['update']) && isset($_REQUEST['act_album']) && $this->currentID = intval($_REQUEST['act_album']) ) {
187
-
188
- $gid = array();
189
 
190
  // Get the current album being updated
191
  $album = $this->_get_album($this->currentID);
192
 
193
  // Get the list of galleries/sub-albums to be added to this album
194
- parse_str($_REQUEST['sortorder']);
195
 
196
  // Set the new sortorder
197
- $album->sortorder = $gid;
198
 
199
  // Ensure that a preview pic has been sent
200
  $this->_set_album_preview_pic($album);
@@ -205,7 +205,7 @@ class nggManageAlbum {
205
  //hook for other plugins
206
  do_action('ngg_update_album_sortorder', $this->currentID);
207
 
208
- nggGallery::show_message(__('Update Successfully','nggallery'));
209
 
210
  }
211
 
@@ -249,7 +249,7 @@ class nggManageAlbum {
249
  do_action('ngg_update_album', $this->currentID, $_POST);
250
 
251
  if ($result)
252
- nggGallery::show_message(__('Update Successfully','nggallery'));
253
  }
254
 
255
  function get_available_preview_images($album)
@@ -757,4 +757,4 @@ function showDialog() {
757
  return true;
758
  }
759
 
760
- }
176
  $this->currentID = $_REQUEST['act_album'] = $album->{$album->id_field};
177
  $this->albums[$this->currentID] = $album;
178
  do_action('ngg_add_album', $this->currentID);
179
+ nggGallery::show_message(__('Updated Successfully','nggallery'));
180
  }
181
  else {
182
  $this->currentID = $_REQUEST['act_album'] = 0;
184
  }
185
 
186
  else if ( isset($_POST['update']) && isset($_REQUEST['act_album']) && $this->currentID = intval($_REQUEST['act_album']) ) {
187
+
188
+ $sortorder = array();
189
 
190
  // Get the current album being updated
191
  $album = $this->_get_album($this->currentID);
192
 
193
  // Get the list of galleries/sub-albums to be added to this album
194
+ parse_str($_REQUEST['sortorder'], $sortorder);
195
 
196
  // Set the new sortorder
197
+ $album->sortorder = $sortorder['gid'];
198
 
199
  // Ensure that a preview pic has been sent
200
  $this->_set_album_preview_pic($album);
205
  //hook for other plugins
206
  do_action('ngg_update_album_sortorder', $this->currentID);
207
 
208
+ nggGallery::show_message(__('Updated Successfully','nggallery'));
209
 
210
  }
211
 
249
  do_action('ngg_update_album', $this->currentID, $_POST);
250
 
251
  if ($result)
252
+ nggGallery::show_message(__('Updated Successfully','nggallery'));
253
  }
254
 
255
  function get_available_preview_images($album)
757
  return true;
758
  }
759
 
760
+ }
products/photocrati_nextgen/modules/ngglegacy/admin/manage.php CHANGED
@@ -832,7 +832,7 @@ class nggManageGallery {
832
  //hook for other plugin to update the fields
833
  do_action('ngg_update_gallery', $this->gid, $_POST);
834
 
835
- nggGallery::show_message(__('Update successful', 'nggallery'));
836
  }
837
 
838
  if (isset ($_POST['scanfolder'])) {
@@ -1119,4 +1119,4 @@ class nggManageGallery {
1119
  echo $pagination;
1120
  }
1121
 
1122
- }
832
  //hook for other plugin to update the fields
833
  do_action('ngg_update_gallery', $this->gid, $_POST);
834
 
835
+ nggGallery::show_message(__('Updated successfully', 'nggallery'));
836
  }
837
 
838
  if (isset ($_POST['scanfolder'])) {
1119
  echo $pagination;
1120
  }
1121
 
1122
+ }
products/photocrati_nextgen/modules/ngglegacy/admin/wpmu.php CHANGED
@@ -30,7 +30,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
30
  $ngg_options['gallerypath'] = trailingslashit($ngg_options['gallerypath']);
31
  update_site_option('ngg_options', $ngg_options);
32
 
33
- $messagetext = __('Update successfully','nggallery');
34
  }
35
 
36
  // Show donation message only one time.
@@ -114,4 +114,4 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
114
  </div>
115
 
116
  <?php
117
- }
30
  $ngg_options['gallerypath'] = trailingslashit($ngg_options['gallerypath']);
31
  update_site_option('ngg_options', $ngg_options);
32
 
33
+ $messagetext = __('Updated successfully','nggallery');
34
  }
35
 
36
  // Show donation message only one time.
114
  </div>
115
 
116
  <?php
117
+ }
products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php CHANGED
@@ -638,7 +638,7 @@ class nggdb
638
  *
639
  * @param integer $page start offset as page number (0,1,2,3,4...)
640
  * @param integer $limit the number of result
641
- * @param bool $exclude do not show exluded images
642
  * @param int $galleryId Only look for images with this gallery id, or in all galleries if id is 0
643
  * @param string $orderby is one of "id" (default, order by pid), "date" (order by exif date), sort (order by user sort order)
644
  * @deprecated
@@ -979,4 +979,4 @@ if ( ! isset($GLOBALS['nggdb']) ) {
979
  */
980
  unset($GLOBALS['nggdb']);
981
  $GLOBALS['nggdb'] = new nggdb() ;
982
- }
638
  *
639
  * @param integer $page start offset as page number (0,1,2,3,4...)
640
  * @param integer $limit the number of result
641
+ * @param bool $exclude do not show excluded images
642
  * @param int $galleryId Only look for images with this gallery id, or in all galleries if id is 0
643
  * @param string $orderby is one of "id" (default, order by pid), "date" (order by exif date), sort (order by user sort order)
644
  * @deprecated
979
  */
980
  unset($GLOBALS['nggdb']);
981
  $GLOBALS['nggdb'] = new nggdb() ;
982
+ }
products/photocrati_nextgen/modules/ngglegacy/lib/tags.php CHANGED
@@ -294,44 +294,50 @@ class nggTags {
294
  }
295
 
296
  /**
297
- * Get images corresponding to a list of tags
298
- */
299
- /**
300
  * nggTags::find_images_for_tags()
301
  *
302
- * @param mixed $taglist
303
- * @param string $mode could be 'ASC' or 'RAND'
 
304
  * @return array of images
305
  */
306
- static function find_images_for_tags($taglist, $mode = "ASC") {
307
  // return the images based on the tag
308
  global $wpdb;
309
 
310
  // extract it into a array
311
- $taglist = explode(",", $taglist);
312
 
313
- if ( !is_array($taglist) )
314
- $taglist = array($taglist);
 
315
 
316
- $taglist = array_map('trim', $taglist);
317
- $new_slugarray = array_map('sanitize_title', $taglist);
318
- $sluglist = implode("', '", $new_slugarray);
319
 
320
- //Treat % as a litteral in the database, for unicode support
321
- $sluglist = str_replace("%","%%",$sluglist);
322
 
323
  // first get all $term_ids with this tag
324
- $term_ids = $wpdb->get_col( $wpdb->prepare("SELECT term_id FROM $wpdb->terms WHERE slug IN (%s) ORDER BY term_id ASC ", $sluglist));
325
- $picids = get_objects_in_term($term_ids, 'ngg_tag');
326
 
327
- if ($mode == 'RAND')
328
- shuffle($picids);
 
329
 
330
  // Now lookup in the database
331
  $mapper = C_Image_Mapper::get_instance();
332
  $images = array();
333
- foreach ($picids as $image_id) {
334
- $images[] = $mapper->find($image_id);
 
 
 
 
335
  }
336
 
337
  return $images;
294
  }
295
 
296
  /**
297
+ * Get images corresponding to a list of tags
298
+ *
 
299
  * nggTags::find_images_for_tags()
300
  *
301
+ * @param mixed $taglist
302
+ * @param string $mode could be 'ASC', 'DESC' or 'RAND'
303
+ *
304
  * @return array of images
305
  */
306
+ static function find_images_for_tags( $taglist, $mode = "ASC" ) {
307
  // return the images based on the tag
308
  global $wpdb;
309
 
310
  // extract it into a array
311
+ $taglist = explode( ",", $taglist );
312
 
313
+ if ( ! is_array( $taglist ) ) {
314
+ $taglist = array( $taglist );
315
+ }
316
 
317
+ $taglist = array_map( 'trim', $taglist );
318
+ $new_slugarray = array_map( 'sanitize_title', $taglist );
319
+ $sluglist = implode( "', '", $new_slugarray );
320
 
321
+ //Treat % as a literal in the database, for unicode support
322
+ $sluglist = str_replace( "%", "%%", $sluglist );
323
 
324
  // first get all $term_ids with this tag
325
+ $term_ids = $wpdb->get_col( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE slug IN (%s) ORDER BY term_id ASC ", $sluglist ) );
326
+ $picids = get_objects_in_term( $term_ids, 'ngg_tag' );
327
 
328
+ if ( $mode == 'RAND' ) {
329
+ shuffle( $picids );
330
+ }
331
 
332
  // Now lookup in the database
333
  $mapper = C_Image_Mapper::get_instance();
334
  $images = array();
335
+ foreach ( $picids as $image_id ) {
336
+ $images[] = $mapper->find( $image_id );
337
+ }
338
+
339
+ if ( 'DESC' == $mode ) {
340
+ $images = array_reverse( $images );
341
  }
342
 
343
  return $images;
products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php CHANGED
@@ -124,6 +124,8 @@ class M_Third_Party_Compat extends C_Base_Module
124
  add_filter('run_ngg_resource_manager', array($this, 'run_ngg_resource_manager'));
125
  add_filter('wpseo_sitemap_urlimages', array($this, 'add_wpseo_xml_sitemap_images'), 10, 2);
126
 
 
 
127
  // WPML fix
128
  if (class_exists('SitePress')) {
129
  M_WordPress_Routing::$_use_canonical_redirect = FALSE;
@@ -136,6 +138,16 @@ class M_Third_Party_Compat extends C_Base_Module
136
 
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
139
  /**
140
  * Filter support for WordPress SEO
141
  *
124
  add_filter('run_ngg_resource_manager', array($this, 'run_ngg_resource_manager'));
125
  add_filter('wpseo_sitemap_urlimages', array($this, 'add_wpseo_xml_sitemap_images'), 10, 2);
126
 
127
+ if ($this->is_ngg_page()) add_action('admin_enqueue_scripts', array(&$this, 'dequeue_spider_calendar_resources'));
128
+
129
  // WPML fix
130
  if (class_exists('SitePress')) {
131
  M_WordPress_Routing::$_use_canonical_redirect = FALSE;
138
 
139
  }
140
 
141
+ function is_ngg_page()
142
+ {
143
+ return (is_admin() && isset($_REQUEST['page']) && strpos($_REQUEST['page'], 'ngg') !== FALSE);
144
+ }
145
+
146
+ function dequeue_spider_calendar_resources()
147
+ {
148
+ remove_filter('admin_head', 'spide_ShowTinyMCE');
149
+ }
150
+
151
  /**
152
  * Filter support for WordPress SEO
153
  *
products/photocrati_nextgen/modules/validation/package.module.validation.php CHANGED
@@ -83,7 +83,7 @@ class Mixin_Validation extends Mixin
83
  function get_errors($property = FALSE)
84
  {
85
  $retval = $property ? $this->object->errors_for($property) : $this->object->_errors;
86
- if (!$retval || is_array($retval)) {
87
  $retval = array();
88
  }
89
  return $retval;
83
  function get_errors($property = FALSE)
84
  {
85
  $retval = $property ? $this->object->errors_for($property) : $this->object->_errors;
86
+ if (!$retval || !is_array($retval)) {
87
  $retval = array();
88
  }
89
  return $retval;
products/photocrati_nextgen/modules/widget/package.module.widget.php CHANGED
@@ -276,7 +276,20 @@ class C_Widget_Slideshow extends WP_Widget
276
  {
277
  $registry = C_Component_Registry::get_instance();
278
  $renderer = C_Displayed_Gallery_Renderer::get_instance();
279
- $params = array('container_ids' => $galleryID, 'display_type' => 'photocrati-nextgen_basic_slideshow', 'gallery_width' => $irWidth, 'gallery_height' => $irHeight, 'source' => 'galleries', 'slug' => 'widget-' . $args['widget_id'], 'entity_types' => array('image'), 'show_thumbnail_link' => FALSE, 'show_slideshow_link' => FALSE, 'use_imagebrowser_effect' => FALSE, 'ngg_triggers_display' => 'never');
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  if (0 === $galleryID) {
281
  $params['source'] = 'random_images';
282
  $params['maximum_entity_count'] = $limit;
276
  {
277
  $registry = C_Component_Registry::get_instance();
278
  $renderer = C_Displayed_Gallery_Renderer::get_instance();
279
+ $params = array(
280
+ 'container_ids' => $galleryID,
281
+ 'display_type' => 'photocrati-nextgen_basic_slideshow',
282
+ 'gallery_width' => $irWidth,
283
+ 'gallery_height' => $irHeight,
284
+ 'source' => 'galleries',
285
+ 'slug' => 'widget-' . $args['widget_id'],
286
+ 'entity_types' => array('image'),
287
+ 'show_thumbnail_link' => FALSE,
288
+ 'show_slideshow_link' => FALSE,
289
+ 'use_imagebrowser_effect' => FALSE,
290
+ // just to be safe
291
+ 'ngg_triggers_display' => 'never',
292
+ );
293
  if (0 === $galleryID) {
294
  $params['source'] = 'random_images';
295
  $params['maximum_entity_count'] = $limit;
readme.txt CHANGED
@@ -2,11 +2,11 @@
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.10
6
  Tested up to: 4.8.0
7
  License: GPLv2
8
 
9
- The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 17 million downloads.
10
 
11
  == Description ==
12
 
@@ -187,6 +187,16 @@ For more information, feel free to visit the official website for the NextGEN Ga
187
 
188
  == Changelog ==
189
 
 
 
 
 
 
 
 
 
 
 
190
  = V2.2.10 - 06.14.2017 =
191
  * Fixed: Ensure that the plugin works when PHP isn't compiled against libxml
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.12
6
  Tested up to: 4.8.0
7
  License: GPLv2
8
 
9
+ The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 18 million downloads.
10
 
11
  == Description ==
12
 
187
 
188
  == Changelog ==
189
 
190
+ = V2.2.12 - 08.01.2017 =
191
+ * Secured: Disabled Flash backend in plupload
192
+ * Changed: Upgraded PHP-Parser version used when building plugin zips
193
+ * Changed: Added DESC as an option to nggTags::find_images_for_tags()
194
+ * Fixed: Fixed useage of parse_str for PHP 7 (thanks Bodo Graumann)
195
+ * Fixed: Made transients manager flush only expired transients
196
+ * Fixed: Compatibility with Spider Calendar
197
+ * Fixed: Problem with validation code of DataMapper Models
198
+ * Fixed: Convert script/style urls to arrays in the lightbox installer
199
+
200
  = V2.2.10 - 06.14.2017 =
201
  * Fixed: Ensure that the plugin works when PHP isn't compiled against libxml
202