Skip to content

Commit

Permalink
Changing the RequestHandler to use new Xml class.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Jul 29, 2010
1 parent 53f8353 commit 527446a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cake/libs/controller/components/request_handler.php
Expand Up @@ -240,15 +240,15 @@ public function startup(&$controller) {
}

if ($this->requestedWith('xml')) {
if (!class_exists('XmlNode')) {
if (!class_exists('Xml')) {
App::import('Core', 'Xml');
}
$xml = new Xml(trim(file_get_contents('php://input')));
$xml = Xml::build(trim(file_get_contents('php://input')));

if (count($xml->children) == 1 && is_object($dataNode = $xml->child('data'))) {
$controller->data = $dataNode->toArray();
if (isset($xml->data)) {
$controller->data = Xml::toArray($xml->data);
} else {
$controller->data = $xml->toArray();
$controller->data = Xml::toArray($xml);
}
}
}
Expand Down

0 comments on commit 527446a

Please sign in to comment.