Events Made Easy
[resolved] bug - same Start date and End date - end date shows today's date (2 posts)

  1. angelo_moreira
    Posted 4 years ago #

    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:

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


    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.


  2. Franky
    Plugin Author

    Posted 4 years ago #

    Fixed here:
    Extra: if the end date is empty, it will always be the start date now. If you want to check if they are equal, use conditional tags" readme.txt eme_events.php
    See http://plugins.trac.wordpress.org/changeset/510481

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Made Easy
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic