From 270c1be5afdd310abb478ec78789230fdfa593b2 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 15 Jun 2016 10:11:41 -0400 Subject: [PATCH] Hotfix for pdf output issue When the daysOfWeek are all days just remove them from showing --- index.php | 6 +++--- models/front/events/list.php | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index e787cbe..7b80fa1 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Database Events * Plugin URI: http://www.gaslightmedia.com/ * Description: Gaslight Media Members Database. - * Version: 1.2.0 + * Version: 1.2.1 * Author: Chuck Scott * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -20,7 +20,7 @@ * @package glmMembersDatabaseEventsAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.2.0 + * @version 1.2.1 */ /* @@ -38,7 +38,7 @@ * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.0'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.1'); define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.0.18'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/front/events/list.php b/models/front/events/list.php index c88a511..e9a8f4c 100644 --- a/models/front/events/list.php +++ b/models/front/events/list.php @@ -288,7 +288,9 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction break; } } - $eventDates .= ' (' . implode(', ', $daysOfWeek) . ')'; + if ( count( $daysOfWeek ) < 7 ) { + $eventDates .= ' (' . implode(', ', $daysOfWeek) . ')'; + } } } if ( !$event['all_day'] ) { @@ -301,6 +303,7 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction } } $dates->setText($eventDates); + $dates->setWidth(220); $lineCount = $dates->getLineCount(); $dates->draw($page->getCanvas(), self::PDF_LFT_COL_X, $pdfY); -- 2.17.1