Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26562/phpicalendar/functions
Modified Files:
ical_parser.php init.inc.php template.php
Log Message:
add year printview, fix misc bugs
Index: ical_parser.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v
retrieving revision 1.207
retrieving revision 1.208
diff -C2 -d -r1.207 -r1.208
*** ical_parser.php 20 Mar 2006 01:08:29 -0000 1.207
--- ical_parser.php 21 Mar 2006 09:52:29 -0000 1.208
***************
*** 424,428 ****
$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)) {
$start_range_time = strtotime($this_year.'-01-01 -2 weeks');
$end_range_time = strtotime($this_year.'-12-31 +2 weeks');
--- 424,428 ----
$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');
Index: init.inc.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v
retrieving revision 1.91
retrieving revision 1.92
diff -C2 -d -r1.91 -r1.92
*** init.inc.php 20 Mar 2006 01:08:29 -0000 1.91
--- init.inc.php 21 Mar 2006 09:52:29 -0000 1.92
***************
*** 135,138 ****
--- 135,140 ----
// If the calendar identifier begins with a web protocol, this is a web
// calendar.
+ $cal_filename = urldecode($cal_filename); #need to decode for substr statements to identify webcals
+ $cal_filename = str_replace(' ','%20', $cal_filename); #need to reencode blank spaces for matching with $list_webcals
if (substr($cal_filename, 0, 7) == 'http://' ||
substr($cal_filename, 0, 8) == 'https://' ||
***************
*** 148,152 ****
exit(error($lang['l_error_restrictedcal'], $cal_filename));
}
! $local_cals[] = str_replace(".ics", '', basename($cal_filename));
}
}
--- 150,154 ----
exit(error($lang['l_error_restrictedcal'], $cal_filename));
}
! $local_cals[] = urldecode(str_replace(".ics", '', basename($cal_filename)));
}
}
Index: template.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** template.php 16 Mar 2006 00:28:55 -0000 1.83
--- template.php 21 Mar 2006 09:52:29 -0000 1.84
***************
*** 62,69 ****
$loop_day = trim($match3[1]);
$parse_month = date ("Ym", strtotime($getdate));
foreach($master_array as $key => $val) {
preg_match ('/([0-9]{6})([0-9]{2})/', $key, $regs);
! if ((($regs[1] == $parse_month) && ($printview == 'month')) || (($key == $getdate) && ($printview == 'day')) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == 'week'))) {
$events_week++;
$dayofmonth = strtotime ($key);
--- 62,70 ----
$loop_day = trim($match3[1]);
$parse_month = date ("Ym", strtotime($getdate));
+ $parse_year = date ("Y", strtotime($getdate));
foreach($master_array as $key => $val) {
preg_match ('/([0-9]{6})([0-9]{2})/', $key, $regs);
! if ((($regs[1] == $parse_month) && ($printview == 'month')) || (($key == $getdate) && ($printview == 'day')) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == 'week')) || ((substr($regs[1],0,4) == $parse_year) && ($printview == 'year'))) {
$events_week++;
$dayofmonth = strtotime ($key);
|