mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Might as well do the if statement in there as well.
This commit is contained in:
parent
d0e9ade678
commit
8edb7a6b9d
@ -377,15 +377,17 @@ class CalDAVRequest
|
|||||||
* @param array $unsupported An array of the properties we don't support.
|
* @param array $unsupported An array of the properties we don't support.
|
||||||
*/
|
*/
|
||||||
function UnsupportedRequest( $unsupported ) {
|
function UnsupportedRequest( $unsupported ) {
|
||||||
$badprops = new XMLElement( "prop" );
|
if ( isset($unsupported) && count($unsupported) > 0 ) {
|
||||||
foreach( $unsupported AS $k => $v ) {
|
$badprops = new XMLElement( "prop" );
|
||||||
// Not supported at this point...
|
foreach( $unsupported AS $k => $v ) {
|
||||||
dbg_error_log("ERROR", " %s: Support for $v:$k properties is not implemented yet", $this->method );
|
// Not supported at this point...
|
||||||
$badprops->NewElement(strtolower($k),false,array("xmlns" => strtolower($v)));
|
dbg_error_log("ERROR", " %s: Support for $v:$k properties is not implemented yet", $this->method );
|
||||||
}
|
$badprops->NewElement(strtolower($k),false,array("xmlns" => strtolower($v)));
|
||||||
$error = new XMLElement("error", new XMLElement( "LOCK",$badprops), array("xmlns" => "DAV:") );
|
}
|
||||||
|
$error = new XMLElement("error", new XMLElement( "LOCK",$badprops), array("xmlns" => "DAV:") );
|
||||||
|
|
||||||
$this->DoResponse( 422, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
|
$this->DoResponse( 422, $error->Render(0,'<?xml version="1.0" ?>'), 'text/xml; charset="utf-8"');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user