NextGEN Gallery – WordPress Gallery Plugin - Version 2.0.59

Version Description

  • 03.18.2014 =
  • Changed: Separated pope_module_list from ngg_options record in options table
  • Fixed: Removed code causing jQuery compatibility issues in WP Admin
  • Fixed: Allow third-parties to override jQuery with Google's CDN
  • Fixed: When resetting the 'jquery' handle, ensure that jquery-migrate is a dependency
  • Fixed: Silenced many PHP warnings
  • Fixed: Datamapper->count() not returning the correct count
  • Fixed: Compatibility with Gravity Forms
Download this release

Release Info

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

Code changes from version 2.0.58 to 2.0.59

Files changed (29) hide show
  1. changelog.txt +9 -0
  2. nggallery.php +18 -35
  3. non_pope/class.photocrati_installer.php +22 -9
  4. products/photocrati_nextgen/class.nextgen_product_installer.php +49 -3
  5. products/photocrati_nextgen/modules/datamapper/class.custompost_datamapper_driver.php +6 -14
  6. products/photocrati_nextgen/modules/fs/class.fs.php +10 -0
  7. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/css/jquery.plupload.queue.css +0 -177
  8. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/backgrounds.gif +0 -0
  9. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/buttons-disabled.png +0 -0
  10. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/buttons.png +0 -0
  11. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/delete.gif +0 -0
  12. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/done.gif +0 -0
  13. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/error.gif +0 -0
  14. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/throbber.gif +0 -0
  15. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/transp50.png +0 -0
  16. products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/jquery.plupload.queue.js +0 -340
  17. products/photocrati_nextgen/modules/nextgen_admin/class.nextgen_admin_installer.php +6 -2
  18. products/photocrati_nextgen/modules/nextgen_basic_gallery/adapter.ajax_pagination_actions.php +0 -25
  19. products/photocrati_nextgen/modules/nextgen_gallery_display/class.displayed_gallery.php +1 -1
  20. products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php +1 -2
  21. products/photocrati_nextgen/modules/nextgen_other_options/adapter.reset_form.php +6 -3
  22. products/photocrati_nextgen/modules/ngglegacy/admin/setup.php +0 -58
  23. products/photocrati_nextgen/modules/ngglegacy/class.ngglegacy_installer.php +2 -0
  24. products/photocrati_nextgen/modules/security/class.wordpress_security_manager.php +8 -6
  25. products/photocrati_nextgen/modules/validation/mixin.validation.php +4 -0
  26. products/photocrati_nextgen/modules/wordpress_routing/adapter.wordpress_router.php +2 -1
  27. products/photocrati_nextgen/modules/wordpress_routing/adapter.wordpress_routing_app.php +1 -1
  28. products/photocrati_nextgen/product.photocrati_nextgen.php +1 -2
  29. readme.txt +11 -2
changelog.txt CHANGED
@@ -1,6 +1,15 @@
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
 
 
 
 
 
 
 
 
 
4
  = V2.0.58 - 03.10.2014 =
5
  * Fixed: Reset jQuery to WP defaults when modified by a third-party
6
  * Fixed: Compatibility with WP jQuery Lightbox plugin
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
4
+ = V2.0.59 - 03.18.2014 =
5
+ * Changed: Separated pope_module_list from ngg_options record in options table
6
+ * Fixed: Removed code causing jQuery compatibility issues in WP Admin
7
+ * Fixed: Allow third-parties to override jQuery with Google's CDN
8
+ * Fixed: When resetting the 'jquery' handle, ensure that jquery-migrate is a dependency
9
+ * Fixed: Silenced many PHP warnings
10
+ * Fixed: Datamapper->count() not returning the correct count
11
+ * Fixed: Compatibility with Gravity Forms
12
+
13
  = V2.0.58 - 03.10.2014 =
14
  * Fixed: Reset jQuery to WP defaults when modified by a third-party
15
  * Fixed: Compatibility with WP jQuery Lightbox plugin
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 9 million downloads.
7
- * Version: 2.0.58
8
  * Author: Photocrati Media
9
  * Plugin URI: http://www.nextgen-gallery.com
10
  * Author URI: http://www.photocrati.com
@@ -261,13 +261,6 @@ class C_NextGEN_Bootstrap
261
  add_action('wp_print_scripts', array(&$this, 'fix_jquery'));
262
  }
263
 
264
- // We require a minimum of jQuery 1.11.0 for IE11, due to a problem with interframe communication
265
- $version = get_bloginfo('version');
266
- if (version_compare($version, '3.9') == -1) {
267
- add_action('admin_print_scripts', array(&$this, 'custom_jquery_prep'), 1);
268
- add_action('admin_print_scripts', array(&$this, 'custom_jquery_install'), PHP_INT_MAX-1);
269
- }
270
-
271
  // If the selected stylesheet is using an unsafe path, then notify the user
272
  if (C_NextGen_Style_Manager::get_instance()->is_directory_unsafe()) {
273
  add_action('all_admin_notices', array(&$this, 'display_stylesheet_notice'));
@@ -337,17 +330,29 @@ class C_NextGEN_Bootstrap
337
  global $wp_scripts;
338
 
339
  // Determine which version of jQuery to include
340
- $src = '/wp-includes/js/jquery/jquery.js';
341
 
342
  // Ensure that jQuery is always set to the default
343
  if (isset($wp_scripts->registered['jquery'])) {
344
  $jquery = $wp_scripts->registered['jquery'];
345
- $jquery->src = FALSE;
346
- if (array_search('jquery-core', $jquery->deps) === FALSE) {
347
- $jquery->deps[] = 'jquery-core';
 
 
 
 
 
 
 
 
 
 
 
348
  }
349
  }
350
 
 
351
  if (isset($wp_scripts->registered['jquery-core'])) {
352
  $wp_scripts->registered['jquery-core']->src = $src;
353
  }
@@ -355,27 +360,6 @@ class C_NextGEN_Bootstrap
355
  wp_enqueue_script('jquery');
356
  }
357
 
358
- function custom_jquery_prep()
359
- {
360
- ob_start();
361
- }
362
-
363
- function custom_jquery_install()
364
- {
365
- $scripts = ob_get_clean();
366
- if (strpos($scripts, "jquery-core") === FALSE) {
367
- if (preg_match("#<script.*jquery.js.*</script>#", $scripts, $match)) {
368
- $jquery = $match[0];
369
- if (preg_match("#<script.*load-scripts\\.php.*</script>#", $scripts, $match)) {
370
- $load_scripts = $match[0];
371
- $scripts = str_replace($load_scripts, "{$jquery}\n{$load_scripts}", $scripts);
372
- }
373
- }
374
-
375
- }
376
- echo $scripts;
377
- }
378
-
379
  /**
380
  * Displays a notice to the user that the current stylesheet location is unsafe
381
  */
