diff --git a/phpgwapi/inc/class.groupdav.inc.php b/phpgwapi/inc/class.groupdav.inc.php index adb8c9ff68..1e40741ce5 100644 --- a/phpgwapi/inc/class.groupdav.inc.php +++ b/phpgwapi/inc/class.groupdav.inc.php @@ -145,6 +145,8 @@ class groupdav extends HTTP_WebDAV_Server { if ($this->debug > 1) error_log(__CLASS__."::$method: user=$user, app=$app, id=$id: 404 not found!"); return '404 Not Found'; + + } if ($this->debug > 1) error_log(__CLASS__."::$method: user=$user, app='$app', id=$id"); @@ -476,8 +478,9 @@ class groupdav extends HTTP_WebDAV_Server */ function _parse_path($path,&$id,&$app,&$user) { + if ($this->debug) error_log(__METHOD__." called with ('$path') id=$id, app='$app', user=$user"); $parts = explode('/',$path); - + if ($this->debug) error_log(__METHOD__." called parts: ".print_r($parts,true)); if (in_array($parts[1],array('principals','groups'))) { $user = $GLOBALS['egw_info']['user']['account_id']; diff --git a/phpgwapi/inc/class.groupdav_handler.inc.php b/phpgwapi/inc/class.groupdav_handler.inc.php index bfe0efe3e8..c55c5e28d5 100644 --- a/phpgwapi/inc/class.groupdav_handler.inc.php +++ b/phpgwapi/inc/class.groupdav_handler.inc.php @@ -81,11 +81,12 @@ abstract class groupdav_handler */ function __construct($app,$debug=null,$base_uri=null) { + //error_log(__METHOD__." called"); $this->app = $app; - if (!is_null($debug)) $this->debug = $debug; + #if (!is_null($debug)) $this->debug = $debug = 3; $this->base_uri = is_null($base_uri) ? $base_uri : $_SERVER['SCRIPT_NAME']; $this->agent = self::get_agent(); - + $this->translation =& $GLOBALS['egw']->translation; $this->egw_charset = $this->translation->charset(); } @@ -171,7 +172,7 @@ abstract class groupdav_handler } if (!is_array($entry) || !isset($entry['id']) || !(isset($entry['modified']) || isset($entry['etag']))) { - error_log(__METHOD__."(".array2string($entry).") Cant create etag!"); + // error_log(__METHOD__."(".array2string($entry).") Cant create etag!"); return false; } return '"'.$entry['id'].':'.(isset($entry['etag']) ? $entry['etag'] : $entry['modified']).'"'; @@ -303,4 +304,5 @@ abstract class groupdav_handler } return $agent; } -} \ No newline at end of file +} + diff --git a/phpgwapi/inc/horde/Horde/RPC/syncml.php b/phpgwapi/inc/horde/Horde/RPC/syncml.php index 99fc9ae72e..a25ab8a63c 100644 --- a/phpgwapi/inc/horde/Horde/RPC/syncml.php +++ b/phpgwapi/inc/horde/Horde/RPC/syncml.php @@ -113,8 +113,8 @@ class Horde_RPC_syncml extends Horde_RPC { * that came up for later debugging. */ $errorLogging = ob_get_clean(); if (!empty($errorLogging)) { - Horde::logMessage('SyncML: caught output=' . - $errorLogging, __FILE__, __LINE__, PEAR_LOG_DEBUG); + #Horde::logMessage('SyncML: caught output=' . + # $errorLogging, __FILE__, __LINE__, PEAR_LOG_DEBUG); } return $response; diff --git a/phpgwapi/inc/horde/Horde/iCalendar.php b/phpgwapi/inc/horde/Horde/iCalendar.php index 20dfcba71b..f91d2d3da4 100644 --- a/phpgwapi/inc/horde/Horde/iCalendar.php +++ b/phpgwapi/inc/horde/Horde/iCalendar.php @@ -48,20 +48,22 @@ class Horde_iCalendar { { # require_once 'Horde/String.php'; $type = strtolower($type); - $class = 'Horde_iCalendar_' . strtolower($type); - if (!class_exists($class)) { - include_once dirname(__FILE__) . '/iCalendar/' . $type . '.php'; + #error_log("called horde ical new comp". print_r($type,true) ); + $class = 'Horde_iCalendar_' . strtolower($type); + if (!class_exists($class,false)) { + include_once dirname(__FILE__) . '/iCalendar/' . $type . '.php'; } if (class_exists($class)) { - $component = &new $class(); - if ($container !== false) { - $component->_container = &$container; - } - return $component; - } else { - // Should return an dummy x-unknown type class here. - return false; - } + #include_once dirname(__FILE__) . '/iCalendar/' . $type . '.php'; + $component = &new $class(); + if ($container !== false) { + $component->_container = &$container; + } + return $component; + } else { + // Should return an dummy x-unknown type class here. + return false; + } } /** @@ -353,6 +355,7 @@ class Horde_iCalendar { */ function exportvCalendar() { + #error_log(__METHOD__.": called"); // Default values. $requiredAttributes['VERSION'] = '2.0'; $requiredAttributes['PRODID'] = '-//The Horde Project//Horde_iCalendar Library, Horde 3.0-cvs //EN'; @@ -363,7 +366,10 @@ class Horde_iCalendar { $this->setAttribute($name, $default_value); } } - + //error_log(__METHOD__.":requiredAttributes->".print_r($requiredAttributes,true)); + //njv:$buffcontent = ob_get_clean(); + #error_log(__METHOD__.":".print_r($buffcontent,true)); + #ob_end_clean(); return $this->_exportvData('VCALENDAR') . $this->_newline; } @@ -411,7 +417,8 @@ class Horde_iCalendar { if ($clear) { $this->clear(); } - if (preg_match('/(BEGIN:' . $base . '\r?\n)([\W\w]*)(END:' . $base . '\r?\n?)/i', $text, $matches)) { + error_log(__FILE__ . __METHOD__ . ":\n".$text."\n xxxxxxxxx"); + if (preg_match('/(BEGIN:' . $base . '\r?\n)([\W\w]*)(END:' . $base . '\r?\n?)/i', $text, $matches)) { $vCal = $matches[2]; } else { // Text isn't enclosed in BEGIN:VCALENDAR @@ -488,7 +495,12 @@ class Horde_iCalendar { } // Charset and encoding handling. - if ((isset($params['ENCODING']) + + + // njv sanity todo: decode text fields containing qp but not tagged + + + if ((isset($params['ENCODING']) && $params['ENCODING'] == 'QUOTED-PRINTABLE') || isset($params['QUOTED-PRINTABLE'])) { @@ -616,9 +628,10 @@ class Horde_iCalendar { $value = trim($value); // As of rfc 2426 2.4.2 semi-colon, comma, and // colon must be escaped. - $value = str_replace('\\n', $this->_newline, $value); + // njv an "urban myth" a colon is tsafe and should not be escaped + $value = str_replace('\\n', $this->_newline, $value); $value = str_replace('\\,', ',', $value); - $value = str_replace('\\:', ':', $value); + //njv:$value = str_replace('\\:', ':', $value); // Split by unescaped semi-colons: $values = preg_split('/(?_newline, $value); $value = str_replace('\\;', ';', $value); - $value = str_replace('\\:', ':', $value); + //njv:$value = str_replace('\\:', ':', $value); // Split by unescaped commas: $values = preg_split('/(?_newline, '\n', $value); $value = str_replace(',', '\,', $value); $value = str_replace(';', '\;', $value); - $value = str_replace(':', '\:', $value); + //njv:RFC 2445 says very definately NO! + //$value = str_replace(':', '\:', $value); break; default: diff --git a/phpgwapi/inc/horde/Horde/iCalendar/vcard.php b/phpgwapi/inc/horde/Horde/iCalendar/vcard.php index e7a222f767..6a08c90343 100644 --- a/phpgwapi/inc/horde/Horde/iCalendar/vcard.php +++ b/phpgwapi/inc/horde/Horde/iCalendar/vcard.php @@ -64,6 +64,10 @@ class Horde_iCalendar_vcard extends Horde_iCalendar { $this->setAttribute($name, $default_value); } } + //error_log(__METHOD__.":requiredAttributes->".print_r($requiredAttributes,true)); + //njv:$buffcontent = ob_get_clean(); + #error_log(__METHOD__.":".print_r($buffcontent,true)); + #ob_end_clean(); return $this->_exportvData('VCARD') . $this->_newline; }