Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6081/phpicalendar/functions
Modified Files:
ical_parser.php list_functions.php
Log Message:
change date calcs in several files for compatibility with some php installs that fail to calculate now+something
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.199
retrieving revision 1.200
diff -C2 -d -r1.199 -r1.200
*** ical_parser.php 25 Nov 2005 22:14:54 -0000 1.199
--- ical_parser.php 30 Nov 2005 02:20:32 -0000 1.200
***************
*** 50,54 ****
$wcalc = $master_array['-4'][$z]['webcal'];
if ($wcalc == 'no') $realcal_mtime = filemtime($fname);
! $webcal_mtime = strtotime("now -$webcal_hours hours");
if (($mtime == $realcal_mtime) && ($wcalc == 'no')) {
$y++;
--- 50,54 ----
$wcalc = $master_array['-4'][$z]['webcal'];
if ($wcalc == 'no') $realcal_mtime = filemtime($fname);
! $webcal_mtime = time() - strtotime($webcal_hours * 3600);
if (($mtime == $realcal_mtime) && ($wcalc == 'no')) {
$y++;
Index: list_functions.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/list_functions.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** list_functions.php 30 Oct 2005 01:32:44 -0000 1.14
--- list_functions.php 30 Nov 2005 02:20:32 -0000 1.15
***************
*** 4,8 ****
global $second_offset, $lang, $cal;
$calName = getCalendarName($cal);
! $today = date('Ymd', strtotime("now + $second_offset seconds"));
$return = '<option value="#">'.$lang['l_jump'].'</option>';
$return .= '<option value="day.php?cal='.$calName.'&getdate='.$today.'">'.$lang['l_goday'].'</option>';
--- 4,8 ----
global $second_offset, $lang, $cal;
$calName = getCalendarName($cal);
! $today = date('Ymd', time() + $second_offset);
$return = '<option value="#">'.$lang['l_jump'].'</option>';
$return .= '<option value="day.php?cal='.$calName.'&getdate='.$today.'">'.$lang['l_goday'].'</option>';
|