Update of /cvsroot/phpicalendar/phpicalendar
In directory sc8-pr-cvs1:/tmp/cvs-serv23543
Modified Files:
month.php week.php day.php
Log Message:
Fixed the problem of 'Go to Today' and similar links pointing to an incorrect date. It seems initialization of $today_today should be moved to functions/init.inc.php, but I didn't move it because I don't understand why any of the variables at the top of month.php, week.php, etc. are initialized there rather than in init.inc.php.
Index: month.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v
retrieving revision 1.89
retrieving revision 1.90
diff -C2 -d -r1.89 -r1.90
*** month.php 29 May 2003 05:33:55 -0000 1.89
--- month.php 26 Jun 2003 18:08:45 -0000 1.90
***************
*** 12,16 ****
$unix_time = strtotime($getdate);
! $today_today = date ('Ymd', $unix_time);
$tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time));
$yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time));
--- 12,16 ----
$unix_time = strtotime($getdate);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time));
$yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time));
Index: week.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** week.php 29 May 2003 06:27:14 -0000 1.90
--- week.php 26 Jun 2003 18:08:45 -0000 1.91
***************
*** 10,14 ****
$unix_time = strtotime($getdate);
$thisday2 = localizeDate($dateFormat_week_list, $unix_time);
! $today_today = date ('Ymd', $unix_time);
$next_week = date("Ymd", strtotime("+1 week", $unix_time));
$prev_week = date("Ymd", strtotime("-1 week", $unix_time));
--- 10,14 ----
$unix_time = strtotime($getdate);
$thisday2 = localizeDate($dateFormat_week_list, $unix_time);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$next_week = date("Ymd", strtotime("+1 week", $unix_time));
$prev_week = date("Ymd", strtotime("-1 week", $unix_time));
Index: day.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** day.php 29 May 2003 06:27:14 -0000 1.90
--- day.php 26 Jun 2003 18:08:45 -0000 1.91
***************
*** 16,20 ****
$weekstart = 1;
$unix_time = strtotime($getdate);
! $today_today = date ('Ymd', $unix_time);
$tomorrows_date = date( 'Ymd', strtotime('+1 day', $unix_time));
$yesterdays_date = date( 'Ymd', strtotime('-1 day', $unix_time));
--- 16,20 ----
$weekstart = 1;
$unix_time = strtotime($getdate);
! $today_today = date('Ymd', strtotime("now + $second_offset seconds"));
$tomorrows_date = date( 'Ymd', strtotime('+1 day', $unix_time));
$yesterdays_date = date( 'Ymd', strtotime('-1 day', $unix_time));
|