@@ -454,8 +438,7 @@ class C_NextGEN_Bootstrap
454
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
455
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
456
  define('NGG_PLUGIN_STARTED_AT', microtime());
457
- define('NGG_PLUGIN_VERSION', '2.0.58');
458
- define('NGG_JQUERY_VERSION', '1.11.0');
459
 
460
  if (!defined('NGG_HIDE_STRICT_ERRORS')) {
461
  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 9 million downloads.
7
+ * Version: 2.0.59
8
  * Author: Photocrati Media
9
  * Plugin URI: http://www.nextgen-gallery.com
10
  * Author URI: http://www.photocrati.com
261
  add_action('wp_print_scripts', array(&$this, 'fix_jquery'));
262
  }
263
 
 
 
 
 
 
 
 
264
  // If the selected stylesheet is using an unsafe path, then notify the user
265
  if (C_NextGen_Style_Manager::get_instance()->is_directory_unsafe()) {
266
  add_action('all_admin_notices', array(&$this, 'display_stylesheet_notice'));
330
  global $wp_scripts;
331
 
332
  // Determine which version of jQuery to include
333
+ $src = '/wp-includes/js/jquery/jquery.js';
334
 
335
  // Ensure that jQuery is always set to the default
336
  if (isset($wp_scripts->registered['jquery'])) {
337
  $jquery = $wp_scripts->registered['jquery'];
338
+
339
+ // There's an exception to the rule. We'll allow the same
340
+ // version of jQuery as included with WP to be fetched from
341
+ // Google AJAX libraries, as we have a systematic means of verifying
342
+ // that won't cause any troubles
343
+ $version = preg_quote($jquery->ver, '#');
344
+ if (!preg_match("#ajax\\.googleapis\\.com/ajax/libs/jquery/{$version}/jquery\\.min\\.js#", $jquery->src)) {
345
+ $jquery->src = FALSE;
346
+ if (array_search('jquery-core', $jquery->deps) === FALSE) {
347
+ $jquery->deps[] = 'jquery-core';
348
+ }
349
+ if (array_search('jquery-migrate', $jquery->deps) === FALSE) {
350
+ $jquery->deps[] = 'jquery-migrate';
351
+ }
352
  }
353
  }
354
 
355
+ // Ensure that jquery-core is used, as WP intended
356
  if (isset($wp_scripts->registered['jquery-core'])) {
357
  $wp_scripts->registered['jquery-core']->src = $src;
358
  }
360
  wp_enqueue_script('jquery');
361
  }
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  /**
364
  * Displays a notice to the user that the current stylesheet location is unsafe
365
  */
438
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
439
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
440
  define('NGG_PLUGIN_STARTED_AT', microtime());
441
+ define('NGG_PLUGIN_VERSION', '2.0.59');
 
442
 
443
  if (!defined('NGG_HIDE_STRICT_ERRORS')) {
444
  define('NGG_HIDE_STRICT_ERRORS', TRUE);
non_pope/class.photocrati_installer.php CHANGED
@@ -62,8 +62,16 @@ if (!class_exists('C_Photocrati_Installer'))
62
  static function can_do_upgrade()
63
  {
64
  $proceed = FALSE;
65
- if (!get_option('ngg_doing_upgrade', FALSE)) {
66
- update_option('ngg_doing_upgrade', TRUE);
 
 
 
 
 
 
 
 
67
  $proceed = TRUE;
68
  }
69
  return $proceed;
@@ -146,7 +154,7 @@ if (!class_exists('C_Photocrati_Installer'))
146
  }
147
 
148
  // Update the module list
149
- $local_settings->set('pope_module_list', $current_module_list);
150
 
151
  // NOTE & TODO: if the above section that declares $global_settings_to_keep is removed this should also
152
  // Since a hard-reset of the settings was forced we must again re-apply our previously saved values
@@ -178,12 +186,17 @@ if (!class_exists('C_Photocrati_Installer'))
178
 
179
  static function _get_last_module_list($reset=FALSE)
180
  {
181
- $retval = array();
182
- $local_settings = C_NextGen_Settings::get_instance();
183
- $last_module_list = $local_settings->get('pope_module_list');
184
- if (is_array($last_module_list) AND !$reset) foreach ($last_module_list as $key => $value) {
185
- $retval[] = $value;
 
 
 
 
186
  }
 
187
  return $retval;
188
  }
189
 
@@ -217,4 +230,4 @@ if (!class_exists('C_Photocrati_Installer'))
217
  _set_cron_array($cron);
218
  }
219
  }
220
- }
62
  static function can_do_upgrade()
63
  {
64
  $proceed = FALSE;
65
+
66
+ // Proceed if no other process has started the installer routines
67
+ if (!($doing_upgrade = get_option('ngg_doing_upgrade', FALSE))) {
68
+ update_option('ngg_doing_upgrade', time());
69
+ $proceed = TRUE;
70
+ }
71
+
72
+ // Or, force proceeding if we have a stale ngg_doing_upgrade record
73
+ elseif ($doing_upgrade === TRUE OR time() - $doing_upgrade > 120) {
74
+ update_option('ngg_doing_upgrade', time());
75
  $proceed = TRUE;
76
  }
77
  return $proceed;
154
  }
155
 
156
  // Update the module list
157
+ update_option('pope_module_list', $current_module_list);
158
 
159
  // NOTE & TODO: if the above section that declares $global_settings_to_keep is removed this should also
160
  // Since a hard-reset of the settings was forced we must again re-apply our previously saved values
186
 
187
  static function _get_last_module_list($reset=FALSE)
188
  {
189
+ // Return empty array to reset
190
+ if ($reset) return array();
191
+
192
+ // First try getting the list from a single WP option, "pope_module_list"
193
+ $retval = get_option('pope_module_list', array());
194
+ if (!$retval) {
195
+ $local_settings = C_NextGen_Settings::get_instance();
196
+ $retval = $local_settings->get('pope_module_list', array());
197
+ $local_settings->delete('pope_module_list');
198
  }
199
+
200
  return $retval;
201
  }
202
 
230
  _set_cron_array($cron);
231
  }
232
  }
233
+ }
products/photocrati_nextgen/class.nextgen_product_installer.php CHANGED
@@ -2,12 +2,58 @@
2
 
3
  class C_NextGen_Product_Installer
