NextGEN Gallery – WordPress Gallery Plugin - Version 0.51

Version Description

Download this release

Release Info

Developer alexrabe
Plugin Icon 128x128 NextGEN Gallery – WordPress Gallery Plugin
Version 0.51
Comparing to
See all releases

Code changes from version 0.50 to 0.51

admin/addgallery.php CHANGED
@@ -214,9 +214,10 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
214
  $new_pathname = strtolower(preg_replace ("/(\s+)/", '-',$galleryname));
215
  $new_pathname = preg_replace('|[^a-z0-9-]|i', '', $new_pathname);
216
 
217
- if (empty($new_pathname)) return '<font color="red">'.__('No valid gallery name!', 'nggallery'). '</font>';
218
- if ( substr(decoct(@fileperms($myabspath.$defaultpath)),1) != NGGFOLDER_PERMISSION )
219
- return '<font color="red">'.__('Directory', 'nggallery').' <strong>'.$defaultpath.'</strong> '.__('didn\'t have the permissions ', 'nggallery').NGGFOLDER_PERMISSION.'!</font>';
 
220
 
221
  $nggpath = $defaultpath.$new_pathname;
222
 
@@ -231,8 +232,8 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
231
  if (!@chmod ($myabspath.$nggpath.'/thumbs',NGGFOLDER_PERMISSION)) return ('<font color="red">'.__('Unable to set directory permissions', 'nggallery').$nggpath.'/thumbs !</font>');
232
  } else {
233
  $safemode = '<br /><font color="green">'.__('The server Safe-Mode is on !', 'nggallery');
234
- $safemode .= '<br />'.__('Please create directory ', 'nggallery').'<strong>'.$nggpath.'</strong> ';
235
- $safemode .= __('and the thumbnails directory ', 'nggallery').'<strong>'.$nggpath.'/thumbs</strong> '.__('with permission 777 manually !', 'nggallery').'</font>';
236
  }
237
  $result=$wpdb->get_var("SELECT name FROM $wpdb->nggallery WHERE name = '$galleryname' ");
238
  if ($result) {
@@ -417,6 +418,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
417
  }
418
  }
419
  $thumb->save($gallery_absfolder.$thumbfolder.$prefix.$picture,$ngg_options[thumbquality]);
 
420
  }
421
  $thumb->destruct();
422
  }
214
  $new_pathname = strtolower(preg_replace ("/(\s+)/", '-',$galleryname));
215
  $new_pathname = preg_replace('|[^a-z0-9-]|i', '', $new_pathname);
216
 
217
+ if (empty($new_pathname)) return '<font color="red">'.__('No valid gallery name!', 'nggallery'). '</font>';
218
+
219
+ if ( substr(decoct(@fileperms($myabspath.$defaultpath)),1) != decoct(NGGFOLDER_PERMISSION) )
220
+ return '<font color="red">'.__('Directory', 'nggallery').' <strong>'.$defaultpath.'</strong> '.__('didn\'t have the permissions ', 'nggallery').decoct(NGGFOLDER_PERMISSION).'!</font>';
221
 
222
  $nggpath = $defaultpath.$new_pathname;
223
 
232
  if (!@chmod ($myabspath.$nggpath.'/thumbs',NGGFOLDER_PERMISSION)) return ('<font color="red">'.__('Unable to set directory permissions', 'nggallery').$nggpath.'/thumbs !</font>');
233
  } else {
234
  $safemode = '<br /><font color="green">'.__('The server Safe-Mode is on !', 'nggallery');
235
+ $safemode .= '<br />'.__('Please create directory', 'nggallery').' <strong>'.$nggpath.'</strong> ';
236
+ $safemode .= __('and the thumbnails directory', 'nggallery').' <strong>'.$nggpath.'/thumbs</strong> '.__('with permission 777 manually !', 'nggallery').'</font>';
237
  }
238
  $result=$wpdb->get_var("SELECT name FROM $wpdb->nggallery WHERE name = '$galleryname' ");
