WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Events Made Easy] bug – same Start date and End date – end date shows today's date

[Resolved] [Plugin: Events Made Easy] bug – same Start date and End date – end date shows today's date

  • angelo_moreira
    Member

    @angelo_moreira

    Good morning/afternoon.

    I am using the events made easy plugin, first of all I want to say that you have done a great job with the plugin it’s really useful and I will definitely give a small contribution for your effort.

    I think I found a bug though, I would try to describe it as best as possible:
    – Was trying to set up an event for a client, I just had the start date so I made the start and end date the same.
    – When viewing the event calendar list the end date was set as today date.

    I did a little debugging on the plugin (don’t have long time so I couldn’t really understand all the code), and I found that the end date was returning empty and then date_i18n() function was converting the empty string to a date (today’s date).

    So on file events-manager.php line 1468 I modify the following code to not display the end date if is empty:

    changed:
    $replacement = date_i18n(substr($result, $offset, (strlen($result)-($offset+1)) ), strtotime($event[$my_date]." ".$event[$my_time]));

    to:

    if($my_date == "event_end_date" && empty($event[$my_date])){
    		$replacement = '';
    	  } else {
          	$replacement = date_i18n(substr($result, $offset, (strlen($result)-($offset+1)) ), strtotime($event[$my_date]." ".$event[$my_time]));
    	  }

    Probably not the best fix 🙂 but does the job for me.

    http://wordpress.org/extend/plugins/events-made-easy/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Events Made Easy] bug – same Start date and End date – end date shows today's date’ is closed to new replies.