Update how to deal with start and end times.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 10 Aug 2016 20:02:54 +0000 (16:02 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 10 Aug 2016 20:02:54 +0000 (16:02 -0400)
If they both are 00:00 then all day.
If they both are the same then no ending time.

models/admin/management/events.php

index 0465d0f..599b6bb 100644 (file)
@@ -2008,8 +2008,16 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement
                         //echo '<pre>$test_date: ' . print_r( date( 'm/d/Y', $test_date), true ) . '</pre>';
                     }
                 }
-                //echo '<pre>$freq: ' . print_r( $freq, true ) . '</pre>';
-                //echo '<pre>$byday: ' . print_r( $byday, true ) . '</pre>';
+                if ( $btime === $etime ) {
+                    if ( $btime === '00:00' ) {
+                        $all_day = true;
+                    } else {
+                        $start_time_only = true;
+                    }
+                }
+                if ( $btime && $etime && $etime === '00:00' ) {
+                    $start_time_only = true;
+                }
                 // for the recurrences part
                 $recur_data = array(
                     'event'             => $event_id,