Still output the location name even if they choose to hide address
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 7 Apr 2016 19:57:45 +0000 (15:57 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 7 Apr 2016 19:57:45 +0000 (15:57 -0400)
models/front/events/list.php

index c952592..c45a8bf 100644 (file)
@@ -275,6 +275,14 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
                         $address[] = $event['locations']['zip'];
                         $location = new SetaPDF_Core_Text_Block( $font, self::PDF_FONT_SIZE );
 
+                        $location->setText(implode(', ', $address));
+                        $location->draw($page->getCanvas(), self::PDF_LFT_COL_X, $pdfY);
+                        $pdfY -= self::LINE_HEIGHT;
+                    } else if ( isset($event['locations']) && !empty($event['locations'])) {
+                        $address = array();
+                        $address[] = $event['locations']['name'];
+                        $location = new SetaPDF_Core_Text_Block( $font, self::PDF_FONT_SIZE );
+
                         $location->setText(implode(', ', $address));
                         $location->draw($page->getCanvas(), self::PDF_LFT_COL_X, $pdfY);
                         $pdfY -= self::LINE_HEIGHT;