From cfbe007905bb11c120ba6eb4512112cb2a82cc4e Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 13 Nov 2003 17:34:48 +0000 Subject: Added a way to publish as webdav without a webdav server. --- calendars/publish.php | 1 + 1 file changed, 1 insertion(+) create mode 100644 calendars/publish.php (limited to 'calendars') diff --git a/calendars/publish.php b/calendars/publish.php new file mode 100644 index 0000000..fb6a025 --- /dev/null +++ b/calendars/publish.php @@ -0,0 +1 @@ + $v) { if(strstr($v,'X-WR-CALNAME:')) { $arr = explode(':',$v); $calendar_name = trim($arr[1]); break; } } $calendar_name = isset($calendar_name) ? $calendar_name : 'default'; // 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' ); } } } // for logging function logmsg($str){ if(defined('PHPICALENDAR_LOG_PUBLISHING') && PHPICALENDAR_LOG_PUBLISHING == 1) { if($fp = fopen('publish_log.txt','a+')) { $str .= "\n"; fputs($fp, $str, strlen($str) ); fclose($fp); } } } ?> \ No newline at end of file -- cgit v1.2.3