From 5608a21fee3946d4962adf48c8251c0999a70ae7 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Wed, 16 May 2007 22:24:44 +0000 Subject: modify to reduce memory use in monthbottom; also add location display to month display --- functions/template.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'functions') diff --git a/functions/template.php b/functions/template.php index 5b7953f..c7f705b 100644 --- a/functions/template.php +++ b/functions/template.php @@ -942,6 +942,7 @@ class Page { $switch['EVENT'] = ' '; } } + $switch['EVENT'] .= (isset($val['location'])) ? "".$val['location']."" : ''; } } } @@ -998,11 +999,14 @@ class Page { do { if (isset($master_array[$m_start])) { foreach ($master_array[$m_start] as $cal_time => $event_times) { - $switch['CAL'] = $cal; - $switch['START_DATE'] = localizeDate ($dateFormat_week_list, $u_start); + # $switch['CAL'] = $cal; + # $switch['START_DATE'] = localizeDate ($dateFormat_week_list, $u_start); + $start_date = localizeDate ($dateFormat_week_list, $u_start); foreach ($event_times as $uid => $val) { if (isset($seen_events[$uid])) continue; $seen_events[$uid] = 1; + $switch['CAL'] = $cal; + $switch['START_DATE'] = $start_date; $switch['CALNAME'] = $val['calname']; if (!isset($val['event_start'])) { $switch['START_TIME'] = $lang['l_all_day']; @@ -1027,13 +1031,14 @@ class Page { $middle .= $temp; $i = ($i == 1) ? 0 : 1; } + unset ($switch); } } } $u_start = strtotime("+1 day", $u_start); $m_start = date('Ymd', $u_start); $check_month = date('m', $u_start); - unset ($switch); + # unset ($switch); } while ($this_month == $check_month); $this->page = preg_replace('!<\!-- loop showbottomevents_odd on -->(.*)<\!-- loop showbottomevents_even off -->!is', $middle, $this->page); -- cgit v1.2.3