You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(5) |
Feb
(25) |
Mar
(18) |
Apr
|
May
(26) |
Jun
(14) |
Jul
(1) |
Aug
(5) |
Sep
(82) |
Oct
(3) |
Nov
(130) |
Dec
(9) |
2004 |
Jan
(4) |
Feb
(62) |
Mar
|
Apr
(3) |
May
(100) |
Jun
|
Jul
(6) |
Aug
(49) |
Sep
(33) |
Oct
(47) |
Nov
(2) |
Dec
(1) |
2005 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(8) |
May
(17) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(26) |
Oct
(18) |
Nov
(37) |
Dec
(14) |
2006 |
Jan
(2) |
Feb
(18) |
Mar
(34) |
Apr
(52) |
May
(7) |
Jun
(3) |
Jul
(2) |
Aug
(10) |
Sep
|
Oct
|
Nov
(18) |
Dec
(4) |
2007 |
Jan
|
Feb
(7) |
Mar
(7) |
Apr
(6) |
May
(52) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(15) |
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(250) |
2009 |
Jan
(35) |
Feb
(45) |
Mar
|
Apr
(4) |
May
(35) |
Jun
(13) |
Jul
(49) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(11) |
2010 |
Jan
(3) |
Feb
(30) |
Mar
|
Apr
(35) |
May
(12) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
From: <ja...@us...> - 2006-04-13 21:14:20
|
Update of /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV/Tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18717/lib/HTTP/CalDAV/Tools Modified Files: ReportParser.php Log Message: * Half way through filter support for calendar-query REPORTs * About to normalize report_response_helper with propfind_response_helper Index: ReportParser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV/Tools/ReportParser.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReportParser.php 13 Apr 2006 05:10:24 -0000 1.1 --- ReportParser.php 13 Apr 2006 21:14:17 -0000 1.2 *************** *** 67,70 **** --- 67,78 ---- /** + * Found filters are collected here + * + * @var array + * @access public + */ + var $filters = array(); + + /** * Stack of ancestor tag names * *************** *** 206,209 **** --- 214,256 ---- } + if (count($this->_names) == 1 && $name == 'filter') { + $this->_comps[] =& $this->filters; + $this->_names[] = $name; + return; + } + + if ($name == 'comp-filter') { + end($this->_comps); + + // Gross - end returns a copy of the last value + $comp =& $this->_comps[key($this->_comps)]; + + if (!is_array($comp['comps'])) { + $comp['comps'] = array(); + } + + $comp['comps'][$attrs['name']] = array(); + $this->_comps[] =& $comp['comps'][$attrs['name']]; + $this->_names[] = $name; + return; + } + + if (end($this->_names) == 'comp-filter') { + end($this->_comps); + + // Gross - end returns a copy of the last value + $comp =& $this->_comps[key($this->_comps)]; + + if (!is_array($comp['filters'])) { + $comp['filters'] = array(); + } + + $filter = array('name' => $name, 'value' => $attrs); + + $comp['filters'][] = $filter; + $this->_names[] = $name; + return; + } + $this->_names[] = $name; } *************** *** 233,237 **** // Any need to pop at end of calendar-data? ! if ($name == 'comp') { array_pop($this->_comps); } --- 280,286 ---- // Any need to pop at end of calendar-data? ! // Yes - $this->_comps is re-used for parsing filters ! if ($name == 'comp' || $name == 'calendar-data' || ! $name == 'comp-filter' || $name == 'filter') { array_pop($this->_comps); } |
From: <ja...@us...> - 2006-04-13 05:10:27
|
Update of /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22568/lib/HTTP/CalDAV Modified Files: Server.php Log Message: * Almost working preliminary REPORT support * ReportParser successfully parses calendar-data request values * _componentParser almost parses iCalendar files & limits by calendar-data request value * TODO Determine whether _componentParser is rejecting valid iCalendar files * TODO Reduce duplicate code by factoring special property handling out of propfind_response_helper * TODO Push filtering parser into bennu? Index: Server.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV/Server.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Server.php 9 Apr 2006 19:43:59 -0000 1.1 --- Server.php 13 Apr 2006 05:10:24 -0000 1.2 *************** *** 26,29 **** --- 26,31 ---- */ + require_once 'Tools/ReportParser.php'; + /** * CalDav Server class *************** *** 42,45 **** --- 44,60 ---- class HTTP_CalDAV_Server extends HTTP_WebDAV_Server { + /** + * Make a property in the CalDAV namespace + * + * @param string property name + * @param string property value + * @return array string property namespace + * string property name + * string property value + */ + function calDavProp($name, $value=null, $status=null) { + return $this->mkprop('urn:ietf:params:xml:ns:caldav', $name, $value, + $status); + } /** *************** *** 53,56 **** --- 68,85 ---- { $options = array(); + $options['path'] = $this->path; + + $options['depth'] = 'infinity'; + if (isset($_SERVER['HTTP_DEPTH'])) { + $options['depth'] = $_SERVER['HTTP_DEPTH']; + } + + $parser = new ReportParser('php://input'); + if (!$parser->success) { + $this->http_status('400 Bad Request'); + return; + } + + $options['props'] = $parser->props; return true; *************** *** 64,69 **** * @access public */ ! function report_response_helper($options, $responses) { $this->_multistatus($responses); } --- 93,258 ---- * @access public */ ! function report_response_helper($options, $files) { + $responses = array(); + + // now loop over all returned files + foreach ($files as $file) { + + // collect namespaces here + $ns_hash = array('urn:ietf:params:xml:ns:caldav' => 'C'); + + $response = array(); + + $response['href'] = $this->getHref($file['path']); + if (isset($file['href'])) { + $response['href'] = $file['href']; + } + + $response['propstat'] = array(); + + // nothing to do if no properties were returend + if (isset($file['props']) && is_array($file['props'])) { + + // now loop over all returned properties + foreach ($file['props'] as $prop) { + $status = '200 OK'; + + // as a convenience feature we do not require user handlers + // restrict returned properties to the requested ones + // here we ignore unrequested entries + switch ($options['props']) { + case 'propname': + + // only names of all existing properties were requested + // so remove values + unset($prop['value']); + + case 'allprop': + if (isset($prop['status'])) { + $status = $prop['status']; + } + + if (!isset($response['propstat'][$status])) { + $response['propstat'][$status] = array(); + } + + $response['propstat'][$status][] = $prop; + break; + + default: + + // search property name in requested properties + foreach($options['props'] as $reqprop) { + if ($reqprop['name'] == $prop['name'] && + $reqprop['ns'] == $prop['ns']) { + if (isset($prop['status'])) { + $status = $prop['status']; + } + + if (!isset($response['propstat'][$status])) { + $response['propstat'][$status] = array(); + } + + $response['propstat'][$status][] = $prop; + break (2); + } + } + + continue (2); + } + + // namespace handling + if (empty($prop['ns']) || // empty namespace + $prop['ns'] == 'DAV:' || // default namespace + isset($ns_hash[$prop['ns']])) { // already known + continue; + } + + // register namespace + $ns_hash[$prop['ns']] = 'ns' . count($ns_hash); + } + } + + // also need empty entries for properties requested + // but for which no values where returned + if (isset($options['props']) && is_array($options['props'])) { + + // now loop over all requested properties + foreach ($options['props'] as $reqprop) { + $status = '404 Not Found'; + + // check if property exists in result + foreach ($file['props'] as $prop) { + if ($reqprop['name'] == $prop['name'] && + $reqprop['ns'] == $prop['ns']) { + continue (2); + } + } + + if ($reqprop['name'] == 'lockdiscovery' && + $reqprop['ns'] == 'DAV:' && + method_exists($this, 'getLocks')) { + + $status = '200 OK'; + if (!isset($response['propstat'][$status])) { + $response['propstat'][$status] = array(); + } + + $response['propstat'][$status][] = + $this->mkprop('DAV:', 'lockdiscovery', + $this->getLocks($file['path'])); + continue; + } + + if ($reqprop['name'] == 'calendar-data' && + $reqprop['ns'] == 'urn:ietf:params:xml:ns:caldav' && + method_exists($this, 'get')) { + + $prop = $this->_calendarData($file['path'], + $reqprop['value']); + if (isset($prop)) { + $status = '200 OK'; + if (isset($prop['status'])) { + $status = $prop['status']; + } + } else { + $prop = HTTP_CalDAV_Server::calDavProp( + 'calendar-data'); + } + + if (!isset($response['propstat'][$status])) { + $response['propstat'][$status] = array(); + } + + $response['propstat'][$status][] = $prop; + continue; + } + + if (!isset($response['propstat'][$status])) { + $response['propstat'][$status] = array(); + } + + // add empty value for this property + $response['propstat'][$status][] = + $this->mkprop($reqprop['ns'], $reqprop['name'], + null); + + // namespace handling + if (empty($reqprop['ns']) || // empty namespace + $reqprop['ns'] == 'DAV:' || // default namespace + isset($ns_hash[$reqprop['ns']])) { // already known + continue; + } + + // register namespace + $ns_hash[$reqprop['ns']] = 'ns' . count($ns_hash); + } + } + + $response['ns_hash'] = $ns_hash; + $responses[] = $response; + } + $this->_multistatus($responses); } *************** *** 78,106 **** function report_wrapper() { ! // prepare data-structure from REPORT request if (!$this->report_request_helper($options)) { return; } ! // call user handler ! if (!$this->report($options, $responses)) { return; } ! // format REPORT response ! $this->report_response_helper($options, $responses); } ! /** ! * Make a property in the CalDAV namespace ! * ! * @param string property name ! * @param string property value ! * @return array string property namespace ! * string property name ! * string property value ! */ ! function calDavProp($name, $value=null) { ! return $this->mkprop('urn:ietf:params:xml:ns:caldav', $name, $value); } } --- 267,559 ---- function report_wrapper() { ! /* Prepare data-structure from REPORT request */ if (!$this->report_request_helper($options)) { return; } ! /* Call user handler */ ! if (method_exists($this, 'report')) { ! if (!$this->report($options, $files)) { ! return; ! } ! } else { ! ! /* Empulate REPORT using PROPFIND */ ! if (!$this->propfind($options, $files)) { ! return; ! } ! } ! ! /* Format REPORT response */ ! $this->report_response_helper($options, $files); ! } ! ! function _calendarData($path, $data=null, $filter=null) ! { ! if (is_array($data['comps']) && ! !isset($data['comps']['VCALENDAR'])) { ! return HTTP_CalDAV_Server::calDavProp('calendar-data'); ! } ! ! $options = array(); ! $options['path'] = $path; ! ! $status = $this->get($options); ! if (empty($status)) { ! $status = '403 Forbidden'; ! } ! ! if ($status !== true) { ! return HTTP_CalDAV_Server::calDavProp('calendar-data', null, ! $status); ! } ! ! if ($options['mimetype'] != 'text/calendar') { ! return HTTP_CalDAV_Server::calDavProp('calendar-data', null, ! '403 Forbidden'); ! } ! ! if ($options['stream']) { ! $handle = $options['stream']; ! } else if ($options['data']) { ! // What about data? ! } else { return; } ! if (($line = fgets($handle, 4096)) === false) { ! return; ! } ! ! if (trim($line) != 'BEGIN:VCALENDAR') { ! return; ! } ! ! if (!($value = HTTP_CalDAV_Server::_parseComponent($handle, ! 'VCALENDAR', is_array($data['comps']) ? ! $data['comps']['VCALENDAR'] : null))) { ! return; ! } ! ! return HTTP_CalDAV_Server::calDavProp('calendar-data', $value); } ! function _parseComponent($handle, $name, $data=null, $filter=null) ! { ! $className = 'iCalendar_' . ltrim(strtolower($name), 'v'); ! if ($name == 'VCALENDAR') { ! $className = 'iCalendar'; ! } ! ! if (!class_exists($className)) { ! return; ! } ! $component = new $className; ! ! while (($line = fgets($handle, 4096)) !== false) { ! $line = explode(':', trim($line)); ! ! if ($line[0] == 'END') { ! if ($line[1] != $name) { ! return; ! } ! ! return $component; ! } ! ! if ($line[0] == 'BEGIN') { ! if (is_array($data['comps']) && ! !isset($data['comps'][$line[1]])) { ! while (($l = fgets($handle, 4096)) !== false) { ! if (trim($l) == "END:$line[1]") { ! continue (2); ! } ! } ! ! return; ! } ! ! if (!($childComponent = HTTP_CalDAV_Server::_parseComponent( ! $handle, $line[1], is_array($data['comps']) ? ! $data['comps'][$line[1]] : null))) { ! while (($l = fgets($handle, 4096)) !== false) { ! if (trim($l) == "END:$line[1]") { ! continue (2); ! } ! } ! ! return; ! } ! ! if (!$component->add_component($childComponent)) { ! return; ! } ! ! continue; ! } ! ! $line[0] = explode(';=', $line[0]); ! $prop_name = array_shift($line[0]); ! if (is_array($data['props']) && ! !in_array($prop_name, $data['props'])) { ! continue; ! } ! ! $params = array(); ! while (($param_name = array_shift($line[0])) && ! ($param_value = array_shift($line[0]))) { ! $params[$param_name] = $param_value; ! } ! $component->add_property($prop_name, $line[1], $params); ! } ! } ! ! function _multistatus($responses) ! { ! // now we generate the response header... ! $this->http_status('207 Multi-Status'); ! header('Content-Type: text/xml; charset="utf-8"'); ! ! // ...and payload ! echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; ! echo "<D:multistatus xmlns:D=\"DAV:\">\n"; ! ! foreach ($responses as $response) { ! ! // ignore empty or incomplete entries ! if (!is_array($response) || empty($response)) { ! continue; ! } ! ! $ns_defs = array(); ! foreach ($response['ns_hash'] as $name => $prefix) { ! $ns_defs[] = "xmlns:$prefix=\"$name\""; ! } ! echo ' <D:response ' . implode(' ', $ns_defs) . ">\n"; ! echo " <D:href>$response[href]</D:href>\n"; ! ! // report all found properties and their values (if any) ! // nothing to do if no properties were returend for a file ! if (isset($response['propstat']) && ! is_array($response['propstat'])) { ! ! foreach ($response['propstat'] as $status => $props) { ! echo " <D:propstat>\n"; ! echo " <D:prop>\n"; ! ! foreach ($props as $prop) { ! if (!is_array($prop) || !isset($prop['name'])) { ! continue; ! } ! ! // empty properties (cannot use empty for check as '0' ! // is a legal value here) ! if (!isset($prop['value']) || empty($prop['value']) && ! $prop['value'] !== 0) { ! if ($prop['ns'] == 'DAV:') { ! echo " <D:$prop[name]/>\n"; ! continue; ! } ! ! if (!empty($prop['ns'])) { ! echo ' <' . ! $response['ns_hash'][$prop['ns']] . ! ":$prop[name]/>\n"; ! continue; ! } ! ! echo " <$prop[name] xmlns=\"\"/>"; ! continue; ! } ! ! // some WebDAV properties need special treatment ! if ($prop['ns'] == 'DAV:') { ! ! switch ($prop['name']) { ! case 'creationdate': ! echo " <D:creationdate ns0:dt=\"dateTime.tz\">\n"; ! echo ' ' . gmdate('Y-m-d\TH:i:s\Z', $prop['value']) . "\n"; ! echo " </D:creationdate>\n"; ! break; ! ! case 'getlastmodified': ! echo " <D:getlastmodified ns0:dt=\"dateTime.rfc1123\">\n"; ! echo ' ' . gmdate('D, d M Y H:i:s', $prop['value']) . " GMT\n"; ! echo " </D:getlastmodified>\n"; ! break; ! ! case 'resourcetype': ! echo " <D:resourcetype>\n"; ! echo " <D:$prop[value]/>\n"; ! echo " </D:resourcetype>\n"; ! break; ! ! case 'supportedlock': ! ! if (is_array($prop[value])) { ! $prop[value] = $this->_lockentries($prop[value]); ! } ! echo " <D:supportedlock>\n"; ! echo " $prop[value]\n"; ! echo " </D:supportedlock>\n"; ! break; ! ! case 'lockdiscovery': ! ! if (is_array($prop[value])) { ! $prop[value] = $this->_activelocks($prop[value]); ! } ! echo " <D:lockdiscovery>\n"; ! echo " $prop[value]\n"; ! echo " </D:lockdiscovery>\n"; ! break; ! ! default: ! echo " <D:$prop[name]>\n"; ! echo ' ' . $this->_prop_encode(htmlspecialchars($prop['value'])) . "\n"; ! echo " </D:$prop[name]>\n"; ! } ! ! continue; ! } ! ! if ($prop['name'] == 'calendar-data' && ! is_object($prop['value'])) { ! $prop['value'] = $prop['value']->serialize(); ! } ! ! if (!empty($prop['ns'])) { ! echo ' <' . $response['ns_hash'][$prop['ns']] . ":$prop[name]>\n"; ! echo ' ' . $this->_prop_encode(htmlspecialchars($prop['value'])) . "\n"; ! echo ' </' . $response['ns_hash'][$prop['ns']] . ":$prop[name]>\n"; ! ! continue; ! } ! ! echo " <$prop[name] xmlns=\"\">\n"; ! echo ' ' . $this->_prop_encode(htmlspecialchars($prop['value'])) . "\n"; ! echo " </$prop[name]>\n"; ! } ! ! echo " </D:prop>\n"; ! echo " <D:status>HTTP/1.1 $status</D:status>\n"; ! echo " </D:propstat>\n"; ! } ! } ! ! if (isset($response['status'])) { ! echo " <D:status>HTTP/1.1 $status</D:status>\n"; ! } ! ! if (isset($response['responsedescription'])) { ! echo " <D:responsedescription>\n"; ! echo ' ' . $this->_prop_encode(htmlspecialchars($response['responsedescription'])) . "\n"; ! echo " </D:responsedescription>\n"; ! } ! ! echo " </D:response>\n"; ! } ! ! echo "</D:multistatus>\n"; } } |
From: <ja...@us...> - 2006-04-13 05:10:27
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22568 Modified Files: caldav.php Log Message: * Almost working preliminary REPORT support * ReportParser successfully parses calendar-data request values * _componentParser almost parses iCalendar files & limits by calendar-data request value * TODO Determine whether _componentParser is rejecting valid iCalendar files * TODO Reduce duplicate code by factoring special property handling out of propfind_response_helper * TODO Push filtering parser into bennu? Index: caldav.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/caldav.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** caldav.php 9 Apr 2006 18:19:45 -0000 1.1 --- caldav.php 13 Apr 2006 05:10:24 -0000 1.2 *************** *** 8,11 **** --- 8,17 ---- require_once(BASE . 'lib/HTTP/CalDAV/Server.php'); + require_once(BASE . 'lib/bennu/bennu.class.php'); + require_once(BASE . 'lib/bennu/iCalendar_components.php'); + require_once(BASE . 'lib/bennu/iCalendar_parameters.php'); + require_once(BASE . 'lib/bennu/iCalendar_properties.php'); + require_once(BASE . 'lib/bennu/iCalendar_rfc2445.php'); + class HTTP_CalDAV_Server_PHPiCalendar extends HTTP_CalDAV_Server { function getBasePath() { *************** *** 82,86 **** if (is_file($absolutePath)) { ! $options['mimetype'] = 'text/calendar'; $stat = stat($absolutePath); --- 88,92 ---- if (is_file($absolutePath)) { ! $options['mimetype'] = mime_content_type($absolutePath); $stat = stat($absolutePath); *************** *** 170,174 **** while (($pathComponent = readdir($handle)) !== false) { if ($pathComponent != '.' && $pathComponent != '..') { ! $paths[] = "$path/$pathComponent"; } } --- 176,181 ---- while (($pathComponent = readdir($handle)) !== false) { if ($pathComponent != '.' && $pathComponent != '..') { ! $paths[] = $path != '' ? "$path/$pathComponent" : ! $pathComponent; } } *************** *** 203,225 **** } ! function report($options, &$responses) { ! global $ALL_CALENDARS_COMBINED; ! $responses = array(); ! $paths = availableCalendars(null, null, $ALL_CALENDARS_COMBINED); ! foreach ($paths as $path) { ! $response = array(); ! $response['ns_hash'] = array(); ! $response['ns_hash']['urn:ietf:params:xml:ns:caldav'] = 'C'; ! $response['href'] = $this->getHref(array_pop(explode('/', $path))); ! $response['propstat'] = array(); ! $props = array(); ! $props[] = $this->mkprop('urn:ietf:params:xml:ns:caldav', 'calendar-data', file_get_contents($path)); ! $response['propstat']['200 OK'] = $props; ! $responses[] = $response; } --- 210,251 ---- } ! function report($options, &$files) { ! $files = array(); ! $paths = array(); ! $path = $options['path']; ! while (isset($path)) { ! $file = array(); ! $file['path'] = $path; ! $absolutePath = HTTP_CalDAV_Server_PHPiCalendar::getBasePath() . ! '/' . $path; ! $stat = stat($absolutePath); ! $file['props'] = array(); ! $file['props'][] = $this->mkprop('creationdate', $stat['ctime']); ! $file['props'][] = $this->mkprop('getlastmodified', $stat['mtime']); ! if (is_dir($absolutePath)) { ! $file['props'][] = $this->mkprop('resourcetype', 'collection'); ! $handle = opendir($absolutePath); ! if (!$handle) { ! return; ! } ! while (($pathComponent = readdir($handle)) !== false) { ! if ($pathComponent != '.' && $pathComponent != '..') { ! $paths[] = $path != '' ? "$path/$pathComponent" : ! $pathComponent; ! } ! } ! closedir($handle); ! } else { ! $file['props'][] = $this->mkprop('getcontentlength', ! $stat['size']); ! $file['props'][] = $this->mkprop('resourcetype', null); ! } ! $files[] = $file; ! $path = array_pop($paths); } |
From: <ja...@us...> - 2006-04-13 05:10:27
|
Update of /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV/Tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22568/lib/HTTP/CalDAV/Tools Added Files: ReportParser.php Log Message: * Almost working preliminary REPORT support * ReportParser successfully parses calendar-data request values * _componentParser almost parses iCalendar files & limits by calendar-data request value * TODO Determine whether _componentParser is rejecting valid iCalendar files * TODO Reduce duplicate code by factoring special property handling out of propfind_response_helper * TODO Push filtering parser into bennu? --- NEW FILE: ReportParser.php --- <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * Helper for parsing REPORT request bodies * * Long description for file (if any)... * * PHP versions 4 & 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License & are unable to obtain it through the web, please * send a note to li...@ph... so we can mail you a copy immediately * * @category HTTP * @package HTTP_CalDAV_Server * @author Jack Bates <ms...@fr...> * @copyright 2006 The PHP Group * @license PHP License 3.0 http://www.php.net/license/3_0.txt * @version CVS: $Id: ReportParser.php,v 1.1 2006/04/13 05:10:24 jablko Exp $ * @link http://pear.php.net/package/HTTP_CalDAV_Server * @see HTTP_WebDAV_Server */ /** * Helper for parsing REPORT request bodies * * Long description * * @category HTTP * @package HTTP_CalDAV_Server * @author Jack Bates <ms...@fr...> * @copyright 2006 The PHP Group * @license PHP License 3.0 http://www.php.net/license/3_0.txt * @version CVS: $Id: ReportParser.php,v 1.1 2006/04/13 05:10:24 jablko Exp $ * @link http://pear.php.net/package/HTTP_CalDAV_Server * @see HTTP_WebDAV_Server */ class ReportParser { /** * Success state flag * * @var bool * @access public */ var $success = false; /** * Name of the requested report * * @var string * @access public */ var $report; /** * Found properties are collected here * * @var array * @access public */ var $props = array(); /** * Stack of ancestor tag names * * @var array * @access private */ var $_names = array(); /** * Stack of component data * * @var array * @access private */ var $_comps = array(); /** * Constructor * * @param string path to report input data * @access public */ function ReportParser($input) { $handle = fopen($input, 'r'); if (!$handle) { return; } $parser = xml_parser_create_ns('UTF-8', ' '); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false); xml_set_element_handler($parser, array(&$this, '_startElement'), array(&$this, '_endElement')); $this->success = true; while (($line = fgets($handle, 4096)) !== false) { $this->success = xml_parse($parser, $line); if (!$this->success) { return; } } if (!feof($handle)) { $this->success = false; return; } xml_parser_free($parser); fclose($handle); if (empty($this->props)) { $this->props = 'allprop'; } } /** * Start tag handler * * @param object parser * @param string tag name * @param array tag attributes * @access private */ function _startElement($parser, $name, $attrs) { $nameComponents = explode(' ', $name); if (count($nameComponents) > 2) { $this->success = false; return; } if (count($nameComponents) == 2) { list ($ns, $name) = $nameComponents; if (empty($ns)) { $this->success = false; return; } } if (empty($this->_names)) { $this->report = $name; $this->_names[] = $name; return; } if (count($this->_names) == 1 && ($name == 'allprop' || $name == 'propname')) { $this->props = $name; $this->_names[] = $name; return; } if (count($this->_names) == 2 && end($this->_names) == 'prop') { $prop = array('name' => $name); if ($ns) { $prop['ns'] = $ns; } if ($name == 'calendar-data') { $prop['value'] = array(); $this->_comps[] =& $prop['value']; } $this->props[] = $prop; $this->_names[] = $name; return; } if ($name == 'comp') { end($this->_comps); // Gross - end returns a copy of the last value $comp =& $this->_comps[key($this->_comps)]; if (!is_array($comp['comps'])) { $comp['comps'] = array(); } $comp['comps'][$attrs['name']] = array(); $this->_comps[] =& $comp['comps'][$attrs['name']]; $this->_names[] = $name; return; } if (end($this->_names) == 'comp' && $name == 'prop') { end($this->_comps); // Gross - end returns a copy of the last value $comp =& $this->_comps[key($this->_comps)]; if (!is_array($comp['props'])) { $comp['props'] = array(); } $comp['props'][] = $attrs['name']; $this->_names[] = $name; return; } $this->_names[] = $name; } /** * End tag handler * * @param object parser * @param string tag name * @param array tag attributes * @access private */ function _endElement($parser, $name) { $nameComponents = explode(' ', $name); if (count($nameComponents) > 2) { $this->success = false; return; } if (count($nameComponents) == 2) { list ($ns, $name) = $nameComponents; if (empty($ns)) { $this->success = false; return; } } // Any need to pop at end of calendar-data? if ($name == 'comp') { array_pop($this->_comps); } array_pop($this->_names); } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-handling-comment-ender-p: nil * End: */ ?> |
From: <ja...@us...> - 2006-04-13 04:58:24
|
Update of /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV/Tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18154/lib/HTTP/CalDAV/Tools Log Message: Directory /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV/Tools added to the repository |
From: <ja...@us...> - 2006-04-13 02:05:39
|
Update of /cvsroot/phpicalendar/phpicalendar/lib/bennu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13217/bennu Log Message: Directory /cvsroot/phpicalendar/phpicalendar/lib/bennu added to the repository |
From: <ji...@us...> - 2006-04-10 04:17:22
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15193/functions Modified Files: ical_parser.php Log Message: fix wkst bug when not set Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.211 retrieving revision 1.212 diff -C2 -d -r1.211 -r1.212 *** ical_parser.php 10 Apr 2006 02:22:32 -0000 1.211 --- ical_parser.php 10 Apr 2006 04:17:19 -0000 1.212 *************** *** 557,561 **** $count_to = 0; // start at the $start_range and go until we hit the end of our range. ! if(!isset($wkst)) $wkst='Su'; $wkst3char = two2threeCharDays($wkst); --- 557,561 ---- $count_to = 0; // start at the $start_range and go until we hit the end of our range. ! if(!isset($wkst)) $wkst='SU'; $wkst3char = two2threeCharDays($wkst); |
From: <ji...@us...> - 2006-04-10 02:27:37
|
Update of /cvsroot/phpicalendar/phpicalendar/templates/tan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17460/templates/tan Log Message: Directory /cvsroot/phpicalendar/phpicalendar/templates/tan added to the repository |
From: <ji...@us...> - 2006-04-10 02:27:23
|
Update of /cvsroot/phpicalendar/phpicalendar/templates/red In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17252/templates/red Log Message: Directory /cvsroot/phpicalendar/phpicalendar/templates/red added to the repository |
From: <ji...@us...> - 2006-04-10 02:22:39
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12420/functions Modified Files: ical_parser.php Log Message: get real calendar names if save parsed cals set Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.210 retrieving revision 1.211 diff -C2 -d -r1.210 -r1.211 *** ical_parser.php 10 Apr 2006 00:43:44 -0000 1.210 --- ical_parser.php 10 Apr 2006 02:22:32 -0000 1.211 *************** *** 59,62 **** --- 59,66 ---- $z++; } + foreach ($master_array['-3'] as $temp_array) { + if (isset($temp_array) && $temp_array !='') $caldisplaynames[] = $temp_array; + } + if ($y == sizeof($cal_filelist)) { if ($master_array['-1'] == 'valid cal file') { *************** *** 1201,1205 **** $calendar_name = $all_cal_comb_lang; } ! $cal_displayname = implode(', ', $cal_displaynames); #reset this with the correct names $template_started = getmicrotime(); --- 1205,1209 ---- $calendar_name = $all_cal_comb_lang; } ! $cal_displayname = urldecode(implode(', ', $cal_displaynames)); #reset this with the correct names $template_started = getmicrotime(); |
From: <ji...@us...> - 2006-04-10 02:21:12
|
Update of /cvsroot/phpicalendar/phpicalendar/rss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11065/rss Modified Files: index.php Log Message: encode version number in init.inc.php Index: index.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/rss/index.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** index.php 5 Apr 2006 04:59:20 -0000 1.42 --- index.php 10 Apr 2006 02:21:07 -0000 1.43 *************** *** 75,78 **** --- 75,79 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'default_path' => $default_path.'/', 'template' => $template, |
From: <ji...@us...> - 2006-04-10 02:21:11
|
Update of /cvsroot/phpicalendar/phpicalendar/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11065/templates/default Modified Files: footer.tpl Log Message: encode version number in init.inc.php Index: footer.tpl =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/templates/default/footer.tpl,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** footer.tpl 5 Apr 2006 04:44:00 -0000 1.15 --- footer.tpl 10 Apr 2006 02:21:07 -0000 1.16 *************** *** 1,3 **** ! <center class="V9"><br />{L_POWERED_BY} <a class="psf" href="http://phpicalendar.net/">PHP iCalendar 2.22rc3</a><br /> <!-- switch rss_valid on --> <p> --- 1,3 ---- ! <center class="V9"><br />{L_POWERED_BY} <a class="psf" href="http://phpicalendar.net/">PHP iCalendar {VERSION}</a><br /> <!-- switch rss_valid on --> <p> |
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11065 Modified Files: README day.php error.php month.php preferences.php print.php search.php week.php year.php Log Message: encode version number in init.inc.php Index: README =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/README,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** README 5 Apr 2006 04:48:01 -0000 1.101 --- README 10 Apr 2006 02:21:07 -0000 1.102 *************** *** 83,87 **** -------- cvs ! 2.22rc3 change popup to not require reparsing cal files differentiate cookie names for different installs on the same host --- 83,89 ---- -------- cvs ! 2.22 ! template.php will look in templates/default if a file is missing from templates/$template ! add support for WKST and BYPOS tags change popup to not require reparsing cal files differentiate cookie names for different installs on the same host Index: day.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** day.php 10 Apr 2006 00:52:24 -0000 1.130 --- day.php 10 Apr 2006 02:21:07 -0000 1.131 *************** *** 54,57 **** --- 54,58 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'charset' => $charset, 'default_path' => '', Index: error.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/error.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** error.php 10 Apr 2006 00:42:34 -0000 1.3 --- error.php 10 Apr 2006 02:21:07 -0000 1.4 *************** *** 36,39 **** --- 36,40 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'default_path' => $default_path.'/', 'template' => $template, Index: month.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/month.php,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** month.php 16 Mar 2006 06:15:10 -0000 1.136 --- month.php 10 Apr 2006 02:21:07 -0000 1.137 *************** *** 62,65 **** --- 62,66 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'charset' => $charset, 'template' => $template, Index: preferences.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/preferences.php,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** preferences.php 10 Apr 2006 01:10:39 -0000 1.59 --- preferences.php 10 Apr 2006 02:21:07 -0000 1.60 *************** *** 155,158 **** --- 155,159 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'charset' => $charset, 'template' => $template, Index: print.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/print.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** print.php 21 Mar 2006 09:52:29 -0000 1.38 --- print.php 10 Apr 2006 02:21:07 -0000 1.39 *************** *** 8,12 **** $end_week_time = $start_week_time + (6 * 25 * 60 * 60); $parse_month = date ("Ym", strtotime($getdate)); - $cal_displayname = str_replace("32", " ", $cal); $events_week = 0; $unix_time = strtotime($getdate); --- 8,11 ---- *************** *** 56,59 **** --- 55,59 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'event_js' => '', 'charset' => $charset, Index: search.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/search.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** search.php 18 Mar 2006 07:14:31 -0000 1.39 --- search.php 10 Apr 2006 02:21:07 -0000 1.40 *************** *** 292,295 **** --- 292,296 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'formatted_search' => $formatted_search, 'l_results' => $lang['l_results'], Index: week.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** week.php 10 Apr 2006 01:12:30 -0000 1.129 --- week.php 10 Apr 2006 02:21:07 -0000 1.130 *************** *** 56,59 **** --- 56,60 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'charset' => $charset, 'default_path' => '', Index: year.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/year.php,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** year.php 10 Apr 2006 01:12:30 -0000 1.43 --- year.php 10 Apr 2006 02:21:07 -0000 1.44 *************** *** 54,57 **** --- 54,58 ---- $page->replace_tags(array( + 'version' => $phpicalendar_version, 'event_js' => '', 'current_view' => $current_view, |
From: <ji...@us...> - 2006-04-10 02:21:11
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11065/functions Modified Files: init.inc.php Log Message: encode version number in init.inc.php Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** init.inc.php 5 Apr 2006 04:53:10 -0000 1.96 --- init.inc.php 10 Apr 2006 02:21:07 -0000 1.97 *************** *** 1,4 **** <?php ! // uncomment when developing, comment for shipping version //error_reporting (E_ERROR | E_WARNING | E_PARSE); --- 1,4 ---- <?php ! $phpicalendar_version = '2.22'; // uncomment when developing, comment for shipping version //error_reporting (E_ERROR | E_WARNING | E_PARSE); |
From: <ji...@us...> - 2006-04-10 01:12:34
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14652 Modified Files: week.php year.php Log Message: spacing changes Index: week.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/week.php,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** week.php 16 Mar 2006 06:15:11 -0000 1.128 --- week.php 10 Apr 2006 01:12:30 -0000 1.129 *************** *** 51,56 **** 'event_js' => BASE.'functions/event.js', 'footer' => BASE.'templates/'.$template.'/footer.tpl', ! 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', ! 'search_box' => BASE.'templates/'.$template.'/search_box.tpl' )); --- 51,56 ---- 'event_js' => BASE.'functions/event.js', 'footer' => BASE.'templates/'.$template.'/footer.tpl', ! 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', ! 'search_box' => BASE.'templates/'.$template.'/search_box.tpl' )); *************** *** 62,66 **** 'getdate' => $getdate, 'getcpath' => "&cpath=$cpath", ! 'cpath' => $cpath, 'calendar_name' => $cal_displayname, 'display_date' => $display_date, --- 62,66 ---- 'getdate' => $getdate, 'getcpath' => "&cpath=$cpath", ! 'cpath' => $cpath, 'calendar_name' => $cal_displayname, 'display_date' => $display_date, *************** *** 70,74 **** 'rss_available' => '', 'rss_valid' => '', ! 'show_search' => $show_search, 'next_day' => $next_day, 'next_week' => $next_week, --- 70,74 ---- 'rss_available' => '', 'rss_valid' => '', ! 'show_search' => $show_search, 'next_day' => $next_day, 'next_week' => $next_week, Index: year.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/year.php,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** year.php 25 Mar 2006 06:48:54 -0000 1.42 --- year.php 10 Apr 2006 01:12:30 -0000 1.43 *************** *** 60,65 **** 'default_path' => '', 'cal' => $cal, ! 'getcpath' => "&cpath=$cpath", ! 'cpath' => $cpath, 'getdate' => $getdate, 'calendar_name' => $cal_displayname, --- 60,65 ---- 'default_path' => '', 'cal' => $cal, ! 'getcpath' => "&cpath=$cpath", ! 'cpath' => $cpath, 'getdate' => $getdate, 'calendar_name' => $cal_displayname, |
From: <ji...@us...> - 2006-04-10 01:10:49
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12972/functions Modified Files: template.php Log Message: modify template to use default if tpl file not found in alternate template folder Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** template.php 21 Mar 2006 09:52:29 -0000 1.84 --- template.php 10 Apr 2006 01:10:40 -0000 1.85 *************** *** 1028,1048 **** } ! function Page($template = 'std.tpl') { ! if (file_exists($template)) ! $this->page = join('', file($template)); ! else ! die("Template file $template not found."); ! } function parse($file) { ! global $template; ! ob_start(); ! if (strpos($file, "$template") > 0 || $file =='./functions/event.js'){ include($file); $buffer = ob_get_contents(); ob_end_clean(); return $buffer; - }else{ - die('breakin attempt'); } } --- 1028,1056 ---- } ! function Page($file = 'std.tpl') { ! global $template; ! if (!file_exists($file)){ ! #look for it in default if not found ! $file = str_replace("templates/$template","templates/default",$file); ! if (!file_exists($file)) die("Template file $file not found."); ! } ! $this->page = join('', file($file)); ! } function parse($file) { ! global $template; $lang; ! if (basename(dirname($file)) == "$template" || $file =='./functions/event.js'){ ! if (!is_file($file)){ ! #look for it in default if not found ! $file = str_replace("templates/$template","templates/default",$file); ! } ! if (!is_file($file)){ ! exit(error($lang['l_error_path'], $file)); ! } ! ob_start(); include($file); $buffer = ob_get_contents(); ob_end_clean(); return $buffer; } } *************** *** 1070,1074 **** // This opens up another template and parses it as well. ! $data = (file_exists($data)) ? $this->parse($data) : $data; // This removes any unfilled tags --- 1078,1082 ---- // This opens up another template and parses it as well. ! $data = $this->parse($data); // This removes any unfilled tags |
From: <ji...@us...> - 2006-04-10 01:10:49
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12972 Modified Files: preferences.php Log Message: modify template to use default if tpl file not found in alternate template folder Index: preferences.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/preferences.php,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** preferences.php 5 Apr 2006 04:51:41 -0000 1.58 --- preferences.php 10 Apr 2006 01:10:39 -0000 1.59 *************** *** 30,34 **** if ($action == 'setcookie') { $cookie_language = $_POST['cookie_language']; ! $cookie_cpath = $_POST['cpath']; $cookie_calendar = $_POST['cookie_calendar']; $cookie_view = $_POST['cookie_view']; --- 30,34 ---- if ($action == 'setcookie') { $cookie_language = $_POST['cookie_language']; ! $cookie_cpath = $_POST['cpath']; $cookie_calendar = $_POST['cookie_calendar']; $cookie_view = $_POST['cookie_view']; |
From: <ji...@us...> - 2006-04-10 00:52:30
|
Update of /cvsroot/phpicalendar/phpicalendar/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29400/languages Modified Files: czech.inc.php Log Message: revert original rss now that extra files added Index: czech.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/languages/czech.inc.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** czech.inc.php 21 Mar 2006 09:52:29 -0000 1.10 --- czech.inc.php 10 Apr 2006 00:52:24 -0000 1.11 *************** *** 104,113 **** $lang['l_cal_file'] = 'Calendar File'; $lang['l_php_error'] = 'PHP Error'; ! $upload_error_gen_lang = 'There was a problem with your upload.'; ! $upload_error_lang[0] = 'There was a problem with your upload.'; ! $upload_error_lang[1] = 'The file you are trying to upload is too big.'; ! $upload_error_lang[2] = 'The file you are trying to upload is too big.'; ! $upload_error_lang[3] = 'The file you are trying upload was only partially uploaded.'; ! $upload_error_lang[4] = 'You must select a file for upload.'; $lang['l_upload_error_type'] = 'Only .ics files may be uploaded.'; $lang['l_copy_error'] = 'Failed to copy file'; --- 104,113 ---- $lang['l_cal_file'] = 'Calendar File'; $lang['l_php_error'] = 'PHP Error'; ! $upload_error_gen_lang = 'There was a problem with your upload.'; ! $upload_error_lang[0] = 'There was a problem with your upload.'; ! $upload_error_lang[1] = 'The file you are trying to upload is too big.'; ! $upload_error_lang[2] = 'The file you are trying to upload is too big.'; ! $upload_error_lang[3] = 'The file you are trying upload was only partially uploaded.'; ! $upload_error_lang[4] = 'You must select a file for upload.'; $lang['l_upload_error_type'] = 'Only .ics files may be uploaded.'; $lang['l_copy_error'] = 'Failed to copy file'; |
From: <ji...@us...> - 2006-04-10 00:52:30
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29400 Modified Files: day.php Log Message: revert original rss now that extra files added Index: day.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/day.php,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** day.php 16 Mar 2006 06:15:10 -0000 1.129 --- day.php 10 Apr 2006 00:52:24 -0000 1.130 *************** *** 49,54 **** 'event_js' => BASE.'functions/event.js', 'footer' => BASE.'templates/'.$template.'/footer.tpl', ! 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', ! 'search_box' => BASE.'templates/'.$template.'/search_box.tpl' )); --- 49,54 ---- 'event_js' => BASE.'functions/event.js', 'footer' => BASE.'templates/'.$template.'/footer.tpl', ! 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', ! 'search_box' => BASE.'templates/'.$template.'/search_box.tpl' )); |
From: <ji...@us...> - 2006-04-10 00:52:30
|
Update of /cvsroot/phpicalendar/phpicalendar/rss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29400/rss Modified Files: rss.php Log Message: revert original rss now that extra files added Index: rss.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** rss.php 5 Apr 2006 04:48:02 -0000 1.41 --- rss.php 10 Apr 2006 00:52:24 -0000 1.42 *************** *** 219,223 **** $location = str_replace('&','&',$val['location']); $location = str_replace('&amp;','&',$location); ! $rss .= '<location>'.$location."/location>\n"; } $rss .= '</item>'."\n"; --- 219,223 ---- $location = str_replace('&','&',$val['location']); $location = str_replace('&amp;','&',$location); ! $rss .= '<location>'.$location."</location>\n"; } $rss .= '</item>'."\n"; |
From: <ji...@us...> - 2006-04-10 00:43:54
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21314/functions Modified Files: ical_parser.php Log Message: add support for WKST Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.209 retrieving revision 1.210 diff -C2 -d -r1.209 -r1.210 *** ical_parser.php 9 Apr 2006 00:32:48 -0000 1.209 --- ical_parser.php 10 Apr 2006 00:43:44 -0000 1.210 *************** *** 553,556 **** --- 553,559 ---- $count_to = 0; // start at the $start_range and go until we hit the end of our range. + if(!isset($wkst)) $wkst='Su'; + $wkst3char = two2threeCharDays($wkst); + while (($next_range_time >= $start_range_time_tmp) && ($next_range_time <= $end_range_time_tmp) && ($count_to != $count)) { $func = $freq_type.'Compare'; *************** *** 573,578 **** $day = two2threeCharDays($day); #need to find the first day of the appropriate week. ! $the_sunday = dateOfWeek(date("Ymd",$next_range_time), 'Sunday'); $next_date_time = strtotime($day,strtotime($the_sunday)) + (12 * 60 * 60); #reset $next_range_time to first instance in this week. --- 576,587 ---- $day = two2threeCharDays($day); #need to find the first day of the appropriate week. ! #dateOfweek uses weekstartday as a global variable. This has to be changed to $wkst, ! #but then needs to be reset for other functions ! $week_start_day_tmp = $week_start_day; ! $week_start_day = $wkst3char; ! ! $the_sunday = dateOfWeek(date("Ymd",$next_range_time), $wkst3char); $next_date_time = strtotime($day,strtotime($the_sunday)) + (12 * 60 * 60); + $week_start_day = $week_start_day_tmp; #see above reset to global value #reset $next_range_time to first instance in this week. |
From: <ji...@us...> - 2006-04-10 00:42:40
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20282 Modified Files: error.php Log Message: modify to use default_path Index: error.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/error.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** error.php 25 Oct 2004 17:16:08 -0000 1.2 --- error.php 10 Apr 2006 00:42:34 -0000 1.3 *************** *** 36,40 **** $page->replace_tags(array( ! 'default_path' => $error_base, 'template' => $template, 'cal' => $cal, --- 36,40 ---- $page->replace_tags(array( ! 'default_path' => $default_path.'/', 'template' => $template, 'cal' => $cal, |
From: <ja...@us...> - 2006-04-09 19:44:16
|
Update of /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6052/lib/HTTP/CalDAV Added Files: Server.php Log Message: * Adding CalDAV server library --- NEW FILE: Server.php --- <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * CalDav Server class * * Long description for file (if any)... * * PHP versions 4 & 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License & are unable to obtain it through the web, please * send a note to li...@ph... so we can mail you a copy immediately * * @category HTTP * @package HTTP_CalDAV_Server * @author Jack Bates <ms...@fr...> * @copyright 2006 The PHP Group * @license PHP License 3.0 http://www.php.net/license/3_0.txt * @version CVS: $Id: Server.php,v 1.1 2006/04/09 19:43:59 jablko Exp $ * @link http://pear.php.net/package/HTTP_CalDAV_Server * @see HTTP_WebDAV_Server */ /** * CalDav Server class * * Long description * * @category HTTP * @package HTTP_CalDAV_Server * @author Jack Bates <ms...@fr...> * @copyright 2006 The PHP Group * @license PHP License 3.0 http://www.php.net/license/3_0.txt * @version CVS: $Id: Server.php,v 1.1 2006/04/09 19:43:59 jablko Exp $ * @link http://pear.php.net/package/HTTP_CalDAV_Server * @see HTTP_WebDAV_Server */ class HTTP_CalDAV_Server extends HTTP_WebDAV_Server { /** * REPORT request helper - prepares data-structures from REPORT requests * * @param options * @return void * @access public */ function report_request_helper(&$options) { $options = array(); return true; } /** * REPORT response helper - format REPORT response * * @param options * @return void * @access public */ function report_response_helper($options, $responses) { $this->_multistatus($responses); } /** * REPORT method wrapper * * @param void * @return void * @access public */ function report_wrapper() { // prepare data-structure from REPORT request if (!$this->report_request_helper($options)) { return; } // call user handler if (!$this->report($options, $responses)) { return; } // format REPORT response $this->report_response_helper($options, $responses); } /** * Make a property in the CalDAV namespace * * @param string property name * @param string property value * @return array string property namespace * string property name * string property value */ function calDavProp($name, $value=null) { return $this->mkprop('urn:ietf:params:xml:ns:caldav', $name, $value); } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-handling-comment-ender-p: nil * End: */ ?> |
From: <ja...@us...> - 2006-04-09 19:41:09
|
Update of /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4941/CalDAV Log Message: Directory /cvsroot/phpicalendar/phpicalendar/lib/HTTP/CalDAV added to the repository |
From: <ja...@us...> - 2006-04-09 18:19:53
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23522 Added Files: caldav.php Log Message: * Adding CalDAV server landing --- NEW FILE: caldav.php --- <?php define('BASE', './'); require_once(BASE . 'functions/init.inc.php'); require_once(BASE . 'functions/calendar_functions.php'); //require_once(BASE . 'lib/HTTP/WebDAV/Server.php'); require_once('/home/jablko/public_html/gallery2/modules/webdav/lib/HTTP/WebDAV/Server.php'); require_once(BASE . 'lib/HTTP/CalDAV/Server.php'); class HTTP_CalDAV_Server_PHPiCalendar extends HTTP_CalDAV_Server { function getBasePath() { global $calendar_path; static $basePath; if (!isset($basePath)) { $basePath = ''; $pathComponents = explode('/', $calendar_path); foreach ($pathComponents as $value) { if (!empty($value)) { $basePath .= "/$value"; } } // Above is nice, but breaks relative base paths like ./calendars $basePath = rtrim($calendar_path); } return $basePath; } function deletePath($absolutePath) { $dirs = array(); $paths = array(); while (isset($absolutePath)) { if (is_dir($absolutePath)) { $handle = opendir($absolutePath); if (!$handle) { return; } while (($pathComponent = readdir($handle)) !== false) { if ($pathComponent != '.' && $pathComponent != '..') { $paths[] = "$absolutePath/$pathComponent"; } } closedir($handle); $dirs[] = $absolutePath; } else { unlink($absolutePath); } $absolutePath = array_pop($paths); } $absolutePath = array_pop($dirs); while (isset($absolutePath)) { rmdir($absolutePath); $absolutePath = array_pop($dirs); } return true; } function delete($options) { $absolutePath = HTTP_CalDAV_Server_PHPiCalendar::getBasePath() . '/' . $options['path']; if (!file_exists($absolutePath)) { return '404 Not Found'; } return HTTP_CalDAV_Server_PHPiCalendar::deletePath($absolutePath); } function get(&$options) { $absolutePath = HTTP_CalDAV_Server_PHPiCalendar::getBasePath() . '/' . $options['path']; if (!file_exists($absolutePath)) { return; } if (is_file($absolutePath)) { $options['mimetype'] = 'text/calendar'; $stat = stat($absolutePath); $options['mtime'] = $stat['mtime']; $options['size'] = $stat['size']; $options['stream'] = fopen($absolutePath, 'r'); } return true; } function move(&$options) { // Body parsing not yet supported if ($_SERVER['CONTENT_LENGTH']) { return '415 Unsupported Media Type'; } // Copying to remote wervers not yet supported if (isset($options['dest_url'])) { return '502 Bad Gateway'; } $absolutePath = HTTP_CalDAV_Server_PHPiCalendar::getBasePath() . '/' . $options['path']; if (!file_exists($absolutePath)) { return '404 Not Found'; } if (is_dir($absolutePath) && $options['depth'] != 'infinity') { return '400 Bad Request'; } $newAbsolutePath = HTTP_CalDAV_Server_PHPiCalendar::getBasePath() . '/' . $options['dest']; if (!is_dir(dirname($newAbsolutePath))) { return '409 Conflict'; } if (file_exists($newAbsolutePath)) { if (!$options['overwrite']) { return '412 Precondition Failed'; } if (!HTTP_CalDAV_Server_PHPiCalendar::deletePath( $newAbsolutePath)) { return '403 Forbidden'; } $options['new'] = false; } if (!rename($absolutePath, $newAbsolutePath)) { return '403 Forbidden'; } return true; } // FIXME Handle depth // FIXME Use file_exists function propfind($options, &$files) { $files = array(); $paths = array(); $path = $options['path']; while (isset($path)) { $file = array(); $file['path'] = $path; $absolutePath = HTTP_CalDAV_Server_PHPiCalendar::getBasePath() . '/' . $path; $stat = stat($absolutePath); $file['props'] = array(); $file['props'][] = $this->mkprop('creationdate', $stat['ctime']); $file['props'][] = $this->mkprop('getlastmodified', $stat['mtime']); if (is_dir($absolutePath)) { $file['props'][] = $this->mkprop('resourcetype', 'collection'); $handle = opendir($absolutePath); if (!$handle) { return; } while (($pathComponent = readdir($handle)) !== false) { if ($pathComponent != '.' && $pathComponent != '..') { $paths[] = "$path/$pathComponent"; } } closedir($handle); } else { $file['props'][] = $this->mkprop('getcontentlength', $stat['size']); $file['props'][] = $this->mkprop('resourcetype', null); } $files[] = $file; $path = array_pop($paths); } return true; } function put(&$options) { $absolutePath = HTTP_CalDAV_Server_PHPiCalendar::getBasePath() . '/' . $options['path']; if (!is_dir(dirname($absolutePath))) { return '409 Conflict'; } $options['new'] = !file_exists($absolutePath); $handle = @fopen($absolutePath, 'w'); if (!$handle) { return '403 Forbidden'; } return $handle; } function report($options, &$responses) { global $ALL_CALENDARS_COMBINED; $responses = array(); $paths = availableCalendars(null, null, $ALL_CALENDARS_COMBINED); foreach ($paths as $path) { $response = array(); $response['ns_hash'] = array(); $response['ns_hash']['urn:ietf:params:xml:ns:caldav'] = 'C'; $response['href'] = $this->getHref(array_pop(explode('/', $path))); $response['propstat'] = array(); $props = array(); $props[] = $this->mkprop('urn:ietf:params:xml:ns:caldav', 'calendar-data', file_get_contents($path)); $response['propstat']['200 OK'] = $props; $responses[] = $response; } return true; } } $server = new HTTP_CalDAV_Server_PHPiCalendar(); $server->ServeRequest(); ?> |