|
From: <ji...@us...> - 2008-12-28 02:32:04
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30773/functions Modified Files: calendar_functions.php init.inc.php Log Message: fix for webcals Index: calendar_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/calendar_functions.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** calendar_functions.php 12 Dec 2008 06:22:58 -0000 1.28 --- calendar_functions.php 28 Dec 2008 02:31:59 -0000 1.29 *************** *** 15,19 **** function availableCalendars($username, $password, $cal_filename, $admin = false) { // Import globals. ! global $allow_webcals, $allow_login, $calendar_path, $recursive_path, $support_ical, $locked_map, $apache_map, $lang, $_SERVER, $phpiCal_config; // Create the list of available calendars. --- 15,19 ---- function availableCalendars($username, $password, $cal_filename, $admin = false) { // Import globals. ! global $list_webcals, $blacklisted_cals, $locked_cals, $locked_map, $apache_map, $lang, $_SERVER, $phpiCal_config; // Create the list of available calendars. *************** *** 22,26 **** // Grab any HTTP authentication. unset($http_user); ! if ((isset($_SERVER['PHP_AUTH_USER'])) && ($allow_login == 'yes')) { $http_user = $_SERVER['PHP_AUTH_USER']; } --- 22,26 ---- // Grab any HTTP authentication. unset($http_user); ! if ((isset($_SERVER['PHP_AUTH_USER'])) && ($phpiCal_config->allow_login == 'yes')) { $http_user = $_SERVER['PHP_AUTH_USER']; } *************** *** 47,51 **** if ($cal_filename_local[0] == $phpiCal_config->ALL_CALENDARS_COMBINED || $admin) { if (!isset($http_user) && !$admin) { ! foreach ($phpiCal_config->list_webcals as $file) { // Make sure the URL ends with .ics. if (!preg_match("/.ics$/i", $file)) continue; --- 47,51 ---- if ($cal_filename_local[0] == $phpiCal_config->ALL_CALENDARS_COMBINED || $admin) { if (!isset($http_user) && !$admin) { ! foreach ($list_webcals as $file) { // Make sure the URL ends with .ics. if (!preg_match("/.ics$/i", $file)) continue; *************** *** 75,79 **** // The latter is necessary because the calendar name cannot be // used to identify the calendar filename. ! if ($find_all || $recursive_path == 'yes' || $support_ical == 'yes') { // Open the directory. $dir_handle = @opendir($search_path) --- 75,79 ---- // The latter is necessary because the calendar name cannot be // used to identify the calendar filename. ! if ($find_all || $phpiCal_config->recursive_path == 'yes' || $phpiCal_config->support_ical == 'yes') { // Open the directory. $dir_handle = @opendir($search_path) *************** *** 115,130 **** // Make sure this is not a blacklisted calendar. $cal_name = getCalendarName($file); ! if (in_array($cal_name, $phpiCal_config->blacklisted_cals)) continue; // If HTTP authenticated, make sure this calendar is available // to the user. if (isset($http_user)) { ! if (!in_array($cal_name, $phpiCal_config->apache_map[$http_user])) continue; } // Make sure this calendar is not locked. if (!$admin && ! in_array($cal_name, $phpiCal_config->locked_cals) && ! !in_array($cal_name, $phpiCal_config->unlocked_cals)) { continue; --- 115,130 ---- // Make sure this is not a blacklisted calendar. $cal_name = getCalendarName($file); ! if (in_array($cal_name, $blacklisted_cals)) continue; // If HTTP authenticated, make sure this calendar is available // to the user. if (isset($http_user)) { ! if (!in_array($cal_name, $apache_map[$http_user])) continue; } // Make sure this calendar is not locked. if (!$admin && ! in_array($cal_name, $locked_cals) && ! !in_array($cal_name, $unlocked_cals)) { continue; Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** init.inc.php 26 Dec 2008 22:33:33 -0000 1.115 --- init.inc.php 28 Dec 2008 02:31:59 -0000 1.116 *************** *** 113,117 **** // (as defined by $allow_webcals) or if the web calendar shows up in the // list of web calendars defined in config.inc.php. ! if ($allow_webcals != 'yes' && !in_array($cal_webcalPrefix, $list_webcals) && !in_array($cal_httpPrefix, $list_webcals) && --- 113,117 ---- // (as defined by $allow_webcals) or if the web calendar shows up in the // list of web calendars defined in config.inc.php. ! if ($phpiCal_config->allow_webcals != 'yes' && !in_array($cal_webcalPrefix, $list_webcals) && !in_array($cal_httpPrefix, $list_webcals) && *************** *** 188,205 **** $uid_list = array(); #uncomment for diagnostics ! #echo "after init.inc.ics<pre>"; ! #echo "cals"; ! #print_r($cals);echo"\n\n"; ! #echo "cal_filenames"; ! #print_r($cal_filenames);echo"\n\n"; ! #echo "web_cals"; ! #print_r($web_cals);echo"\n\n"; ! #echo "local_cals"; ! #print_r($local_cals);echo"\n\n"; ! #echo "cal_filelist"; ! #print_r($cal_filelist); ! #echo "cal_displaynames"; ! #print_r($cal_displaynames); #echo "</pre><hr>"; ! ?> --- 188,199 ---- $uid_list = array(); #uncomment for diagnostics ! #echo "after init.inc.ics<pre>"; ! #echo "cals";print_r($cals);echo"\n\n"; ! #echo "cal_filenames";print_r($cal_filenames);echo"\n\n"; ! #echo "web_cals";print_r($web_cals);echo"\n\n"; ! #echo "local_cals";print_r($local_cals);echo"\n\n"; ! #echo "cal_filelist";print_r($cal_filelist); ! #echo "cal_displaynames";print_r($cal_displaynames); #echo "</pre><hr>"; ! ?> \ No newline at end of file |