Update time.ly import script
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 16 Jun 2016 16:13:11 +0000 (12:13 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 16 Jun 2016 16:13:11 +0000 (12:13 -0400)
If the event has custom dates then keep the end date same as start.

index.php
models/admin/management/events.php

index 2912d8e..fd48f78 100644 (file)
--- 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 <cscott@gaslightmedia.com>
  * @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.
index 40fc536..98daaff 100644 (file)
@@ -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 '<pre>$from_date: ' . print_r($from_date, true) . '</pre>';
@@ -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');