Version Description
Download this release
Release Info
Developer | alexrabe |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
- admin/album.php +1 -1
- admin/functions.php +2 -2
- changelog.txt +4 -0
- nggallery.php +2 -2
- nggfunctions.php +6 -4
admin/album.php
CHANGED
@@ -362,7 +362,7 @@ function showDialog() {
|
|
362 |
</tr>
|
363 |
<tr>
|
364 |
<th>
|
365 |
-
<?php _e('Select a preview image:', 'nggallery');
|
366 |
<select name="previewpic" style="width:95%" >
|
367 |
<option value="0"><?php _e('No picture', 'nggallery'); ?></option>
|
368 |
<?php
|
362 |
</tr>
|
363 |
<tr>
|
364 |
<th>
|
365 |
+
<?php _e('Select a preview image:', 'nggallery'); ?><br />
|
366 |
<select name="previewpic" style="width:95%" >
|
367 |
<option value="0"><?php _e('No picture', 'nggallery'); ?></option>
|
368 |
<?php
|
admin/functions.php
CHANGED
@@ -577,7 +577,7 @@ class nggAdmin{
|
|
577 |
}
|
578 |
|
579 |
$temp_zipfile = tempnam('/tmp', 'zipimport_');
|
580 |
-
$filename = basename($
|
581 |
|
582 |
//Grab the zip via cURL
|
583 |
$save = fopen ( $temp_zipfile, "w" );
|
@@ -585,7 +585,7 @@ class nggAdmin{
|
|
585 |
curl_setopt ( $ch, CURLOPT_FILE, $save );
|
586 |
curl_setopt ( $ch, CURLOPT_HEADER, 0 );
|
587 |
curl_setopt ( $ch, CURLOPT_BINARYTRANSFER, 1 );
|
588 |
-
curl_setopt ( $ch, CURLOPT_URL, $
|
589 |
$success = curl_exec ( $ch );
|
590 |
if (!$success)
|
591 |
nggGallery::show_error( __('Import via cURL failed.','nggallery') . ' Error code ' . curl_errno( $ch ) . ' : ' . curl_error( $ch ) );
|
577 |
}
|
578 |
|
579 |
$temp_zipfile = tempnam('/tmp', 'zipimport_');
|
580 |
+
$filename = basename($zipurl);
|
581 |
|
582 |
//Grab the zip via cURL
|
583 |
$save = fopen ( $temp_zipfile, "w" );
|
585 |
curl_setopt ( $ch, CURLOPT_FILE, $save );
|
586 |
curl_setopt ( $ch, CURLOPT_HEADER, 0 );
|
587 |
curl_setopt ( $ch, CURLOPT_BINARYTRANSFER, 1 );
|
588 |
+
curl_setopt ( $ch, CURLOPT_URL, $zipurl );
|
589 |
$success = curl_exec ( $ch );
|
590 |
if (!$success)
|
591 |
nggGallery::show_error( __('Import via cURL failed.','nggallery') . ' Error code ' . curl_errno( $ch ) . ' : ' . curl_error( $ch ) );
|
changelog.txt
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Alex Rabe & NextGEN DEV Team
|
3 |
|
|
|
|
|
|
|
|
|
4 |
V1.3.0 - 07.06.2009
|
5 |
- NEW : Subalbum support
|
6 |
- NEW : Search for images in the admin tab
|
1 |
NextGEN Gallery
|
2 |
by Alex Rabe & NextGEN DEV Team
|
3 |
|
4 |
+
V1.3.1
|
5 |
+
- Bugfix : Fixed ZIP upload, wrong variable used
|
6 |
+
- Bugfix : Check for array before foreach in album missing
|
7 |
+
|
8 |
V1.3.0 - 07.06.2009
|
9 |
- NEW : Subalbum support
|
10 |
- NEW : Search for images in the admin tab
|
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 Web 2.0.
|
6 |
Author: Alex Rabe
|
7 |
-
Version: 1.3.
|
8 |
|
9 |
Author URI: http://alexrabe.boelinger.com/
|
10 |
|
@@ -44,7 +44,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
44 |
if (!class_exists('nggLoader')) {
|
45 |
class nggLoader {
|
46 |
|
47 |
-
var $version = '1.3.
|
48 |
var $dbversion = '1.3.1';
|
49 |
var $minium_WP = '2.7';
|
50 |
var $minium_WPMU = '2.7';
|
4 |
Plugin URI: http://alexrabe.boelinger.com/?page_id=80
|
5 |
Description: A NextGENeration Photo gallery for the Web 2.0.
|
6 |
Author: Alex Rabe
|
7 |
+
Version: 1.3.1
|
8 |
|
9 |
Author URI: http://alexrabe.boelinger.com/
|
10 |
|
44 |
if (!class_exists('nggLoader')) {
|
45 |
class nggLoader {
|
46 |
|
47 |
+
var $version = '1.3.1';
|
48 |
var $dbversion = '1.3.1';
|
49 |
var $minium_WP = '2.7';
|
50 |
var $minium_WPMU = '2.7';
|
nggfunctions.php
CHANGED
@@ -346,14 +346,16 @@ function nggCreateAlbum( $galleriesID, $template = 'extend', $album = 0) {
|
|
346 |
// get the counter values
|
347 |
$picturesCounter = $wpdb->get_results('SELECT galleryid, COUNT(*) as counter FROM '.$wpdb->nggpictures.' WHERE galleryid IN (\''.implode('\',\'', $galleriesID).'\') AND exclude != 1 GROUP BY galleryid', OBJECT_K);
|
348 |
if ( is_array($picturesCounter) ) {
|
349 |
-
|
350 |
-
|
351 |
}
|
352 |
|
353 |
// get the id's of the preview images
|
354 |
$imagesID = array();
|
355 |
-
|
356 |
-
|
|
|
|
|
357 |
$albumPreview = $wpdb->get_results('SELECT pid, filename FROM '.$wpdb->nggpictures.' WHERE pid IN (\''.implode('\',\'', $imagesID).'\')', OBJECT_K);
|
358 |
|
359 |
// re-order them and populate some
|
346 |
// get the counter values
|
347 |
$picturesCounter = $wpdb->get_results('SELECT galleryid, COUNT(*) as counter FROM '.$wpdb->nggpictures.' WHERE galleryid IN (\''.implode('\',\'', $galleriesID).'\') AND exclude != 1 GROUP BY galleryid', OBJECT_K);
|
348 |
if ( is_array($picturesCounter) ) {
|
349 |
+
foreach ($picturesCounter as $key => $value)
|
350 |
+
$unsort_galleries[$key]->counter = $value->counter;
|
351 |
}
|
352 |
|
353 |
// get the id's of the preview images
|
354 |
$imagesID = array();
|
355 |
+
if ( is_array($unsort_galleries) ) {
|
356 |
+
foreach ($unsort_galleries as $gallery_row)
|
357 |
+
$imagesID[] = $gallery_row->previewpic;
|
358 |
+
}
|
359 |
$albumPreview = $wpdb->get_results('SELECT pid, filename FROM '.$wpdb->nggpictures.' WHERE pid IN (\''.implode('\',\'', $imagesID).'\')', OBJECT_K);
|
360 |
|
361 |
// re-order them and populate some
|