4
  {
 
 
 
 
 
 
 
 
 
 
 
 
5
  function uninstall($hard)
6
  {
 
 
 
 
 
7
  foreach (P_Photocrati_NextGen::$modules as $module_name) {
8
  if (($handler = C_Photocrati_Installer::get_handler_instance($module_name))) {
9
- if (method_exists($handler, 'uninstall')) $handler->uninstall($hard);
10
  }
11
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  }
13
- }
2
 
3
  class C_NextGen_Product_Installer
4
  {
5
+ function _filter_modules($pope_modules_list, $product)
6
+ {
7
+ foreach ($product as $module_name) {
8
+ $module = C_Component_Registry::get_instance()->get_module($module_name);
9
+ $str = $module->module_id . '|' . $module->module_version;
10
+ $search = array_search($str, $pope_modules_list);
11
+ if (FALSE !== $search)
12
+ unset($pope_modules_list[$search]);
13
+ }
14
+ return $pope_modules_list;
15
+ }
16
+
17
  function uninstall($hard)
18
  {
19
+ // remove this products modules from the pope_module_list registry
20
+ $pope_modules_list = get_option('pope_module_list', array());
21
+ $pope_modules_list = $this->_filter_modules($pope_modules_list, P_Photocrati_NextGen::$modules);
22
+
23
+ // run each modules respective uninstall routines
24
  foreach (P_Photocrati_NextGen::$modules as $module_name) {
25
  if (($handler = C_Photocrati_Installer::get_handler_instance($module_name))) {
26
+ if (method_exists($handler, 'uninstall')) $handler->uninstall($hard);
27
  }
28
+ }
29
+
30
+ // lastly remove this product itself from the pope_module_list registry
31
+ $search = array_search('photocrati-nextgen|' . NGG_PLUGIN_VERSION, $pope_modules_list);
32
+ if (FALSE !== $search)
33
+ unset($pope_modules_list[$search]);
34
+
35
+ // TODO: remove this. NextGen Pro's uninstall routine will be updated in a separate release,
36
+ // so to maintain proper support we run the same routine as above for it
37
+ $pro_version = FALSE;
38
+ if (defined('NGG_PRO_PLUGIN_VERSION'))
39
+ $pro_version = 'NGG_PRO_PLUGIN_VERSION';
40
+ if (defined('NEXTGEN_GALLERY_PRO_VERSION'))
41
+ $pro_version = 'NEXTGEN_GALLERY_PRO_VERSION';
42
+ if (FALSE !== $pro_version)
43
+ $pro_version = constant($pro_version);
44
+
45
+ if (FALSE !== $pro_version)
46
+ {
47
+ $pope_modules_list = $this->_filter_modules($pope_modules_list, P_Photocrati_NextGen_Pro::$modules);
48
+ $search = array_search('photocrati-nextgen-pro|' . $pro_version, $pope_modules_list);
49
+ if (FALSE !== $search)
50
+ unset($pope_modules_list[$search]);
51
+ }
52
+
53
+ if (empty($pope_modules_list))
54
+ delete_option('pope_module_list');
55
+ else
56
+ update_option('pope_module_list', $pope_modules_list);
57
+
58
  }
59
+ }
products/photocrati_nextgen/modules/datamapper/class.custompost_datamapper_driver.php CHANGED
@@ -427,7 +427,7 @@ class Mixin_CustomPost_DataMapper_Driver extends Mixin
427
  * @param string $sql optionally run the specified query
428
  * @return array
429
  */
430
- function run_query($sql=FALSE, $model=FALSE)
431
  {
432
  $retval = array();
433
 
@@ -442,9 +442,10 @@ class Mixin_CustomPost_DataMapper_Driver extends Mixin
442
  if (isset($this->object->debug)) $this->object->_query_args['debug'] = TRUE;
443
  $query->query_vars = $this->object->_query_args;
444
  add_action('pre_get_posts', array(&$this, 'set_query_args'), PHP_INT_MAX-1, 1);
445
- foreach ($query->get_posts() as $row) {
446
  $retval[] = $this->object->convert_post_to_entity($row, $model);
447
  }
 
448
  remove_action('pre_get_posts', array(&$this, 'set_query_args'), PHP_INT_MAX-1, 1);
449
 
450
  return $retval;
@@ -491,19 +492,10 @@ class Mixin_CustomPost_DataMapper_Driver extends Mixin
491
  */
492
  function count()
493
  {
494
- $retval = 0;
 
495
 
496
- global $wpdb;
497
- $key = $this->object->get_primary_key_column();
498
- $sql = $wpdb->prepare(
499
- "SELECT COUNT({$key}) FROM {$wpdb->posts} WHERE post_type = %s",
500
- $this->object->get_object_name()
501
- );
502
- $results = $this->object->run_query($sql);
503
- if ($results && isset($results[0]->$key))
504
- $retval = (int)$results[0]->$key;
505
-
506
- return $retval;
507
  }
508
 
509
 
427
  * @param string $sql optionally run the specified query
428
  * @return array
429
  */
430
+ function run_query($sql=FALSE, $model=FALSE, $convert_to_entities=TRUE)
431
  {
432
  $retval = array();
433
 
442
  if (isset($this->object->debug)) $this->object->_query_args['debug'] = TRUE;
443
  $query->query_vars = $this->object->_query_args;
444
  add_action('pre_get_posts', array(&$this, 'set_query_args'), PHP_INT_MAX-1, 1);
445
+ if ($convert_to_entities) foreach ($query->get_posts() as $row) {
446
  $retval[] = $this->object->convert_post_to_entity($row, $model);
447
  }
448
+ else $retval = $query->get_posts();
449
  remove_action('pre_get_posts', array(&$this, 'set_query_args'), PHP_INT_MAX-1, 1);
450
 
451
  return $retval;
492
  */
493
  function count()
494
  {
495
+ $this->object->select($this->object->get_primary_key_column());
496
+ $retval = $this->object->run_query(FALSE, FALSE, FALSE);
497
 
498
+ return count($retval);
 
 
 
 
 
 
 
 
 
 
499
  }
500
 
501
 
products/photocrati_nextgen/modules/fs/class.fs.php CHANGED
@@ -338,6 +338,16 @@ class Mixin_Fs_Instance_Methods extends Mixin
338
  */
339
  function get_document_root()
340
  {
 
 
 
 
 
 
 
 
 
 
341
  return $this->_document_root;
342
  }
343
 
338
  */
339
  function get_document_root()
340
  {
341
+ if (empty($this->_document_root)) {
342
+ // TODO: If this function is being called before set_document_root
343
+ // is called, then we need to determine where that call is being made
344
+ // and ensure that doesn't happen
345
+ //
346
+ // In the interim most http servers provide DOCUMENT_ROOT
347
+ if (!empty($_SERVER['DOCUMENT_ROOT']))
348
+ $this->set_document_root($_SERVER['DOCUMENT_ROOT']);
349
+ }
350
+
351
  return $this->_document_root;
352
  }
353
 
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/css/jquery.plupload.queue.css DELETED
@@ -1,177 +0,0 @@
1
- /*
2
- Plupload
3
- ------------------------------------------------------------------- */
4
-
5
- .plupload_button {
6
- display: -moz-inline-box; /* FF < 3*/
7
- display: inline-block;
8
- font: normal 12px sans-serif;
9
- text-decoration: none;
10
- color: #42454a;
11
- border: 1px solid #bababa;
12
- padding: 2px 8px 3px 20px;
13
- margin-right: 4px;
14
- background: #f3f3f3 url('../img/buttons.png') no-repeat 0 center;
15
- outline: 0;
16
-
17
- /* Optional rounded corners for browsers that support it */
18
- -moz-border-radius: 3px;
19
- -khtml-border-radius: 3px;
20
- -webkit-border-radius: 3px;
21
- border-radius: 3px;
22
- }
23
-
24
- .plupload_button:hover {
25
- color: #000;
26
- text-decoration: none;
27
- }
28
-
29
- .plupload_disabled, a.plupload_disabled:hover {
30
- color: #737373;
31
- border-color: #c5c5c5;
32
- background: #ededed url('../img/buttons-disabled.png') no-repeat 0 center;
33
- cursor: default;
34
- }
35
-
36
- .plupload_add {
37
- background-position: -181px center;
38
- }
39
-
40
- .plupload_wrapper {
41
- font: normal 11px Verdana,sans-serif;
42
- width: 100%;
43
- }
44
-
45
- .plupload_container {
46
- padding: 8px;
47
- background: url('../img/transp50.png');
48
- /*-moz-border-radius: 5px;*/
49
- }
50
-
51
- .plupload_container input {
52
- border: 1px solid #DDD;
53
- font: normal 11px Verdana,sans-serif;
54
- width: 98%;
55
- }
56
-
57
- .plupload_header {background: #2A2C2E url('../img/backgrounds.gif') repeat-x;}
58
- .plupload_header_content {
59
- background: url('../img/backgrounds.gif') no-repeat 0 -317px;
60
- min-height: 56px;
61
- padding-left: 60px;
62
- color: #FFF;
63
- }
64
- .plupload_header_title {
65
- font: normal 18px sans-serif;
66
- padding: 6px 0 3px;
67
- }
68
- .plupload_header_text {
69
- font: normal 12px sans-serif;
70
- }
71
-
72
- .plupload_filelist {
73
- margin: 0;
74
- padding: 0;
75
- list-style: none;
76
- }
77
-
78
- .plupload_scroll .plupload_filelist {
79
- height: 185px;
80
- background: #F5F5F5;
81
- overflow-y: scroll;
82
- }
83
-
84
- .plupload_filelist li {
85
- padding: 10px 8px;
86
- background: #F5F5F5 url('../img/backgrounds.gif') repeat-x 0 -156px;
87
- border-bottom: 1px solid #DDD;
88
- }
89
-
90
- .plupload_filelist_header, .plupload_filelist_footer {
91
- background: #DFDFDF;
92
- padding: 8px 8px;
93
- color: #42454A;
94
- }
95
- .plupload_filelist_header {
96
- border-top: 1px solid #EEE;
97
- border-bottom: 1px solid #CDCDCD;
98
- }
99
-
100
- .plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
101
- .plupload_file_name {float: left; overflow: hidden}
102
- .plupload_file_status {color: #777;}
103
- .plupload_file_status span {color: #42454A;}
104
- .plupload_file_size, .plupload_file_status, .plupload_progress {
105
- float: right;
106
- width: 80px;
107
- }
108
- .plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
109
-
110
- .plupload_filelist .plupload_file_name {width: 205px}
111
-
112
- .plupload_file_action {
113
- float: right;
114
- width: 16px;
115
- height: 16px;
116
- margin-left: 15px;
117
- }
118
-
119
- .plupload_file_action * {
120
- display: none;
121
- width: 16px;
122
- height: 16px;
123
- }
124
-
125
- li.plupload_uploading {background: #ECF3DC url('../img/backgrounds.gif') repeat-x 0 -238px;}
126
- li.plupload_done {color:#AAA}
127
-
128
- li.plupload_delete a {
129
- background: url('../img/delete.gif');
130
- }
131
-
132
- li.plupload_failed a {
133
- background: url('../img/error.gif');
134
- cursor: default;
135
- }
136
-
137
- li.plupload_done a {
138
- background: url('../img/done.gif');
139
- cursor: default;
140
- }
141
-
142
- .plupload_progress, .plupload_upload_status {
143
- display: none;
144
- }
145
-
146
- .plupload_progress_container {
147
- margin-top: 3px;
148
- border: 1px solid #CCC;
149
- background: #FFF;
150
- padding: 1px;
151
- }
152
- .plupload_progress_bar {
153
- width: 0px;
154
- height: 7px;
155
- background: #CDEB8B;
156
- }
157
-
158
- .plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
159
- margin-right: 17px;
160
- }
161
-
162
- /* Floats */
163
-
164
- .plupload_clear,.plupload_clearer {clear: both;}
165
- .plupload_clearer, .plupload_progress_bar {
166
- display: block;
167
- font-size: 0;
168
- line-height: 0;
169
- }
170
-
171
- li.plupload_droptext {
172
- background: transparent;
173
- text-align: center;
174
- vertical-align: middle;
175
- border: 0;
176
- line-height: 165px;
177
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/backgrounds.gif DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/buttons-disabled.png DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/buttons.png DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/delete.gif DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/done.gif DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/error.gif DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/throbber.gif DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/img/transp50.png DELETED
Binary file
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/plupload_queue/jquery.plupload.queue.js DELETED
@@ -1,340 +0,0 @@
1
- /**
2
- * jquery.plupload.queue.js
3
- *
4
- * Copyright 2009, Moxiecode Systems AB
5
- * Released under GPL License.
6
- *
7
- * License: http://www.plupload.com/license
8
- * Contributing: http://www.plupload.com/contributing
9
- */
10
-
11
- // JSLint defined globals
12
- /*global plupload:false, jQuery:false, alert:false */
13
-
14
- (function($) {
15
- var uploaders = {};
16
-
17
- function _(str) {
18
- return plupload.translate(str) || str;
19
- }
20
-
21
- function renderUI(id, target) {
22
- // Remove all existing non plupload items
23
- target.contents().each(function(i, node) {
24
- node = $(node);
25
-
26
- if (!node.is('.plupload')) {
27
- node.remove();
28
- }
29
- });
30
-
31
- target.prepend(
32
- '<div class="plupload_wrapper plupload_scroll">' +
33
- '<div id="' + id + '_container" class="plupload_container">' +
34
- '<div class="plupload">' +
35
- '<div class="plupload_header">' +
36
- '<div class="plupload_header_content">' +
37
- '<div class="plupload_header_title">' + _('Select files') + '</div>' +
38
- '<div class="plupload_header_text">' + _('Add files to the upload queue and click the start button.') + '</div>' +
39
- '</div>' +
40
- '</div>' +
41
-
42
- '<div class="plupload_content">' +
43
- '<div class="plupload_filelist_header">' +
44
- '<div class="plupload_file_name">' + _('Filename') + '</div>' +
45
- '<div class="plupload_file_action">&nbsp;</div>' +
46
- '<div class="plupload_file_status"><span>' + _('Status') + '</span></div>' +
47
- '<div class="plupload_file_size">' + _('Size') + '</div>' +
48
- '<div class="plupload_clearer">&nbsp;</div>' +
49
- '</div>' +
50
-
51
- '<ul id="' + id + '_filelist" class="plupload_filelist"></ul>' +
52
-
53
- '<div class="plupload_filelist_footer">' +
54
- '<div class="plupload_file_name">' +
55
- '<div class="plupload_buttons">' +
56
- '<a href="#" class="plupload_button plupload_add">' + _('Add Files') + '</a>' +
57
- '<a href="#" class="plupload_button plupload_start">' + _('Start Upload') + '</a>' +
58
- '</div>' +
59
- '<span class="plupload_upload_status"></span>' +
60
- '</div>' +
61
- '<div class="plupload_file_action"></div>' +
62
- '<div class="plupload_file_status"><span class="plupload_total_status">0%</span></div>' +
63
- '<div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div>' +
64
- '<div class="plupload_progress">' +
65
- '<div class="plupload_progress_container">' +
66
- '<div class="plupload_progress_bar"></div>' +
67
- '</div>' +
68
- '</div>' +
69
- '<div class="plupload_clearer">&nbsp;</div>' +
70
- '</div>' +
71
- '</div>' +
72
- '</div>' +
73
- '</div>' +
74
- '<input type="hidden" id="' + id + '_count" name="' + id + '_count" value="0" />' +
75
- '</div>'
76
- );
77
- }
78
-
79
- $.fn.pluploadQueue = function(settings) {
80
- if (settings) {
81
- this.each(function() {
82
- var uploader, target, id;
83
-
84
- target = $(this);
85
- id = target.attr('id');
86
-
87
- if (!id) {
88
- id = plupload.guid();
89
- target.attr('id', id);
90
- }
91
-
92
- uploader = new plupload.Uploader($.extend({
93
- dragdrop : true,
94
- container : id
95
- }, settings));
96
-
97
- uploaders[id] = uploader;
98
-
99
- function handleStatus(file) {
100
- var actionClass;
101
-
102
- if (file.status == plupload.DONE) {
103
- actionClass = 'plupload_done';
104
- }
105
-
106
- if (file.status == plupload.FAILED) {
107
- actionClass = 'plupload_failed';
108
- }
109
-
110
- if (file.status == plupload.QUEUED) {
111
- actionClass = 'plupload_delete';
112
- }
113
-
114
- if (file.status == plupload.UPLOADING) {
115
- actionClass = 'plupload_uploading';
116
- }
117
-
118
- var icon = $('#' + file.id).attr('class', actionClass).find('a').css('display', 'block');
119
- if (file.hint) {
120
- icon.attr('title', file.hint);
121
- }
122
- }
123
-
124
- function updateTotalProgress() {
125
- $('span.plupload_total_status', target).html(uploader.total.percent + '%');
126
- $('div.plupload_progress_bar', target).css('width', uploader.total.percent + '%');
127
- $('span.plupload_upload_status', target).html(
128
- _('Uploaded %d/%d files').replace(/%d\/%d/, uploader.total.uploaded+'/'+uploader.files.length)
129
- );
130
- }
131
-
132
- function updateList() {
133
- var fileList = $('ul.plupload_filelist', target).html(''), inputCount = 0, inputHTML;
134
-
135
- $.each(uploader.files, function(i, file) {
136
- inputHTML = '';
137
-
138
- if (file.status == plupload.DONE) {
139
- if (file.target_name) {
140
- inputHTML += '<input type="hidden" name="' + id + '_' + inputCount + '_tmpname" value="' + plupload.xmlEncode(file.target_name) + '" />';
141
- }
142
-
143
- inputHTML += '<input type="hidden" name="' + id + '_' + inputCount + '_name" value="' + plupload.xmlEncode(file.name) + '" />';
144
- inputHTML += '<input type="hidden" name="' + id + '_' + inputCount + '_status" value="' + (file.status == plupload.DONE ? 'done' : 'failed') + '" />';
145
-
146
- inputCount++;
147
-
148
- $('#' + id + '_count').val(inputCount);
149
- }
150
-
151
- fileList.append(
152
- '<li id="' + file.id + '">' +
153
- '<div class="plupload_file_name"><span>' + file.name + '</span></div>' +
154
- '<div class="plupload_file_action"><a href="#"></a></div>' +
155
- '<div class="plupload_file_status">' + file.percent + '%</div>' +
156
- '<div class="plupload_file_size">' + plupload.formatSize(file.size) + '</div>' +
157
- '<div class="plupload_clearer">&nbsp;</div>' +
158
- inputHTML +
159
- '</li>'
160
- );
161
-
162
- handleStatus(file);
163
-
164
- $('#' + file.id + '.plupload_delete a').click(function(e) {
165
- $('#' + file.id).remove();
166
- uploader.removeFile(file);
167
-
168
- e.preventDefault();
169
- });
170
- });
171
-
172
- $('span.plupload_total_file_size', target).html(plupload.formatSize(uploader.total.size));
173
-
174
- if (uploader.total.queued === 0) {
175
- $('span.plupload_add_text', target).html(_('Add Files'));
176
- } else {
177
- $('span.plupload_add_text', target).html(_('%d files queued').replace(/%d/, uploader.total.queued));
178
- }
179
-
180
- $('a.plupload_start', target).toggleClass('plupload_disabled', uploader.files.length == (uploader.total.uploaded + uploader.total.failed));
181
-
182
- // Scroll to end of file list
183
- fileList[0].scrollTop = fileList[0].scrollHeight;
184
-
185
- updateTotalProgress();
186
-
187
- // Re-add drag message if there is no files
188
- if (!uploader.files.length && uploader.features.dragdrop && uploader.settings.dragdrop) {
189
- $('#' + id + '_filelist').append('<li class="plupload_droptext">' + _("Drag files here.") + '</li>');
190
- }
191
- }
192
-
193
- uploader.bind("UploadFile", function(up, file) {
194
- $('#' + file.id).addClass('plupload_current_file');
195
- });
196
-
197
- uploader.bind('Init', function(up, res) {
198
- renderUI(id, target);
199
-
200
- // Enable rename support
201
- if (!settings.unique_names && settings.rename) {
202
- target.on('click', '#' + id + '_filelist div.plupload_file_name span', function(e) {
203
- var targetSpan = $(e.target), file, parts, name, ext = "";
204
-
205
- // Get file name and split out name and extension
206
- file = up.getFile(targetSpan.parents('li')[0].id);
207
- name = file.name;
208
- parts = /^(.+)(\.[^.]+)$/.exec(name);
209
- if (parts) {
210
- name = parts[1];
211
- ext = parts[2];
212
- }
213
-
214
- // Display input element
215
- targetSpan.hide().after('<input type="text" />');
216
- targetSpan.next().val(name).focus().blur(function() {
217
- targetSpan.show().next().remove();
218
- }).keydown(function(e) {
219
- var targetInput = $(this);
220
-
221
- if (e.keyCode == 13) {
222
- e.preventDefault();
223
-
224
- // Rename file and glue extension back on
225
- file.name = targetInput.val() + ext;
226
- targetSpan.html(file.name);
227
- targetInput.blur();
228
- }
229
- });
230
- });
231
- }
232
-
233
- $('a.plupload_add', target).attr('id', id + '_browse');
234
-
235
- up.settings.browse_button = id + '_browse';
236
-
237
- // Enable drag/drop (see PostInit handler as well)
238
- if (up.settings.dragdrop) {
239
- up.settings.drop_element = id + '_filelist';
240
- }
241
-
242
- $('#' + id + '_container').attr('title', 'Using runtime: ' + res.runtime);
243
-
244
- $('a.plupload_start', target).click(function(e) {
245
- if (!$(this).hasClass('plupload_disabled')) {
246
- uploader.start();
247
- }
248
-
249
- e.preventDefault();
250
- });
251
-
252
- $('a.plupload_stop', target).click(function(e) {
253
- e.preventDefault();
254
- uploader.stop();
255
- });
256
-
257
- $('a.plupload_start', target).addClass('plupload_disabled');
258
- });
259
-
260
- uploader.bind("PostInit", function(up) {
261
- // features are populated only after input components are fully instantiated
262
- if (up.settings.dragdrop && up.features.dragdrop) {
263
- $('#' + id + '_filelist').append('<li class="plupload_droptext">' + _("Drag files here.") + '</li>');
264
- }
265
- });
266
-
267
- uploader.init();
268
-
269
- uploader.bind("Error", function(up, err) {
270
- var file = err.file, message;
271
-
272
- if (file) {
273
- message = err.message;
274
-
275
- if (err.details) {
276
- message += " (" + err.details + ")";
277
- }
278
-
279
- if (err.code == plupload.FILE_SIZE_ERROR) {
280
- alert(_("Error: File too large:") + " " + file.name);
281
- }
282
-
283
- if (err.code == plupload.FILE_EXTENSION_ERROR) {
284
- alert(_("Error: Invalid file extension:") + " " + file.name);
285
- }
286
-
287
- file.hint = message;
288
- $('#' + file.id).attr('class', 'plupload_failed').find('a').css('display', 'block').attr('title', message);
289
- }
290
- });
291
-
292
- uploader.bind('StateChanged', function() {
293
- if (uploader.state === plupload.STARTED) {
294
- $('li.plupload_delete a,div.plupload_buttons', target).hide();
295
- $('span.plupload_upload_status,div.plupload_progress,a.plupload_stop', target).css('display', 'block');
296
- $('span.plupload_upload_status', target).html('Uploaded ' + uploader.total.uploaded + '/' + uploader.files.length + ' files');
297
-
298
- if (settings.multiple_queues) {
299
- $('span.plupload_total_status,span.plupload_total_file_size', target).show();
300
- }
301
- } else {
302
- updateList();
303
- $('a.plupload_stop,div.plupload_progress', target).hide();
304
- $('a.plupload_delete', target).css('display', 'block');
305
- }
306
- });
307
-
308
- uploader.bind('QueueChanged', updateList);
309
-
310
- uploader.bind('FileUploaded', function(up, file) {
311
- handleStatus(file);
312
- });
313
-
314
- uploader.bind("UploadProgress", function(up, file) {
315
- // Set file specific progress
316
- $('#' + file.id + ' div.plupload_file_status', target).html(file.percent + '%');
317
-
318
- handleStatus(file);
319
- updateTotalProgress();
320
-
321
- if (settings.multiple_queues && uploader.total.uploaded + uploader.total.failed == uploader.files.length) {
322
- $(".plupload_buttons,.plupload_upload_status", target).css("display", "inline");
323
- $(".plupload_start", target).addClass("plupload_disabled");
324
- $('span.plupload_total_status,span.plupload_total_file_size', target).hide();
325
- }
326
- });
327
-
328
- // Call setup function
329
- if (settings.setup) {
330
- settings.setup(uploader);
331
- }
332
- });
333
-
334
- return this;
335
- } else {
336
- // Get uploader instance for specified element
337
- return uploaders[$(this[0]).attr('id')];
338
- }
339
- };
340
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
products/photocrati_nextgen/modules/nextgen_admin/class.nextgen_admin_installer.php CHANGED
@@ -8,8 +8,12 @@ class C_NextGen_Admin_Installer
8
  // were statically set rather than dynamically using a handler. Therefore, we need
9
  // to delete those static values
10
  $module_name = 'photocrati-nextgen_admin';
11
- $settings = C_NextGen_Settings::get_instance();
12
- $modules = $settings->get('pope_module_list', array());
 
 
 
 
13
  $cleanup = FALSE;
14
  foreach ($modules as $module) {
15
  if (strpos($module, $module_name) !== FALSE) {
8
  // were statically set rather than dynamically using a handler. Therefore, we need
9
  // to delete those static values
10
  $module_name = 'photocrati-nextgen_admin';
11
+ $modules = get_option('pope_module_list', array());
12
+ if (!$modules) {
13
+ $settings = C_NextGen_Settings::get_instance();
14
+ $modules = $settings->get('pope_module_list', array());
15
+ }
16
+
17
  $cleanup = FALSE;
18
  foreach ($modules as $module) {
19
  if (strpos($module, $module_name) !== FALSE) {
products/photocrati_nextgen/modules/nextgen_basic_gallery/adapter.ajax_pagination_actions.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
-
3
- class A_Ajax_Pagination_Actions extends Mixin
4
- {
5
- function get_displayed_gallery_page_action()
6
- {
7
- $retval = array();
8
- $mapper = $this->object->get_registry()->get_utility('I_Displayed_Gallery_Mapper');
9
-
10
- if (($id = $this->object->param('displayed_gallery_id')))
11
- {
12
- // retrieve by transient id
13
- $factory = $this->object->get_registry()->get_utility('I_Component_Factory');
14
- $displayed_gallery = $factory->create('displayed_gallery', NULL, $mapper);
15
- $displayed_gallery->apply_transient($id);
16
- $displayed_gallery->transient_id = $id;
17
-
18
- // render the displayed gallery
19
- $this->renderer = $this->get_registry()->get_utility('I_Displayed_Gallery_Renderer');
20
- $retval['html'] = $this->renderer->render($displayed_gallery, TRUE);
21
- $retval['displayed_gallery_id'] = $displayed_gallery->id();
22
- }
23
- return $retval;
24
- }
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
products/photocrati_nextgen/modules/nextgen_gallery_display/class.displayed_gallery.php CHANGED
@@ -665,7 +665,7 @@ class Mixin_Displayed_Gallery_Queries extends Mixin
665
  }
666
  }
667
  // Given maximum entity count can't be set, always use global setting to avoid confusion
668
- $max = intval(C_Photocrati_Settings_Manager::get('maximum_entity_count', 500));
669
  if ($retval > $max) {
670
  $retval = $max;
671
  }
665
  }
666
  }
667
  // Given maximum entity count can't be set, always use global setting to avoid confusion
668
+ $max = intval(C_NextGen_Settings::get_instance()->get('maximum_entity_count', 500));
669
  if ($retval > $max) {
670
  $retval = $max;
671
  }
products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php CHANGED
@@ -2,8 +2,7 @@
2
 
3
  /***
4
  {
5
- Module: photocrati-nextgen_gallery_display,
6
- Depends: { photocrati-simple_html_dom }
7
  }
8
  ***/
9
 
2
 
3
  /***
4
  {
5
+ Module: photocrati-nextgen_gallery_display
 
6
  }
7
  ***/
8
 
products/photocrati_nextgen/modules/nextgen_other_options/adapter.reset_form.php CHANGED
@@ -31,9 +31,12 @@ class A_Reset_Form extends Mixin
31
  C_Photocrati_Cache::flush('all');
32
 
33
  // Uninstall the plugin
34
- $installer = C_Photocrati_Installer::get_instance();
35
- $settings = C_NextGen_Settings::get_instance();
36
- $installer->uninstall(NGG_PLUGIN_BASENAME);
 
 
 
37
 
38
  // removes all ngg_options entry in wp_options
39
  $settings->reset();
31
  C_Photocrati_Cache::flush('all');
32
 
33
  // Uninstall the plugin
34
+ $settings = C_NextGen_Settings::get_instance();
35
+
36
+ if (defined('NGG_PRO_PLUGIN_VERSION') || defined('NEXTGEN_GALLERY_PRO_VERSION'))
37
+ C_Photocrati_Installer::uninstall('photocrati-nextgen-pro');
38
+
39
+ C_Photocrati_Installer::uninstall('photocrati-nextgen');
40
 
41
  // removes all ngg_options entry in wp_options
42
  $settings->reset();
products/photocrati_nextgen/modules/ngglegacy/admin/setup.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
- if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
3
-
4
- function nggallery_admin_setup() {
5
- global $wpdb, $ngg;
6
-
7
- if (isset($_POST['resetdefault'])) {
8
- check_admin_referer('ngg_uninstall');
9
-
10
- include_once ( dirname (__FILE__). '/install.php');
11
-
12
- ngg_default_options();
13
- $ngg->load_options();
14
-
15
- nggGallery::show_message(__('Reset all settings to default parameter','nggallery'));
16
- }
17
-
18
- if (isset($_POST['uninstall'])) {
19
-
20
- check_admin_referer('ngg_uninstall');
21
-
22
- include_once ( dirname (__FILE__). '/install.php');
23
-
24
- nggallery_uninstall();
25
-
26
- nggGallery::show_message(__('Uninstall sucessful ! Now delete the plugin and enjoy your life ! Good luck !','nggallery'));
27
- }
28
- ?>
29
- <div class="wrap">
30
- <h2><?php _e('Reset options', 'nggallery') ;?></h2>
31
- <form name="resetsettings" method="post">
32
- <?php wp_nonce_field('ngg_uninstall') ?>
33
- <p><?php _e('Reset all options/settings to the default installation.', 'nggallery') ;?></p>
34
- <div align="center"><input type="submit" class="button" name="resetdefault" value="<?php _e('Reset settings', 'nggallery') ;?>" onclick="javascript:check=confirm('<?php _e('Reset all options to default settings ?\n\nChoose [Cancel] to Stop, [OK] to proceed.\n','nggallery'); ?>');if(check==false) return false;" /></div>
35
- </form>
36
- </div>
37
- <?php if ( !is_multisite() || wpmu_site_admin() ) : ?>
38
- <div class="wrap">
39
- <h2><?php _e('Uninstall plugin tables', 'nggallery') ;?></h2>
40
-
41
- <form name="resetsettings" method="post">
42
- <div>
43
- <?php wp_nonce_field('ngg_uninstall') ?>
44
- <p><?php _e('You don\'t like NextGEN Gallery ?', 'nggallery') ;?></p>
45
- <p><?php _e('No problem, before you deactivate this plugin press the Uninstall Button, because deactivating NextGEN Gallery does not remove any data that may have been created. ', 'nggallery') ;?>
46
- </div>
47
- <p><font color="red"><strong><?php _e('WARNING:', 'nggallery') ;?></strong><br />
48
- <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextGEN gallery is stored in the tables', 'nggallery') ;?> <strong><?php echo $wpdb->nggpictures; ?></strong>, <strong><?php echo $wpdb->nggalbum; ?></strong> <?php _e('and', 'nggallery') ;?> <strong><?php echo $wpdb->nggalbum; ?></strong>.</font></p>
49
- <div align="center">
50
- <input type="submit" name="uninstall" class="button delete" value="<?php _e('Uninstall plugin', 'nggallery') ?>" onclick="javascript:check=confirm('<?php _e('You are about to Uninstall this plugin from WordPress.\nThis action is not reversible.\n\nChoose [Cancel] to Stop, [OK] to Uninstall.\n','nggallery'); ?>');if(check==false) return false;"/>
51
- </div>
52
- </form>
53
- </div>
54
- <?php endif; ?>
55
-
56
- <?php
57
- }
58
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
products/photocrati_nextgen/modules/ngglegacy/class.ngglegacy_installer.php CHANGED
@@ -33,6 +33,8 @@ class C_NggLegacy_Installer
33
 
34
  function uninstall($hard=FALSE)
35
  {
 
 
36
  delete_option('ngg_init_check');
37
  delete_option('ngg_update_exists');
38
  delete_option( 'ngg_options' );
33
 
34
  function uninstall($hard=FALSE)
35
  {
36
+ include_once('admin/install.php');
37
+
38
  delete_option('ngg_init_check');
39
  delete_option('ngg_update_exists');
40
  delete_option( 'ngg_options' );
products/photocrati_nextgen/modules/security/class.wordpress_security_manager.php CHANGED
@@ -64,12 +64,14 @@ class Mixin_WordPress_Security_Manager extends Mixin
64
  // again
65
  global $current_user;
66
  if ($current_user->ID == 0) {
67
- if (isset($GLOBALS['HTTP_COOKIE_VARS']) && isset($GLOBALS['_COOKIE']))
68
- $current_user = NULL;
69
- foreach ($GLOBALS['HTTP_COOKIE_VARS'] as $key => $value)
70
- if (!isset($_COOKIE[$key])) {
71
- $_COOKIE[$key] = $value;
72
- }
 
 
73
  }
74
 
75
  return $this->object->get_actor(get_current_user_id(), 'user');
64
  // again
65
  global $current_user;
66
  if ($current_user->ID == 0) {
67
+ if (isset($GLOBALS['HTTP_COOKIE_VARS']) && isset($GLOBALS['_COOKIE'])) {
68
+ $current_user = NULL;
69
+ foreach ($GLOBALS['HTTP_COOKIE_VARS'] as $key => $value) {
70
+ if (!isset($_COOKIE[$key])) {
71
+ $_COOKIE[$key] = $value;
72
+ }
73
+ }
74
+ }
75
  }
76
 
77
  return $this->object->get_actor(get_current_user_id(), 'user');
products/photocrati_nextgen/modules/validation/mixin.validation.php CHANGED
@@ -49,6 +49,10 @@ class Mixin_Validation extends Mixin
49
  */
50
  function add_error($msg, $property='*')
51
  {
 
 
 
 
52
  $errors = &$this->object->_errors;
53
 
54
  if (!isset($errors[$property])) {
49
  */
50
  function add_error($msg, $property='*')
51
  {
52
+ if (!isset($this->object->_errors)) {
53
+ $this->object->_errors = array();
54
+ }
55
+
56
  $errors = &$this->object->_errors;
57
 
58
  if (!isset($errors[$property])) {
products/photocrati_nextgen/modules/wordpress_routing/adapter.wordpress_router.php CHANGED
@@ -10,7 +10,8 @@ class A_WordPress_Router extends Mixin
10
  // Set context to path if subdirectory install
11
  $parts = parse_url($this->object->get_base_url(FALSE));
12
  if (isset($parts['path'])) {
13
- $this->object->context = array_shift(explode('/index.php', $parts['path']));
 
14
  }
15
 
16
 
10
  // Set context to path if subdirectory install
11
  $parts = parse_url($this->object->get_base_url(FALSE));
12
  if (isset($parts['path'])) {
13
+ $parts = explode('/index.php', $parts['path']);
14
+ $this->object->context = array_shift($parts);
15
  }
16
 
17
 
products/photocrati_nextgen/modules/wordpress_routing/adapter.wordpress_routing_app.php CHANGED
@@ -36,7 +36,7 @@ class A_WordPress_Routing_App extends Mixin
36
  $original_url = $generated_url;
37
  $generated_parts = explode($settings->router_param_slug, $generated_url);
38
  $generated_url = $generated_parts[0];
39
- $ngg_parameters = isset($generated_parts[1]) ? array_shift(explode('?', $generated_parts[1])) : '/';
40
  $post_permalink = get_permalink(isset($_REQUEST['p']) ? $_REQUEST['p'] : 0);
41
  if ($post_permalink == '/') $post_permalink = $base_url;
42
 
36
  $original_url = $generated_url;
37
  $generated_parts = explode($settings->router_param_slug, $generated_url);
38
  $generated_url = $generated_parts[0];
39
+ $ngg_parameters = isset($generated_parts[1]) ? @array_shift(explode('?', $generated_parts[1])) : '/';
40
  $post_permalink = get_permalink(isset($_REQUEST['p']) ? $_REQUEST['p'] : 0);
41
  if ($post_permalink == '/') $post_permalink = $base_url;
42
 
products/photocrati_nextgen/product.photocrati_nextgen.php CHANGED
@@ -33,7 +33,6 @@ class P_Photocrati_NextGen extends C_Base_Product
33
  'photocrati-attach_to_post',
34
  'photocrati-nextgen_other_options',
35
  'photocrati-nextgen_pro_upgrade',
36
- 'photocrati-jsconsole',
37
  'photocrati-mediarss',
38
  'photocrati-cache',
39
  'photocrati-lightbox',
@@ -71,4 +70,4 @@ class P_Photocrati_NextGen extends C_Base_Product
71
  }
72
  }
73
 
74
- new P_Photocrati_NextGen();
33
  'photocrati-attach_to_post',
34
  'photocrati-nextgen_other_options',
35
  'photocrati-nextgen_pro_upgrade',
 
36
  'photocrati-mediarss',
37
  'photocrati-cache',
38
  'photocrati-lightbox',
70
  }
71
  }
72
 
73
+ new P_Photocrati_NextGen();
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: photocrati
3
  Tags:gallery,image,images,photo,photos,picture,pictures,slideshow,flash,media,thumbnails,photo-albums,nextgen-gallery,nextgen
4
  Requires at least: 3.6.1
5
  Tested up to: 3.8.1
6
- Stable tag: 2.0.58
7
  License: GPLv2
8
 
9
  The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 9 million downloads.
@@ -199,7 +199,16 @@ For more information, feel free to visit the official website for the NextGEN Ga
199
 
200
  == Changelog ==
201
 
202
- = V2.0.58 - 03.06.2014 =
 
 
 
 
 
 
 
 
 
203
  * Fixed: Reset jQuery to WP defaults when modified by a third-party
204
  * Fixed: Compatibility with WP jQuery Lightbox plugin
205
  * Fixed: Compatibility with Peekaboo theme
3
  Tags:gallery,image,images,photo,photos,picture,pictures,slideshow,flash,media,thumbnails,photo-albums,nextgen-gallery,nextgen
4
  Requires at least: 3.6.1
5
  Tested up to: 3.8.1
6
+ Stable tag: trunk
7
  License: GPLv2
8
 
9
  The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 9 million downloads.
199
 
200
  == Changelog ==
201
 
202
+ = V2.0.59 - 03.18.2014 =
203
+ * Changed: Separated pope_module_list from ngg_options record in options table
204
+ * Fixed: Removed code causing jQuery compatibility issues in WP Admin
205
+ * Fixed: Allow third-parties to override jQuery with Google's CDN
206
+ * Fixed: When resetting the 'jquery' handle, ensure that jquery-migrate is a dependency
207
+ * Fixed: Silenced many PHP warnings
208
+ * Fixed: Datamapper->count() not returning the correct count
209
+ * Fixed: Compatibility with Gravity Forms
210
+
211
+ = V2.0.58 - 03.09.2014 =
212
  * Fixed: Reset jQuery to WP defaults when modified by a third-party
213
  * Fixed: Compatibility with WP jQuery Lightbox plugin
214
  * Fixed: Compatibility with Peekaboo theme