Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Broke XMLWriter into pieces: XMLHelper, XMLFilter and serializer Node…
Browse files Browse the repository at this point in the history
…XML.
  • Loading branch information
cdujeu committed Sep 30, 2016
1 parent a28162f commit ba7950e
Show file tree
Hide file tree
Showing 33 changed files with 612 additions and 649 deletions.
5 changes: 3 additions & 2 deletions core/src/core/src/pydio/Core/Controller/Controller.php
Expand Up @@ -20,6 +20,7 @@
*/
namespace Pydio\Core\Controller;

use Pydio\Core\Utils\XMLHelper;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequestFactory;
use Psr\Http\Message\ResponseInterface;
Expand Down Expand Up @@ -217,7 +218,7 @@ public static function run(ServerRequestInterface $request, &$actionNode = null)
&& $loggedUser->canWrite($ctx->getRepositoryId()."")){
// Special case of "write only" right : return empty listing, no auth error.
$response = new Response();
$response->getBody()->write(XMLWriter::wrapDocument(""));
$response->getBody()->write(XMLHelper::wrapDocument(""));
return $response;
}else{
throw new AuthRequiredException("208");
Expand Down Expand Up @@ -387,7 +388,7 @@ private static function handleRequest($callback, ServerRequestInterface &$reques
$request = $request->withParsedBody($httpVars);

if(!empty($result)){
$response->getBody()->write(XMLWriter::wrapDocument($result));
$response->getBody()->write(XMLHelper::wrapDocument($result));
$response = $response->withHeader("Content-type", "text/xml; charset=UTF-8");
}
}
Expand Down

0 comments on commit ba7950e

Please sign in to comment.