From: Steve Sutton Date: Thu, 16 Jun 2016 16:13:11 +0000 (-0400) Subject: Update time.ly import script X-Git-Tag: v1.2.3^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=6946d8aa9eb3268e365cc38661a147f6010270ae;p=WP-Plugins%2Fglm-member-db-events.git Update time.ly import script If the event has custom dates then keep the end date same as start. --- diff --git a/index.php b/index.php index 2912d8e..fd48f78 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.2 + * Version: 1.2.3 * 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.2 + * @version 1.2.3 */ /* @@ -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.2'); +define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.2.3'); 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/admin/management/events.php b/models/admin/management/events.php index 40fc536..98daaff 100644 --- a/models/admin/management/events.php +++ b/models/admin/management/events.php @@ -1245,6 +1245,8 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement $month_of_year = 4095; $week_of_month = 63; + $custom_times = array(); + $from_date = date( 'Y-m-d', $event_data['start'] ); if ( $debug ) { echo '
$from_date: ' . print_r($from_date, true) . '
'; @@ -1454,7 +1456,7 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement $serialized_custom_times = serialize($stamp); } } - if ($recurring_event && $from_date == $to_date ) { + if ($recurring_event && $from_date == $to_date && empty( $custom_times ) ) { // Add two years to the recurring event if dates match $starting_datetime = new DateTime( $from_date ); $ending_date = $starting_datetime->modify('2 years');