From: <ji...@us...> - 2006-03-18 01:27:35
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6793/phpicalendar/functions Modified Files: ical_parser.php init.inc.php Log Message: fix display_calendarnames to use names from ics files instead of filenames Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.203 retrieving revision 1.204 diff -C2 -d -r1.203 -r1.204 *** ical_parser.php 16 Mar 2006 00:28:54 -0000 1.203 --- ical_parser.php 18 Mar 2006 01:27:30 -0000 1.204 *************** *** 97,101 **** $calnumber = 1; ! foreach ($cal_filelist as $filename) { // Find the real name of the calendar. --- 97,101 ---- $calnumber = 1; ! foreach ($cal_filelist as $cal_key=>$filename) { // Find the real name of the calendar. *************** *** 1031,1034 **** --- 1031,1035 ---- $actual_calname = $data; $master_array['calendar_name'] = $actual_calname; + $cal_displaynames[$cal_key] = $actual_calname; #correct the default calname based on filename break; case 'X-WR-TIMEZONE': *************** *** 1128,1132 **** $calendar_name = $all_cal_comb_lang; } ! $template_started = getmicrotime(); --- 1129,1133 ---- $calendar_name = $all_cal_comb_lang; } ! $cal_displayname = implode(', ', $cal_displaynames); #reset this with the correct names $template_started = getmicrotime(); Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** init.inc.php 18 Mar 2006 01:04:15 -0000 1.88 --- init.inc.php 18 Mar 2006 01:27:30 -0000 1.89 *************** *** 31,39 **** } $cpath = ''; #initialize cpath to prevent later undef warnings. ! if(isset($_REQUEST['cpath'])){ $cpath = str_replace('..','',$_REQUEST['cpath']); $calendar_path .= "/$cpath"; $tmp_dir .= "/$cpath"; ! }elseif(isset($default_cpath_check)){ $cpath = str_replace('..','',$default_cpath_check); $calendar_path .= "/$cpath"; --- 31,39 ---- } $cpath = ''; #initialize cpath to prevent later undef warnings. ! if(isset($_REQUEST['cpath'])&& $_REQUEST['cpath'] !=''){ $cpath = str_replace('..','',$_REQUEST['cpath']); $calendar_path .= "/$cpath"; $tmp_dir .= "/$cpath"; ! }elseif(isset($default_cpath_check) && $default_cpath_check !='' ){ $cpath = str_replace('..','',$default_cpath_check); $calendar_path .= "/$cpath"; |