aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2010-04-15 18:43:53 +0000
committerJason Oster <parasytic@users.sourceforge.net>2010-04-15 18:43:53 +0000
commita412a2938e0708db0cfd4ba55527e58f6ebdf465 (patch)
treea7544c8d370b23fe16f4734352d36ec2eca59c81
parent2983cba296e02cc31fecaf4507f9c2944f13754d (diff)
downloadphpicalendar-a412a2938e0708db0cfd4ba55527e58f6ebdf465.zip
phpicalendar-a412a2938e0708db0cfd4ba55527e58f6ebdf465.tar.gz
phpicalendar-a412a2938e0708db0cfd4ba55527e58f6ebdf465.tar.bz2
Another additional performance improvement: Call availableCalendars() only once
-rw-r--r--day.php5
-rw-r--r--month.php5
-rw-r--r--week.php5
-rw-r--r--year.php5
4 files changed, 12 insertions, 8 deletions
diff --git a/day.php b/day.php
index ad01fcd..0a93bfb 100644
--- a/day.php
+++ b/day.php
@@ -36,13 +36,14 @@ $start_week_time = strtotime(dateOfWeek($getdate, $phpiCal_config->week_start_da
// select for calendars
-$list_icals = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED));
+$available = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED);
+$list_icals = display_ical_list($available);
$list_years = list_years();
$list_months = list_months();
$list_weeks = list_weeks();
$list_jumps = list_jumps();
$list_calcolors = list_calcolors();
-$list_icals_pick = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED), TRUE);
+$list_icals_pick = display_ical_list($available, TRUE);
// login/logout
$is_logged_in = ($username != '' && !$invalid_login) ? true : false;
diff --git a/month.php b/month.php
index 9c2953b..43d22d9 100644
--- a/month.php
+++ b/month.php
@@ -46,13 +46,14 @@ $thisday2 = localizeDate($dateFormat_week_list, $unix_time);
$num_of_events2 = 0;
// select for calendars
-$list_icals = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED));
+$available = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED);
+$list_icals = display_ical_list($available);
$list_years = list_years();
$list_months = list_months();
$list_weeks = list_weeks();
$list_jumps = list_jumps();
$list_calcolors = list_calcolors();
-$list_icals_pick = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED), TRUE);
+$list_icals_pick = display_ical_list($available, TRUE);
// login/logout
$is_logged_in = ($username != '' && !$invalid_login) ? true : false;
diff --git a/week.php b/week.php
index f755491..3ad2412 100644
--- a/week.php
+++ b/week.php
@@ -37,13 +37,14 @@ $this_month = $day_array2[2];
$this_year = $day_array2[1];
// select for calendars
-$list_icals = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED));
+$available = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED);
+$list_icals = display_ical_list($available);
$list_years = list_years();
$list_months = list_months();
$list_weeks = list_weeks();
$list_jumps = list_jumps();
$list_calcolors = list_calcolors();
-$list_icals_pick = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED), TRUE);
+$list_icals_pick = display_ical_list($available, TRUE);
// login/logout
$is_logged_in = ($username != '' && !$invalid_login) ? true : false;
diff --git a/year.php b/year.php
index bef2fd6..fc93feb 100644
--- a/year.php
+++ b/year.php
@@ -23,7 +23,8 @@ $this_month = $day_array2[2];
$this_year = $day_array2[1];
// select for calendars
-$list_icals = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED));
+$available = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED);
+$list_icals = display_ical_list($available);
$list_years = list_years();
$list_months = list_months();
$list_weeks = list_weeks();
@@ -31,7 +32,7 @@ $list_jumps = list_jumps();
$list_calcolors = '<img src="templates/'.$template.'/images/allday_dot.gif" alt=" " width="11" height="10" border="0" />'.$lang['l_all_day'].'<br>
<img src="templates/'.$template.'/images/event_dot.gif" alt=" " width="11" height="10" border="0" />'.$lang['l_event']."<br>";
;
-$list_icals_pick = display_ical_list(availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED), TRUE);
+$list_icals_pick = display_ical_list($available, TRUE);
// login/logout
$is_logged_in = ($username != '' && !$invalid_login) ? true : false;

© 2014-2020 Faster IT GmbH | imprint | privacy policy