Skip to content

Instantly share code, notes, and snippets.

@Spoygg
Created August 5, 2014 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Spoygg/a258a31ad856dc8887b7 to your computer and use it in GitHub Desktop.
Save Spoygg/a258a31ad856dc8887b7 to your computer and use it in GitHub Desktop.
diff --git a/elements/upfront-gallery/lib/ugallery.php b/elements/upfront-gallery/lib/ugallery.php
index 299098c..988638f 100644
--- a/elements/upfront-gallery/lib/ugallery.php
+++ b/elements/upfront-gallery/lib/ugallery.php
@@ -41,7 +41,7 @@ class Upfront_UgalleryView extends Upfront_Object {
labels: ' . json_encode($data['labels']) . ',
labels_length: ' . json_encode($data['labels_length']) . ',
image_labels: ' . json_encode($data['image_labels']) . ',
- grid: ' . $data['labelFilters']['length'] . ',
+ grid: ' . ($data['labelFilters']['length'] ? $data['labelFilters']['length'] : 0) . ',^M
useLightbox: '. ($data['linkTo'] == 'image' ? '1' : '0') . '
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment