Skip to content
Permalink
Browse files

Changing the RequestHandler to use new Xml class.

  • Loading branch information...
jrbasso committed Jul 29, 2010
1 parent 53f8353 commit 527446a3d1e716769cfc5969bfa2858bf9dee50f
Showing with 5 additions and 5 deletions.
  1. +5 −5 cake/libs/controller/components/request_handler.php
@@ -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);
}
}
}

0 comments on commit 527446a

Please sign in to comment.
You can’t perform that action at this time.