aboutsummaryrefslogtreecommitdiffstats
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
parentc7d700d09252cdcc2f947c087b627ea9583bfad0 (diff)
downloadphpicalendar-4324d5ba24037635b87af499994c77ae4bc2e2be.tar.gz
phpicalendar-4324d5ba24037635b87af499994c77ae4bc2e2be.tar.bz2
phpicalendar-4324d5ba24037635b87af499994c77ae4bc2e2be.zip
Fix for [ 1010935 ] Empty calendars mess up legend
-rw-r--r--config.inc.php2
-rw-r--r--functions/ical_parser.php9
2 files changed, 6 insertions, 5 deletions
diff --git a/config.inc.php b/config.inc.php
index a53588a..e725542 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -38,7 +38,7 @@ $show_search = 'yes'; // Show the search box in the sidebar.
$allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies.
$printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above).
$show_todos = 'yes'; // Show your todo list on the side of day and week view.
-$show_completed = 'no'; // Show completed todos on your todo list.
+$show_completed = 'yes'; // Show completed todos on your todo list.
$allow_login = 'no'; // Set to yes to prompt for login to unlock calendars.
$login_cookies = 'no'; // Set to yes to store authentication information via (unencrypted) cookies. Set to no to use sessions.
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