Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27529/functions
Modified Files:
calendar_functions.php
Log Message:
Corrected filename identification issue when selecting a specific calendar
by name, where the calendar file would fail to be found. Included a comment
explaining what is going on.
Index: calendar_functions.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/calendar_functions.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** calendar_functions.php 30 Oct 2005 01:32:44 -0000 1.11
--- calendar_functions.php 12 Nov 2005 08:21:38 -0000 1.12
***************
*** 68,72 ****
// Build the list of files we need to check.
! if ($find_all || $recursive_path == 'yes') {
// Open the directory.
$dir_handle = @opendir($search_path)
--- 68,78 ----
// Build the list of files we need to check.
! //
! // We do a full directory search if we are supposed to find all
! // calendars, the calendar we're looking for may be in a
! // subdirectory, or we are supporting the iCal repository format.
! // 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)
***************
*** 82,87 ****
}
} else {
foreach ($cal_filename_local as $filename) {
! array_push($files, "$search_path/$filename");
}
}
--- 88,95 ----
}
} else {
+ // The file process block below expects actual filenames. So
+ // we have to append '.ics' to the passed in calendar names.
foreach ($cal_filename_local as $filename) {
! array_push($files, "$search_path/$filename\.ics");
}
}
|