WordPress.org

Making WordPress.org

Changeset 10253


Ignore:
Timestamp:
09/11/2020 06:52:41 PM (7 weeks ago)
Author:
iandunn
Message:

Official Events: Correct end date when it earlier than the start date.

This happens when the start and end times from the WordCamp API are 00:00, but the session_start_time is used to add the time to the start_timestamp. The end_timestamp also needs to be updated when that happens.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php

    r10252 r10253  
    398398                }
    399399
    400                 if ( $event['start_timestamp'] && empty( $event['end_timestamp'] ) ) {
    401                     $event['end_timestamp'] = $event['start_timestamp'];
     400                if ( $event['start_timestamp'] ) {
     401                    if ( empty( $event['end_timestamp'] ) || $event['end_timestamp'] < $event['start_timestamp'] ) {
     402                        $event['end_timestamp'] = $event['start_timestamp'];
     403                    }
    402404                }
    403405
Note: See TracChangeset for help on using the changeset viewer.