aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-09-03 21:51:33 +0000
committerChad Little <clittle@users.sourceforge.net>2004-09-03 21:51:33 +0000
commit4324d5ba24037635b87af499994c77ae4bc2e2be (patch)
tree419ac75f7a7068bc9c71921152c03f51b2d75469 /functions
parentc7d700d09252cdcc2f947c087b627ea9583bfad0 (diff)
downloadphpicalendar-4324d5ba24037635b87af499994c77ae4bc2e2be.tar.gz
phpicalendar-4324d5ba24037635b87af499994c77ae4bc2e2be.tar.bz2
phpicalendar-4324d5ba24037635b87af499994c77ae4bc2e2be.zip
Fix for [ 1010935 ] Empty calendars mess up legend
Diffstat (limited to 'functions')
-rw-r--r--functions/ical_parser.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 8ca1b6c..632d685 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -172,10 +172,6 @@ foreach ($cal_filelist as $filename) {
case 'END:VEVENT':
- if (!isset($master_array['-3'][$calnumber])) $master_array['-3'][$calnumber] = $actual_calname;
- if (!isset($master_array['-4'][$calnumber]['mtime'])) $master_array['-4'][$calnumber]['mtime'] = $actual_mtime;
- if (!isset($master_array['-4'][$calnumber]['filename'])) $master_array['-4'][$calnumber]['filename'] = $filename;
- if (!isset($master_array['-4'][$calnumber]['webcal'])) $master_array['-4'][$calnumber]['webcal'] = 'no';
if (!isset($url)) $url = '';
if (!isset($type)) $type = '';
@@ -1140,6 +1136,11 @@ foreach ($cal_filelist as $filename) {
$calnumber = $calnumber + 1;
}
+if (!isset($master_array['-3'][$calnumber])) $master_array['-3'][$calnumber] = $actual_calname;
+if (!isset($master_array['-4'][$calnumber]['mtime'])) $master_array['-4'][$calnumber]['mtime'] = $actual_mtime;
+if (!isset($master_array['-4'][$calnumber]['filename'])) $master_array['-4'][$calnumber]['filename'] = $filename;
+if (!isset($master_array['-4'][$calnumber]['webcal'])) $master_array['-4'][$calnumber]['webcal'] = 'no';
+
if ($parse_file) {
// Sort the array by absolute date.
if (isset($master_array) && is_array($master_array)) {

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