[EventCalendar] EventCalendar BETA 3.1.pre12

Alex Tingle alex at firetree.net
Sat Sep 2 10:47:55 UTC 2006


Hallo Michel,

On Sat, 2 Sep 2006 11:24:56 +0200
"Michel Vuijlsteke" wrote:

> In 3.1.pre12 it looks as if the wrong date is being saved when first
> publishing/saving entries. 
> 
> I entered three separate events dated September 14th, 15th and 16th, 2006,
> each from 19h to 22h30. They were all was saved as occurring October 29th
> 2005, 22h45-22h45.
> 
> When I edit the entry, correct the date and then save, the correct date is
> set. 

You'll be amazed to learn that I don't have this problem ;-)

Can you say what version of WP you are using?


By the way. Here's a patch that fixes the double schedule problem when new event postings are made...

Index: admin.php
===================================================================
RCS file: /srv/share/cvs/wordpress/wp-content/plugins/eventcalendar3/admin.php,v
retrieving revision 1.15
diff -u -r1.15 admin.php
--- admin.php   1 Sep 2006 15:47:33 -0000       1.15
+++ admin.php   2 Sep 2006 10:46:51 -0000
@@ -232,6 +232,13 @@
     if(!$_POST)
         return;

+    // Ensure that we only save each post once.
+    if(isset($this->save_post_called) && $this->save_post_called[$post_ID])
+        return;
+    if(!isset($this->save_post_called))
+       $this->save_post_called=array();
+    $this->save_post_called[$post_ID]=true;
+
     global $ec3,$wpdb;
     // If this post is no longer an event, then purge all schedule records.
     if(isset($_POST['ec3_purge']) && 1==(int)($_POST['ec3_purge']))


-Alex

-- 
:: Let me solve your problems: http://www.firetree.net/consulting/
:: alex.tingle AT firetree.net  +44-7901-552763 



More information about the EventCalendar mailing list