diff options
author | Wesley Miaw <josuah@users.sourceforge.net> | 2005-11-24 01:42:49 +0000 |
---|---|---|
committer | Wesley Miaw <josuah@users.sourceforge.net> | 2005-11-24 01:42:49 +0000 |
commit | 2a97a948d49840d9342a3cd64a0331d4f3071bb9 (patch) | |
tree | d87cd6fde3db2ed8059036afc7671a633b583290 /functions/calendar_functions.php | |
parent | b6dea5956e20b9ea356df02b5046867cd5205553 (diff) | |
download | phpicalendar-2a97a948d49840d9342a3cd64a0331d4f3071bb9.tar.gz phpicalendar-2a97a948d49840d9342a3cd64a0331d4f3071bb9.tar.bz2 phpicalendar-2a97a948d49840d9342a3cd64a0331d4f3071bb9.zip |
Fixed bug that would display webcals defined in the $list_webcals
array for $ALL_CALENDARS_COMBINED even if the global $allow_webcals
was not 'yes'.
Diffstat (limited to 'functions/calendar_functions.php')
-rw-r--r-- | functions/calendar_functions.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/functions/calendar_functions.php b/functions/calendar_functions.php index 3a16ae6..c6514d5 100644 --- a/functions/calendar_functions.php +++ b/functions/calendar_functions.php @@ -14,7 +14,7 @@ // returned. function availableCalendars($username, $password, $cal_filename, $admin = false) { // Import globals. - global $allow_login, $calendar_path, $recursive_path, $support_ical, $blacklisted_cals, $list_webcals, $locked_cals, $locked_map, $apache_map, $lang, $ALL_CALENDARS_COMBINED, $_SERVER; + global $allow_webcals, $allow_login, $calendar_path, $recursive_path, $support_ical, $blacklisted_cals, $list_webcals, $locked_cals, $locked_map, $apache_map, $lang, $ALL_CALENDARS_COMBINED, $_SERVER; // Create the list of available calendars. $calendars = array(); @@ -43,7 +43,9 @@ function availableCalendars($username, $password, $cal_filename, $admin = false) $search_paths = array($calendar_path); // Add web calendars. - if ($cal_filename == $ALL_CALENDARS_COMBINED || $admin) { + if ($allow_webcals == 'yes' && + ($cal_filename == $ALL_CALENDARS_COMBINED || $admin)) + { if (!isset($http_user) && !$admin) { foreach ($list_webcals as $file) { // Make sure the URL ends with .ics. |