--- a/web/wp-content/plugins/event-calendar/eventcalendar3.php Tue Jan 05 09:59:49 2010 +0000
+++ b/web/wp-content/plugins/event-calendar/eventcalendar3.php Mon Feb 01 09:51:57 2010 +0000
@@ -34,7 +34,7 @@
require_once(dirname(__FILE__).'/tz.php');
-$ec3_today_id=str_replace('_0','_',ec3_strftime("ec3_%Y_%m_%d"));
+$ec3_today_id = str_replace('_0','_',ec3_strftime("ec3_%Y_%m_%d"));
/** Read the schedule table for the posts, and add an ec3_schedule array
@@ -508,12 +508,22 @@
$a=$wp_query->query_vars['ec3_after'];
else if( !empty($wp_query->query_vars['ec3_from']) )
$a=$wp_query->query_vars['ec3_from'];
- $b=$wp_query->query_vars['ec3_before'];
+
+ // clean by sam
+ if(!empty($wp_query->query_vars['ec3_before'])){
+ $b=$wp_query->query_vars['ec3_before'];
+ }
+
+ // clean by sam
+ if( !empty($a)){
if( $a=='today' )
- $a=ec3_strftime('%Y-%m-%d');
+ {$a=ec3_strftime('%Y-%m-%d');}
+ }
+ // clean by sam
+ if( !empty($a)){
if( $b=='today' )
- $b=ec3_strftime('%Y-%m-%d');
-
+ {$b=ec3_strftime('%Y-%m-%d');}
+ }
$re='/\d\d\d\d[-_]\d?\d[-_]\d?\d/';
if( !empty($a) && preg_match($re,$a) ||
!empty($b) && preg_match($re,$b) )