aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2010-04-16 19:02:36 +0000
committerJason Oster <parasytic@users.sourceforge.net>2010-04-16 19:02:36 +0000
commit2ccdb089fcfdcb7ceb66283df426de105d22c8c3 (patch)
tree6bca161f7c2f34b9d55e281085e6ab72922e4ce7 /functions
parent227ff96b2c89e7d013f18d1298507aa815550faf (diff)
downloadphpicalendar-2ccdb089fcfdcb7ceb66283df426de105d22c8c3.tar.gz
phpicalendar-2ccdb089fcfdcb7ceb66283df426de105d22c8c3.tar.bz2
phpicalendar-2ccdb089fcfdcb7ceb66283df426de105d22c8c3.zip
Fix calendar selection bug assuming "All Calendars Combined"
Diffstat (limited to 'functions')
-rw-r--r--functions/ical_parser.php2
-rw-r--r--functions/init.inc.php4
2 files changed, 4 insertions, 2 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 61e2587..ee1f65b 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -11,7 +11,7 @@ include_once(BASE.'functions/parse/recur_functions.php');
$realcal_mtime = time();
$parse_file = true;
if ($phpiCal_config->save_parsed_cals == 'yes') {
- if (sizeof ($cal_filelist) > 1) {
+ if (count($cal_filelist) == count($all_calendars_combined)) {
// This is a special case for "all calendars combined"
$parsedcal = $phpiCal_config->tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$phpiCal_config->ALL_CALENDARS_COMBINED).'-'.$this_year;
if (file_exists($parsedcal)) {
diff --git a/functions/init.inc.php b/functions/init.inc.php
index 04069cf..3ac162b 100644
--- a/functions/init.inc.php
+++ b/functions/init.inc.php
@@ -48,9 +48,11 @@ if (isset($_GET['cal']) && $_GET['cal'] !='') {
$cal_filenames[0] = $phpiCal_config->ALL_CALENDARS_COMBINED;
}
+$all_calendars_combined = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED);
+
//load cal_filenames if $ALL_CALENDARS_COMBINED
if ($cal_filenames[0] == $phpiCal_config->ALL_CALENDARS_COMBINED){
- $cal_filenames = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED);
+ $cal_filenames = $all_calendars_combined;
}
// Separate the calendar identifiers into web calendars and local
// calendars.

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