239
  if ($result) {
418
  }
419
  }
420
  $thumb->save($gallery_absfolder.$thumbfolder.$prefix.$picture,$ngg_options[thumbquality]);
421
+ if (!@chmod ($gallery_absfolder.$thumbfolder.$prefix.$picture, NGGFILE_PERMISSION)) return '<font color="red">'.__('Error, the file permissions could not set','nggallery').'</font>';
422
  }
423
  $thumb->destruct();
424
  }
admin/album.php CHANGED
@@ -16,7 +16,7 @@ function nggallery_admin_manage_album() {
16
 
17
  if ($_POST['act_album'] > 0){
18
  $albumid = $_POST['act_album'];
19
- echo $_POST['sortorder'];
20
  // get variable galleryContainer
21
  parse_str($_POST['sortorder']);
22
  if (is_array($galleryContainer)){
16
 
17
  if ($_POST['act_album'] > 0){
18
  $albumid = $_POST['act_album'];
19
+
20
  // get variable galleryContainer
21
  parse_str($_POST['sortorder']);
22
  if (is_array($galleryContainer)){
changelog.txt CHANGED
@@ -1,6 +1,11 @@
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
 
 
 
 
 
4
  V0.50 - 28.05.2007
5
  - NEW : Select multiple files for upload (THX to Diego A., http://www.fyneworks.com)
6
  - NEW : Sidebar widget contain now Slideshow, recent images and random images
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
+ V0.51 - 28.05.2007
5
+ - Bugfix : Thumbnail permission not set correct
6
+ - Bugfix : Folder permission check wrong
7
+ - Bugfix : Remove echo in album (THX to Lazy)
8
+
9
  V0.50 - 28.05.2007
10
  - NEW : Select multiple files for upload (THX to Diego A., http://www.fyneworks.com)
11
  - NEW : Sidebar widget contain now Slideshow, recent images and random images
lang/nggallery.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: NextGEN Gallery\n"
4
  "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-05-28 00:51+0100\n"
6
  "Last-Translator: Alex Rabe\n"
7
  "Language-Team: Alex Rabe\n"
8
  "MIME-Version: 1.0\n"
@@ -20,8 +20,8 @@ msgid "Sorry, NextGEN Gallery works only under WordPress 2.1 or higher"
20
  msgstr ""
21
 
22
  #: ../nggbutton.php:36
23
- #: ../admin/addgallery.php:239
24
- #: ../admin/addgallery.php:290
25
  #: ../admin/admin.php:42
26
  #: ../admin/manage.php:44
27
  #: ../admin/manage.php:303
@@ -492,139 +492,140 @@ msgstr ""
492
  msgid "No valid gallery name!"
493
  msgstr ""
494
 
495
- #: ../admin/addgallery.php:219
496
- #: ../admin/addgallery.php:224
497
- #: ../admin/addgallery.php:259
498
- #: ../admin/addgallery.php:263
499
  msgid "Directory"
500
  msgstr ""
501
 
502
- #: ../admin/addgallery.php:219
503
  msgid "didn't have the permissions "
504
  msgstr ""
505
 
506
- #: ../admin/addgallery.php:224
507
  msgid "already exists!"
508
  msgstr ""
509
 
510
- #: ../admin/addgallery.php:228
511
- #: ../admin/addgallery.php:230
512
- #: ../admin/addgallery.php:269
513
- #: ../admin/addgallery.php:464
514
  #: ../admin/addgallery.php:466
 
515
  msgid "Unable to create directory "
516
  msgstr ""
517
 
518
- #: ../admin/addgallery.php:229
519
- #: ../admin/addgallery.php:465
520
  #: ../admin/addgallery.php:467
 
521
  msgid "Unable to set directory permissions "
522
  msgstr ""
523
 
524
- #: ../admin/addgallery.php:231
525
  msgid "Unable to set directory permissions"
526
  msgstr ""
527
 
528
- #: ../admin/addgallery.php:233
529
  msgid "The server Safe-Mode is on !"
530
  msgstr ""
531
 
532
- #: ../admin/addgallery.php:234
533
- msgid "Please create directory "
534
  msgstr ""
535
 
536
- #: ../admin/addgallery.php:235
537
- msgid "and the thumbnails directory "
538
  msgstr ""
539
 
540
- #: ../admin/addgallery.php:235
541
  msgid "with permission 777 manually !"
542
  msgstr ""
543
 
544
- #: ../admin/addgallery.php:239
545
  msgid "already exists"
546
  msgstr ""
547
 
548
- #: ../admin/addgallery.php:242
549
  msgid "Gallery successfully created!"
550
  msgstr ""
551
 
552
- #: ../admin/addgallery.php:259
553
- #: ../admin/addgallery.php:268
554
  msgid "doesn&#96;t exist"
555
  msgstr ""
556
 
557
- #: ../admin/addgallery.php:263
558
  msgid "contains no pictures"
559
  msgstr ""
560
 
561
- #: ../admin/addgallery.php:268
562
  msgid "Thumbnail Directory"
563
  msgstr ""
564
 
565
- #: ../admin/addgallery.php:268
566
  msgid "Please create the folder <i>thumbs</i> in your gallery folder."
567
  msgstr ""
568
 
569
- #: ../admin/addgallery.php:276
570
  msgid "Database error. Could not add gallery!"
571
  msgstr ""
572
 
573
- #: ../admin/addgallery.php:290
574
  msgid "successfully created!"
575
  msgstr ""
576
 
577
- #: ../admin/addgallery.php:290
578
  msgid " pictures added."
579
  msgstr ""
580
 
581
- #: ../admin/addgallery.php:333
582
- #: ../admin/addgallery.php:371
583
  msgid "Some pictures are not writeable :"
584
  msgstr ""
585
 
586
- #: ../admin/addgallery.php:425
 
 
 
 
 
587
  msgid "Some thumbnails are not writeable :"
588
  msgstr ""
589
 
590
- #: ../admin/addgallery.php:455
591
  msgid "Uploaded file was no or a faulty zip file ! The server recognize : "
592
  msgstr ""
593
 
594
- #: ../admin/addgallery.php:470
595
  msgid "Directory already exists, please rename zip file"
596
  msgstr ""
597
 
598
- #: ../admin/addgallery.php:475
599
  msgid "Unable to unlink zip file "
600
  msgstr ""
601
 
602
- #: ../admin/addgallery.php:477
603
  msgid "Zip-File successfully unpacked"
604
  msgstr ""
605
 
606
- #: ../admin/addgallery.php:504
607
- #: ../admin/addgallery.php:511
608
  msgid "Unable to unlink file "
609
  msgstr ""
610
 
611
- #: ../admin/addgallery.php:505
612
  msgid "No gallery selected !"
613
  msgstr ""
614
 
615
- #: ../admin/addgallery.php:512
616
  msgid "Failure in database, no gallery path set !"
617
  msgstr ""
618
 
619
- #: ../admin/addgallery.php:518
620
  msgid "Error, the file could not moved to : "
621
  msgstr ""
622
 
623
- #: ../admin/addgallery.php:519
624
- msgid "Error, the file permissions could not set"
625
- msgstr ""
626
-
627
- #: ../admin/addgallery.php:539
628
  msgid " Images successfully added"
629
  msgstr ""
630
 
2
  msgstr ""
3
  "Project-Id-Version: NextGEN Gallery\n"
4
  "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2007-05-28 12:07+0100\n"
6
  "Last-Translator: Alex Rabe\n"
7
  "Language-Team: Alex Rabe\n"
8
  "MIME-Version: 1.0\n"
20
  msgstr ""
21
 
22
  #: ../nggbutton.php:36
23
+ #: ../admin/addgallery.php:240
24
+ #: ../admin/addgallery.php:291
25
  #: ../admin/admin.php:42
26
  #: ../admin/manage.php:44
27
  #: ../admin/manage.php:303
492
  msgid "No valid gallery name!"
493
  msgstr ""
494
 
495
+ #: ../admin/addgallery.php:220
496
+ #: ../admin/addgallery.php:225
497
+ #: ../admin/addgallery.php:260
498
+ #: ../admin/addgallery.php:264
499
  msgid "Directory"
500
  msgstr ""
501
 
502
+ #: ../admin/addgallery.php:220
503
  msgid "didn't have the permissions "
504
  msgstr ""
505
 
506
+ #: ../admin/addgallery.php:225
507
  msgid "already exists!"
508
  msgstr ""
509
 
510
+ #: ../admin/addgallery.php:229
511
+ #: ../admin/addgallery.php:231
512
+ #: ../admin/addgallery.php:270
 
513
  #: ../admin/addgallery.php:466
514
+ #: ../admin/addgallery.php:468
515
  msgid "Unable to create directory "
516
  msgstr ""
517
 
518
+ #: ../admin/addgallery.php:230
 
519
  #: ../admin/addgallery.php:467
520
+ #: ../admin/addgallery.php:469
521
  msgid "Unable to set directory permissions "
522
  msgstr ""
523
 
524
+ #: ../admin/addgallery.php:232
525
  msgid "Unable to set directory permissions"
526
  msgstr ""
527
 
528
+ #: ../admin/addgallery.php:234
529
  msgid "The server Safe-Mode is on !"
530
  msgstr ""
531
 
532
+ #: ../admin/addgallery.php:235
533
+ msgid "Please create directory"
534
  msgstr ""
535
 
536
+ #: ../admin/addgallery.php:236
537
+ msgid "and the thumbnails directory"
538
  msgstr ""
539
 
540
+ #: ../admin/addgallery.php:236
541
  msgid "with permission 777 manually !"
542
  msgstr ""
543
 
544
+ #: ../admin/addgallery.php:240
545
  msgid "already exists"
546
  msgstr ""
547
 
548
+ #: ../admin/addgallery.php:243
549
  msgid "Gallery successfully created!"
550
  msgstr ""
551
 
552
+ #: ../admin/addgallery.php:260
553
+ #: ../admin/addgallery.php:269
554
  msgid "doesn&#96;t exist"
555
  msgstr ""
556
 
557
+ #: ../admin/addgallery.php:264
558
  msgid "contains no pictures"
559
  msgstr ""
560
 
561
+ #: ../admin/addgallery.php:269
562
  msgid "Thumbnail Directory"
563
  msgstr ""
564
 
565
+ #: ../admin/addgallery.php:269
566
  msgid "Please create the folder <i>thumbs</i> in your gallery folder."
567
  msgstr ""
568
 
569
+ #: ../admin/addgallery.php:277
570
  msgid "Database error. Could not add gallery!"
571
  msgstr ""
572
 
573
+ #: ../admin/addgallery.php:291
574
  msgid "successfully created!"
575
  msgstr ""
576
 
577
+ #: ../admin/addgallery.php:291
578
  msgid " pictures added."
579
  msgstr ""
580
 
581
+ #: ../admin/addgallery.php:334
582
+ #: ../admin/addgallery.php:372
583
  msgid "Some pictures are not writeable :"
584
  msgstr ""
585
 
586
+ #: ../admin/addgallery.php:421
587
+ #: ../admin/addgallery.php:521
588
+ msgid "Error, the file permissions could not set"
589
+ msgstr ""
590
+
591
+ #: ../admin/addgallery.php:427
592
  msgid "Some thumbnails are not writeable :"
593
  msgstr ""
594
 
595
+ #: ../admin/addgallery.php:457
596
  msgid "Uploaded file was no or a faulty zip file ! The server recognize : "
597
  msgstr ""
598
 
599
+ #: ../admin/addgallery.php:472
600
  msgid "Directory already exists, please rename zip file"
601
  msgstr ""
602
 
603
+ #: ../admin/addgallery.php:477
604
  msgid "Unable to unlink zip file "
605
  msgstr ""
606
 
607
+ #: ../admin/addgallery.php:479
608
  msgid "Zip-File successfully unpacked"
609
  msgstr ""
610
 
611
+ #: ../admin/addgallery.php:506
612
+ #: ../admin/addgallery.php:513
613
  msgid "Unable to unlink file "
614
  msgstr ""
615
 
616
+ #: ../admin/addgallery.php:507
617
  msgid "No gallery selected !"
618
  msgstr ""
619
 
620
+ #: ../admin/addgallery.php:514
621
  msgid "Failure in database, no gallery path set !"
622
  msgstr ""
623
 
624
+ #: ../admin/addgallery.php:520
625
  msgid "Error, the file could not moved to : "
626
  msgstr ""
627
 
628
+ #: ../admin/addgallery.php:541
 
 
 
 
629
  msgid " Images successfully added"
630
  msgstr ""
631
 
nggallery.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: NextGEN Gallery
4
  Plugin URI: http://alexrabe.boelinger.com/?page_id=80
5
  Description: A NextGENeration Photo gallery for the WEB2.0(beta).
6
  Author: NextGEN DEV-Team
7
- Version: 0.50a
8
 
9
  Author URI: http://alexrabe.boelinger.com/
10
 
@@ -45,7 +45,7 @@ global $wpdb, $wp_version;
45
  if (version_compare($wp_version, '2.1', '>=')) {
46
 
47
  // Version and path to check version
48
- define('NGGVERSION', "0.50");
49
  define('NGGURL', "http://nextgen.boelinger.com/version.php");
50
 
51
  // define URL
4
  Plugin URI: http://alexrabe.boelinger.com/?page_id=80
5
  Description: A NextGENeration Photo gallery for the WEB2.0(beta).
6
  Author: NextGEN DEV-Team
7
+ Version: 0.51a
8
 
9
  Author URI: http://alexrabe.boelinger.com/
10
 
45
  if (version_compare($wp_version, '2.1', '>=')) {
46
 
47
  // Version and path to check version
48
+ define('NGGVERSION', "0.51");
49
  define('NGGURL', "http://nextgen.boelinger.com/version.php");
50
 
51
  // define URL
nggfunctions.php CHANGED
@@ -394,9 +394,11 @@ function ngg_get_thumbnail_folder($gallerypath, $include_Abspath = TRUE) {
394
  if (!$include_Abspath) $gallerypath = WINABSPATH.$gallerypath;
395
  if (is_dir($gallerypath."/thumbs")) return "/thumbs/";
396
  if (is_dir($gallerypath."/tumbs")) return "/tumbs/";
397
- if (!is_dir($gallerypath."/thumbs")) {
398
- mkdir($gallerypath."/thumbs");
399
- return "/thumbs/";
 
 
400
  }
401
  return FALSE;
402
 
394
  if (!$include_Abspath) $gallerypath = WINABSPATH.$gallerypath;
395
  if (is_dir($gallerypath."/thumbs")) return "/thumbs/";
396
  if (is_dir($gallerypath."/tumbs")) return "/tumbs/";
397
+ if (!SAFE_MODE) {
398
+ if (!is_dir($gallerypath."/thumbs")) {
399
+ mkdir($gallerypath."/thumbs");
400
+ return "/thumbs/";
401
+ }
402
  }
403
  return FALSE;
404
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://alexrabe.boelinger.com/?page_id=80
4
  Tags: photos, flash, slideshow, images, gallery, media, admin, post
5
  Requires at least: 2.1.3
6
  Tested up to: 2.2
7
- Stable tag: 0.50
8
 
9
  NextGEN Gallery is a full integrated Image Gallery plugin for WordPress.
10
 
4
  Tags: photos, flash, slideshow, images, gallery, media, admin, post
5
  Requires at least: 2.1.3
6
  Tested up to: 2.2
7
+ Stable tag: 0.51
8
 
9
  NextGEN Gallery is a full integrated Image Gallery plugin for WordPress.
10