diff --git a/unc_display.inc.php b/unc_display.inc.php index bf29f64..6ccc809 100644 --- a/unc_display.inc.php +++ b/unc_display.inc.php @@ -354,7 +354,7 @@ function unc_g_photoswipe_' . $js_code . '(index) { var options = { index: index }; - var uncg_items = ['; + var uncg_items_' . $js_code . ' = ['; foreach ($files as $F) { $out .= " { @@ -367,7 +367,7 @@ function unc_g_photoswipe_' . $js_code . '(index) { } $out .= "]; var pswpElement = document.querySelectorAll('.pswp')[0]; - var gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, uncg_items, options); + var gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, uncg_items_' . $js_code . ', options); gallery.init(); } ";