Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30531/phpicalendar/functions
Modified Files:
ical_parser.php init.inc.php
Log Message:
change date calcs to allow rss feeds to go across years
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.216
retrieving revision 1.217
diff -C2 -d -r1.216 -r1.217
*** ical_parser.php 12 Nov 2006 07:34:34 -0000 1.216
--- ical_parser.php 14 Nov 2006 07:00:51 -0000 1.217
***************
*** 25,35 ****
}
- // what date we want to get data for (for day calendar)
- if (!isset($getdate) || $getdate == '') $getdate = date('Ymd');
- preg_match ("/([0-9]{4})([0-9]{2})([0-9]{2})/", $getdate, $day_array2);
- $this_day = $day_array2[3];
- $this_month = $day_array2[2];
- $this_year = $day_array2[1];
-
// reading the file if it's allowed
$parse_file = true;
--- 25,28 ----
***************
*** 428,440 ****
$start_date_time = strtotime($start_date);
! $this_month_start_time = strtotime($this_year.$this_month.'01');
! if ($current_view == 'year' || ($save_parsed_cals == 'yes' && !$is_webcal)|| $current_view == 'print' && $printview == 'year') {
! $start_range_time = strtotime($this_year.'-01-01 -2 weeks');
! $end_range_time = strtotime($this_year.'-12-31 +2 weeks');
! } else {
! $start_range_time = strtotime('-1 month -2 day', $this_month_start_time);
! $end_range_time = strtotime('+2 month +2 day', $this_month_start_time);
}
-
foreach ($rrule_array as $key => $val) {
switch($key) {
--- 421,438 ----
$start_date_time = strtotime($start_date);
! if (!isset($fromdate)){
! #this should happen if not in one of the rss views
! $this_month_start_time = strtotime($this_year.$this_month.'01');
! if ($current_view == 'year' || ($save_parsed_cals == 'yes' && !$is_webcal)|| $current_view == 'print' && $printview == 'year') {
! $start_range_time = strtotime($this_year.'-01-01 -2 weeks');
! $end_range_time = strtotime($this_year.'-12-31 +2 weeks');
! } else {
! $start_range_time = strtotime('-1 month -2 day', $this_month_start_time);
! $end_range_time = strtotime('+2 month +2 day', $this_month_start_time);
! }
! }else{
! $start_range_time = strtotime($fromdate);
! $end_range_time = strtotime($todate)+60*60*24;
}
foreach ($rrule_array as $key => $val) {
switch($key) {
Index: init.inc.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -d -r1.104 -r1.105
*** init.inc.php 12 Nov 2006 08:06:30 -0000 1.104
--- init.inc.php 14 Nov 2006 07:00:51 -0000 1.105
***************
*** 1,4 ****
<?php
! $phpicalendar_version = '2.22';
// uncomment when developing, comment for shipping version
//error_reporting (E_ERROR | E_WARNING | E_PARSE);
--- 1,4 ----
<?php
! $phpicalendar_version = '2.23 rc1';
// uncomment when developing, comment for shipping version
//error_reporting (E_ERROR | E_WARNING | E_PARSE);
***************
*** 95,98 ****
--- 95,103 ----
}
+ preg_match ("/([0-9]{4})([0-9]{2})([0-9]{2})/", $getdate, $day_array2);
+ $this_day = $day_array2[3];
+ $this_month = $day_array2[2];
+ $this_year = $day_array2[1];
+
if (ini_get('max_execution_time') < 60) {
@ini_set('max_execution_time', '60');
|