Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8500/functions
Modified Files:
template.php
Log Message:
enable exceptions. bug fixes
Index: template.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** template.php 8 Apr 2005 06:40:52 -0000 1.64
--- template.php 16 Apr 2005 20:39:00 -0000 1.65
***************
*** 128,131 ****
--- 128,133 ----
$parse_month = date ("Ym", strtotime($getdate));
+ if (isset($the_arr)){
+
// Pull out each event
foreach($the_arr as $key => $val) {
***************
*** 157,165 ****
$events_tmp = preg_replace('!<\!-- switch description_events on -->(.*)<\!-- switch description_events off -->!is', '', $events_tmp);
}
! if (!$val['exception']) {
$events_tmp = preg_replace('!<\!-- switch exceptions on -->(.*)<\!-- switch exceptions off -->!is', '', $events_tmp);
}else{
! foreach ($val['exception'] as $except_val){
! }
}
--- 159,184 ----
$events_tmp = preg_replace('!<\!-- switch description_events on -->(.*)<\!-- switch description_events off -->!is', '', $events_tmp);
}
! if (!$val['exception'] || !isset($val['exceptions'])) {
$events_tmp = preg_replace('!<\!-- switch exceptions on -->(.*)<\!-- switch exceptions off -->!is', '', $events_tmp);
}else{
! $some_exceptions = "";
! foreach ($val['exceptions'] as $except_val){
! $except_tmp = $loop_except;
! $except_date = strtotime($except_val['date']);
! $except_date = localizeDate ('%A, %B %e %Y', $except_date);
!
! $except_tmp = str_replace('{DAYOFMONTH}', $except_date, $except_tmp);
! $except_tmp = str_replace('{EXCEPT_DESCRIPTION}', stripslashes(urldecode($except_val['event_text'])), $except_tmp);
! if (!$except_val['recur']) {
! $except_tmp = preg_replace('!<\!-- switch except_recur on -->(.*)<\!-- switch except_recur off -->!is', '', $except_tmp);
! }else{
! $except_tmp = str_replace('{EXCEPT_RECUR}', $except_val['recur'], $except_tmp);
! }
! $some_exceptions .= $except_tmp;
!
! }
! $events_tmp = preg_replace('!<\!-- switch exceptions on -->(.*)<\!-- switch exceptions off -->!is', $some_exceptions,$events_tmp );
!
!
}
***************
*** 182,186 ****
}
!
if ($events_found < 1) {
$this->page = preg_replace('!<\!-- switch results on -->(.*)<\!-- switch results off -->!is', '', $this->page);
--- 201,205 ----
}
! }
if ($events_found < 1) {
$this->page = preg_replace('!<\!-- switch results on -->(.*)<\!-- switch results off -->!is', '', $this->page);
|