Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 6e58515

Browse files
authored
Updated for my implementation of a fix
1 parent bd9545f commit 6e58515

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ This matches picture selection I see on pages 1 and 2.
4242
## My implementation of a fix ##
4343
For my impletation of a fix I read all of the gallery into an array then select the portion of the array needed for each page. While not ideal particularly for large galleries it does fix the problem.
4444
```
45-
$picarray = $wpdb->get_col("SELECT pid FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY {$ngg->options['galSort']} {$ngg->options['galSortDir']} LIMIT $start, 10 ");
45+
if ( $galleryID != 0 ){
46+
$picarray = $wpdb->get_col("SELECT pid FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY {$ngg->options['galSort']} {$ngg->options['galSortDir']} ");
47+
$picarray = array_slice($picarray, $start, 10 );
48+
}
4649
```
4750

4851
## Bug Status at NextGEN ##
4952
As of 8/27/2018 NextGEN has a test version of the plugin which fixes the problem but it has not yet been released.
50-
51-
52-

0 commit comments

Comments
 (0)