set line endings of most text files to LF

* Changed the end-of-line encodings of all non-Windows-related and non-autogenerated text files to use UNIX LF (lots of them had mixed LF/CRLF).

Conflicts:
	inc/caldav-PUT-functions.php
This commit is contained in:
Christoph Anton Mitterer authored and Andrew McMillan committed 2013-09-02 14:37:23 +12:00
1 parent 92c15bed64
commit 8e60bb3124
30 files changed
+813 -794

No files matched your search

+20 -20
View File
@@ -45,7 +45,7 @@ $rmprops = $xmltree->GetPath("/DAV::propertyupdate/DAV::remove/DAV::prop/*");
$failure = array();
$success = array();
$reply = new XMLDocument( array( 'DAV:' => '') );
$reply = new XMLDocument( array( 'DAV:' => '') );
/**
* Small utility function to add propstat for one failure
@@ -55,19 +55,19 @@ $reply = new XMLDocument( array( 'DAV:' => '') );
* @param unknown_type $error_tag
*/
function add_failure( $type, $tag, $status, $description=null, $error_tag = null) {
global $failure, $reply;
global $failure, $reply;
$prop = new XMLElement('prop');
$reply->NSElement($prop, $tag);
$propstat = array($prop,new XMLElement( 'status', $status ));
if ( isset($description))
$propstat[] = new XMLElement( 'responsedescription', $description );
if ( isset($error_tag) )
$propstat[] = new XMLElement( 'error', new XMLElement( $error_tag ) );
if ( isset($description))
$propstat[] = new XMLElement( 'responsedescription', $description );
if ( isset($error_tag) )
$propstat[] = new XMLElement( 'error', new XMLElement( $error_tag ) );
$failure[$type.'-'.$tag] = new XMLElement('propstat', $propstat );
}
}
/**
* Not much for it but to process the incoming settings in a big loop, doing
@@ -139,8 +139,8 @@ foreach( $setprops AS $k => $setting ) {
$success[$tag] = 1;
}
else if ( $setcalendar && $setaddressbook ) {
add_failure('set', $tag, 'HTTP/1.1 409 Conflict',
translate("A collection may not be both a calendar and an addressbook."));
add_failure('set', $tag, 'HTTP/1.1 409 Conflict',
translate("A collection may not be both a calendar and an addressbook."));
}
else if ( $setother ) {
add_failure('set', $tag, 'HTTP/1.1 403 Forbidden',
@@ -285,20 +285,20 @@ foreach( $rmprops AS $k => $setting ) {
*/
if ( count($failure) > 0 ) {
$qry->Rollback();
$qry->Rollback();
$url = ConstructURL($request->path);
$multistatus = new XMLElement('multistatus');
array_unshift($failure,new XMLElement('responsedescription', translate("Some properties were not able to be changed.") ));
array_unshift($failure,new XMLElement('responsedescription', translate("Some properties were not able to be changed.") ));
array_unshift($failure,new XMLElement('href', $url));
$response = $reply->DAVElement($multistatus,'response', $failure);
$response = $reply->DAVElement($multistatus,'response', $failure);
if ( !empty($success) ) {
$prop = new XMLElement('prop');
foreach( $success AS $tag => $v ) {
$reply->NSElement($prop, $tag);
}
$reply->DAVElement($response, 'propstat', array( $prop, new XMLElement( 'status', 'HTTP/1.1 424 Failed Dependency' )) );
$prop = new XMLElement('prop');
foreach( $success AS $tag => $v ) {
$reply->NSElement($prop, $tag);
}
$reply->DAVElement($response, 'propstat', array( $prop, new XMLElement( 'status', 'HTTP/1.1 424 Failed Dependency' )) );
}
$request->DoResponse( 207, $reply->Render($multistatus), 'text/xml; charset="utf-8"' );
@@ -334,7 +334,7 @@ if ( $qry->Commit() ) {
foreach( $success AS $tag => $v ) {
$reply->NSElement($prop, $tag);
}
$reply->DAVElement($multistatus, 'propstat', array( $prop, new XMLElement( 'status', 'HTTP/1.1 200 OK' )) );
$reply->DAVElement($multistatus, 'propstat', array( $prop, new XMLElement( 'status', 'HTTP/1.1 200 OK' )) );
$url = ConstructURL($request->path);
array_unshift( $failure, new XMLElement('href', $url ) );