WordPress.org

Plugin Directory

Changeset 1787564


Ignore:
Timestamp:
12/15/17 11:09:51 (6 weeks ago)
Author:
netweblogic
Message:

dev 5.8.1.21

Location:
events-manager/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • events-manager/trunk/classes/em-datetime.php

    r1786433 r1787564  
    154154     * @return EM_DateTime 
    155155     */ 
    156     public function clone(){ 
     156    public function copy(){ 
    157157        return clone $this; 
    158158    } 
  • events-manager/trunk/classes/em-event.php

    r1786433 r1787564  
    792792                $this->event_rsvp_date = $this->event_rsvp_time = $this->rsvp_end = null; 
    793793            }else{ 
    794                 $this->event_rsvp_date = $this->start()->clone()->modify($this->recurrence_rsvp_days.' days')->getDate(); 
     794                $this->event_rsvp_date = $this->start()->copy()->modify($this->recurrence_rsvp_days.' days')->getDate(); 
    795795            } 
    796796        }else{ 
     
    13971397                if( !$this->rsvp_end->valid ){ 
    13981398                    //invalid date will revert to start time 
    1399                     $this->rsvp_end = $this->start()->clone(); 
     1399                    $this->rsvp_end = $this->start()->copy(); 
    14001400                } 
    14011401            }else{ 
    14021402                //no date defined means event start date/time is used 
    1403                 $this->rsvp_end = $this->start()->clone(); 
     1403                $this->rsvp_end = $this->start()->copy(); 
    14041404            } 
    14051405        } 
     
    22552255                    if($this->event_all_day && $this->event_start_date == $this->event_end_date){ 
    22562256                        $dateStart  = $this->start()->format('Ymd'); 
    2257                         $dateEnd    = $this->end()->clone()->add( new DateInterval('P1D') )->format('Ymd'); 
     2257                        $dateEnd    = $this->end()->copy()->add( new DateInterval('P1D') )->format('Ymd'); 
    22582258                    }else{ 
    22592259                        $dateStart  = $this->start()->format('Ymd\THis'); 
     
    25222522                if( count($matching_days) > 0 ){ 
    25232523                    //first save event post data 
    2524                     $EM_DateTime = $this->start()->clone(); 
     2524                    $EM_DateTime = $this->start()->copy(); 
    25252525                    foreach( $matching_days as $day ) { 
    25262526                        //set start date/time to $EM_DateTime for relative use further on 
     
    25352535                        if( !empty($this->recurrence_rsvp_days) && is_numeric($this->recurrence_rsvp_days) ){ 
    25362536                            $event_rsvp_days = $this->recurrence_rsvp_days >= 0 ? '+'. $this->recurrence_rsvp_days: $this->recurrence_rsvp_days; 
    2537                             $event_rsvp_date = $EM_DateTime->clone()->add( new DateInterval('P'.$event_rsvp_days.'D') )->getDate(); //cloned so original object isn't modified 
     2537                            $event_rsvp_date = $EM_DateTime->copy()->add( new DateInterval('P'.$event_rsvp_days.'D') )->getDate(); //cloned so original object isn't modified 
    25382538                            $event['event_rsvp_date'] = $meta_fields['_event_rsvp_date'] = $event_rsvp_date; 
    25392539                        }else{ 
     
    26012601                foreach($events as $event_array){ /* @var $EM_Event EM_Event */ 
    26022602                    //set new start/end times to obtain accurate timestamp according to timezone and DST 
    2603                     $EM_DateTime = $this->start()->clone()->modify($event_array['event_start_date']. ' ' . $event_array['event_start_time']); 
     2603                    $EM_DateTime = $this->start()->copy()->modify($event_array['event_start_date']. ' ' . $event_array['event_start_time']); 
    26042604                    $start_timestamp = $EM_DateTime->getTimestamp(); 
    26052605                    $event['event_start'] = $meta_fields['_event_start'] = $EM_DateTime->getDateTime(true); 
     
    26932693                        } 
    26942694                        //prep ticket meta for insertion with relative info for each event date 
    2695                         $EM_DateTime = $this->start()->clone(); 
     2695                        $EM_DateTime = $this->start()->copy(); 
    26962696                        foreach($event_ids as $event_id){ 
    26972697                            $ticket['event_id'] = $event_id; 
     
    28972897            case 'yearly': 
    28982898                //Yearly is easy, we get the start date as a cloned EM_DateTime and keep adding a year until it surpasses the end EM_DateTime value.  
    2899                 $EM_DateTime = $this->start()->clone(); 
     2899                $EM_DateTime = $this->start()->copy(); 
    29002900                while( $EM_DateTime <= $this->end() ){ 
    29012901                    $matching_days[] = $EM_DateTime->getTimestamp(); 
  • events-manager/trunk/classes/em-events.php

    r1786433 r1787564  
    406406                        //if long events requested, add event to other dates too 
    407407                        if( empty($args['limit']) && $long_events && $EM_Event->end()->getDate() != $EM_Event->start()->getDate() ) { 
    408                             $next_month = $EM_Event->start()->clone()->add('P1M'); 
     408                            $next_month = $EM_Event->start()->copy()->add('P1M'); 
    409409                            while( $next_month <= $EM_Event->end() ){ 
    410410                                $events_dates[$next_month->format('Y-m-01')][] = $EM_Event; 
     
    446446                    $events_dates = array(); 
    447447                    foreach($EM_Events as $EM_Event){ 
    448                         $EM_DateTime = $EM_Event->start()->clone()->setTime(0,0,0); /* @var EM_DateTime $EM_DateTime */ 
     448                        $EM_DateTime = $EM_Event->start()->copy()->setTime(0,0,0); /* @var EM_DateTime $EM_DateTime */ 
    449449                        $events_dates[$EM_DateTime->getTimestamp()][] = $EM_Event; 
    450450                        //if long events requested, add event to other dates too 
  • events-manager/trunk/em-wpfc.php

    r1786433 r1787564  
    198198                //count events for all days this event may span 
    199199                if( $EM_Event->start()->getDate() != $EM_Event->end()->getDate() ){ 
    200                     $EM_DateTime = $EM_Event->start()->clone(); 
     200                    $EM_DateTime = $EM_Event->start()->copy(); 
    201201                    while( $EM_DateTime <= $EM_Event->end() ){ 
    202202                        $EM_DateTime->add('P1D'); 
     
    211211                    if( $allDay ){ 
    212212                        $start_date = $EM_Event->start()->format('Y-m-d\T00:00:00'); 
    213                         $end_date = $EM_Event->end()->clone()->add('P1D')->format('Y-m-d\T00:00:00'); //on all day events the end date/time is next day of end date at 00:00:00 - see end attribute on http://fullcalendar.io/docs/event_data/Event_Object/ 
     213                        $end_date = $EM_Event->end()->copy()->add('P1D')->format('Y-m-d\T00:00:00'); //on all day events the end date/time is next day of end date at 00:00:00 - see end attribute on http://fullcalendar.io/docs/event_data/Event_Object/ 
    214214                    }else{ 
    215215                        $start_date = $EM_Event->start()->format('Y-m-d\TH:i:s'); 
  • events-manager/trunk/events-manager.php

    r1786433 r1787564  
    22/* 
    33Plugin Name: Events Manager 
    4 Version: 5.8.1.20 
     4Version: 5.8.1.21 
    55Plugin URI: http://wp-events-plugin.com 
    66Description: Event registration and booking management for WordPress. Recurring events, locations, google maps, rss, ical, booking registration and more! 
  • events-manager/trunk/readme.txt

    r1786433 r1787564  
    101101== Changelog == 
    102102 
    103 = 5.8.1.20 (dev) = 
     103= 5.8.1.21 (dev) = 
    104104* added timezone support 
    105105 
  • events-manager/trunk/templates/templates/ical.php

    r1786433 r1787564  
    5858            //we get local time since we're representing a date not a time 
    5959            $dateStart  = ';VALUE=DATE:'.$EM_Event->start()->format('Ymd'); //all day 
    60             $dateEnd    = ';VALUE=DATE:'.$EM_Event->end()->clone()->add( new DateInterval('P1D') )->format('Ymd'); //add one day 
     60            $dateEnd    = ';VALUE=DATE:'.$EM_Event->end()->copy()->add( new DateInterval('P1D') )->format('Ymd'); //add one day 
    6161        }else{ 
    6262            //get date output with timezone and local time if timezone output is enabled, or UTC time if not and/or if offset is manual 
Note: See TracChangeset for help on using the changeset viewer.