diff --git a/phpgwapi/inc/class.groupdav.inc.php b/phpgwapi/inc/class.groupdav.inc.php index 67fe5660c5..d7227bbc14 100644 --- a/phpgwapi/inc/class.groupdav.inc.php +++ b/phpgwapi/inc/class.groupdav.inc.php @@ -1005,6 +1005,8 @@ class groupdav extends HTTP_WebDAV_Server 'DAV:getetag' => 'ETag', 'DAV:getcontenttype' => 'Content type', 'DAV:resourcetype' => 'Resource type', + //'http://calendarserver.org/ns/:created-by' => 'Created by', + //'http://calendarserver.org/ns/:updated-by' => 'Updated by', //'DAV:owner' => 'Owner', //'DAV:current-user-privilege-set' => 'current-user-privilege-set', //'DAV:getcontentlength' => 'Size', @@ -1108,13 +1110,16 @@ class groupdav extends HTTP_WebDAV_Server 'wrap' => 0, )); } - if (preg_match('/\<(D:)?href\>[^<]+\<\/(D:)?href\>/i',$value)) + if (($href=preg_match('/\<(D:)?href\>[^<]+\<\/(D:)?href\>/i',$value))) { - $value = '
'.preg_replace('/\<(D:)?href\>('.preg_quote($this->base_uri.'/','/').')?([^<]+)\<\/(D:)?href\>/i','<\\1href>\\3</\\4href>',$value).'
'; + $value = preg_replace('/\<(D:)?href\>('.preg_quote($this->base_uri.'/','/').')?([^<]+)\<\/(D:)?href\>/i','<\\1href>\\3',$value); } - else + $value = $value[0] == '<' || strpos($value, "\n") !== false ? '
'.htmlspecialchars($value).'
' : htmlspecialchars($value); + + if ($href) { - $value = $value[0] == '<' || strpos($value, "\n") !== false ? '
'.htmlspecialchars($value).'
' : htmlspecialchars($value); + $value = preg_replace('/<a href="(.+)">/', '', $value); + $value = str_replace('</a>', '', $value); } return $value; } @@ -1640,7 +1645,7 @@ class groupdav extends HTTP_WebDAV_Server $content .= 'HTTP/1.1 '.$this->_http_status."\n"; foreach(headers_list() as $line) $content .= $line."\n"; if (($c = ob_get_flush())) $content .= "\n"; - if ($debug_level !== 'f' && strlen($c) > 1536) $c = substr($c,0,1536)."\n*** LOG TRUNKATED\n"; + if (self::$log_level !== 'f' && strlen($c) > 1536) $c = substr($c,0,1536)."\n*** LOG TRUNKATED\n"; $content .= $c; if ($extra) $content .= $extra; if ($this->to_log) $content .= "\n### ".implode("\n### ", $this->to_log)."\n";