NextGen Gallery displaying wrong number of images per page in gallery.
A wordpress blog of one of our clients uses NextGen Gallery to show off his artwork. We noticed the first page contained 1 too few image and the second page displayed 1 too many.
This may be specific to the implementation of PHP on our Windows .Net hosting, but we certainly needed to fix it. From examining the plugin code, it appears the use of array_splice() was out by 1 and truncating the array of gallery entries incorrectly.
In the file nggfunctions.php, around line 307 is the following code, just make the changes highlighted in red:
// remove the element if we didn't start at the beginning if ($start > 0 ) array_splice($picturelist, 0, $start+1); // return the list of images we need array_splice($picturelist, $maxElement+1);