From: <ji...@us...> - 2006-04-05 04:49:22
|
Update of /cvsroot/phpicalendar/phpicalendar/calendars In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22749/phpicalendar/calendars Modified Files: publish.ical.php publish.mozilla.php Log Message: bug fix for publish scripts Index: publish.ical.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/calendars/publish.ical.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** publish.ical.php 20 Mar 2006 01:35:56 -0000 1.3 --- publish.ical.php 5 Apr 2006 04:49:15 -0000 1.4 *************** *** 55,59 **** }else{ $calendar_path = ''; ! // allow/disallow publishing --- 55,59 ---- }else{ $calendar_path = ''; ! } // allow/disallow publishing *************** *** 95,125 **** // publishing ! if($_SERVER['REQUEST_METHOD'] == 'PUT') ! { // get calendar data ! if($fp = fopen('php://input','r')) ! { ! while(!@feof($fp)) ! { $data .= fgets($fp,4096); } @fclose($fp); ! } ! else ! { logmsg('unable to read input data'); } ! if(isset($data)) ! { // get calendar name $cal_arr = explode("\n",$data); ! foreach($cal_arr as $k => $v) ! { ! if(strstr($v,'X-WR-CALNAME:')) ! { $arr = explode(':',$v); $calendar_name = trim($arr[1]); --- 95,117 ---- // publishing ! if($_SERVER['REQUEST_METHOD'] == 'PUT'){ // get calendar data ! if($fp = fopen('php://input','r')){ ! while(!@feof($fp)){ $data .= fgets($fp,4096); } @fclose($fp); ! }else{ logmsg('unable to read input data'); } ! if(isset($data)){ // get calendar name $cal_arr = explode("\n",$data); ! foreach($cal_arr as $k => $v){ ! if(strstr($v,'X-WR-CALNAME:')){ $arr = explode(':',$v); $calendar_name = trim($arr[1]); *************** *** 131,141 **** // write to file ! if($fp = fopen($calendar_path.$calendar_name.'.ics','w+')) ! { fputs($fp, $data, strlen($data) ); @fclose($fp); ! } ! else ! { logmsg( 'couldnt open file '.$calendar_path.$calendar_name.'.ics' ); } --- 123,130 ---- // write to file ! if($fp = fopen($calendar_path.$calendar_name.'.ics','w+')){ fputs($fp, $data, strlen($data) ); @fclose($fp); ! }else{ logmsg( 'couldnt open file '.$calendar_path.$calendar_name.'.ics' ); } Index: publish.mozilla.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/calendars/publish.mozilla.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** publish.mozilla.php 20 Mar 2006 01:35:56 -0000 1.2 --- publish.mozilla.php 5 Apr 2006 04:49:15 -0000 1.3 *************** *** 66,70 **** }else{ $calendar_path = ''; ! // allow/disallow publishing --- 66,70 ---- }else{ $calendar_path = ''; ! } // allow/disallow publishing |