API Removed permission checks from XML/JSON data formatters

Please handle those checks in the logic using the formatters
instead. Applied permission checks to its primary use case,
the "restfulserver" module.
This commit is contained in:
Ingo Schommer 2012-10-30 23:34:29 +01:00
parent 08832261c1
commit d54b1b4d86

View File

@ -139,7 +139,7 @@ class XMLDataFormatter extends DataFormatter {
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$xml .= (is_numeric($this->totalSize)) ? "<$className totalSize=\"{$this->totalSize}\">\n" : "<$className>\n";
foreach($set as $item) {
if($item->canView()) $xml .= $this->convertDataObjectWithoutHeader($item, $fields);
$xml .= $this->convertDataObjectWithoutHeader($item, $fields);
}
$xml .= "</$className>";