aboutsummaryrefslogtreecommitdiffstats
path: root/functions/calendar_functions.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2006-03-18 01:04:15 +0000
committerJim Hu <jimhu@users.sourceforge.net>2006-03-18 01:04:15 +0000
commit823e3a72f60962da591ef54b4bf93f4168884177 (patch)
treeb746347d1e66957cb25c3100e0fe07924db79267 /functions/calendar_functions.php
parent228125083fd7268a31dbd74e3448767c7ed5e488 (diff)
downloadphpicalendar-823e3a72f60962da591ef54b4bf93f4168884177.tar.gz
phpicalendar-823e3a72f60962da591ef54b4bf93f4168884177.tar.bz2
phpicalendar-823e3a72f60962da591ef54b4bf93f4168884177.zip
should fix all_calendars_combined selection problems
Diffstat (limited to 'functions/calendar_functions.php')
-rw-r--r--functions/calendar_functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/calendar_functions.php b/functions/calendar_functions.php
index 565f801..096246c 100644
--- a/functions/calendar_functions.php
+++ b/functions/calendar_functions.php
@@ -196,7 +196,7 @@ function getCalendarName($cal_path) {
}
// At this point, just pull the name off the file.
- return basename($cal_path, ".ics");
+ return str_replace(".ics", '', basename($cal_path));
}
// This function prints out the calendars available to the user, for
@@ -241,7 +241,7 @@ function display_ical_list($cals, $pick=FALSE) {
// if it is a webcal. So that is how we perform the comparison when
// trying to figure out if this is the selected calendar.
if($pick) {
- if (in_array($cal_encoded_tmp, explode(",", $cal))) {
+ if (in_array($cal_encoded_tmp, explode(",", $cal)) || count($cals) == count(explode(",", $cal))) {
$return .= "<option value=\"$cal_encoded_tmp\" selected=\"selected\">$cal_displayname_tmp</option>\n";
} else {
$return .= "<option value=\"$cal_encoded_tmp\">$cal_displayname_tmp</option>\n";

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