From a430b6f5528f4698cefb45edde90bf869f05eeda Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Tue, 21 Mar 2006 09:52:29 +0000 Subject: add year printview, fix misc bugs --- functions/template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'functions/template.php') diff --git a/functions/template.php b/functions/template.php index af93258..32e0b2d 100644 --- a/functions/template.php +++ b/functions/template.php @@ -61,10 +61,11 @@ class Page { $loop_event = trim($match1[1]); $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'))) { + 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); $dayofmonth = localizeDate ($dateFormat_day, $dayofmonth); -- cgit v1.2.3