Remove xml formatting to reduce resulting filesize

This commit is contained in:
Björn Fromme
2019-09-11 13:43:33 +02:00
parent 71fcd5ad96
commit ffeceb3fbc
@@ -133,7 +133,6 @@ class ResellerController extends ActionController
public function xmlAction(Reseller $reseller) public function xmlAction(Reseller $reseller)
{ {
$cacheKey = sprintf('reseller_export_xml_full_%d', $reseller->getUid()); $cacheKey = sprintf('reseller_export_xml_full_%d', $reseller->getUid());
if (($xml = $this->cache->get($cacheKey)) === false) { if (($xml = $this->cache->get($cacheKey)) === false) {
$data = $this->resellerDataService->preprocessAll($reseller); $data = $this->resellerDataService->preprocessAll($reseller);
$encoders = [new XmlEncoder('products')]; $encoders = [new XmlEncoder('products')];
@@ -142,7 +141,7 @@ class ResellerController extends ActionController
$xml = $serializer->serialize( $xml = $serializer->serialize(
$data, $data,
'xml', 'xml',
[ 'xml_encoding' => 'utf-8', 'xml_format_output' => true ] [ 'xml_encoding' => 'utf-8', 'xml_format_output' => false ]
); );
$this->cache->set($cacheKey, $xml, [], 3600); $this->cache->set($cacheKey, $xml, [], 3600);
} }