/** * Analyze the HTTP request and set the params property */ protected function _initParams() { $requestXml = file_get_contents('php://input'); // Decode the request list($nom, $vars) = jXmlRpc::decodeRequest($requestXml); list($module, $action) = explode(':', $nom, 2); if (count($vars) == 1 && is_array($vars[0])) { $this->params = $vars[0]; } $this->params['params'] = $vars; // Definition of action to use and its parameters $this->params['module'] = $module; $this->params['action'] = $action; }
protected function _initParams() { global $HTTP_RAW_POST_DATA; if (isset($HTTP_RAW_POST_DATA)) { $requestXml = $HTTP_RAW_POST_DATA; } else { $requestXml = file('php://input'); $requestXml = implode("\n", $requestXml); } list($nom, $vars) = jXmlRpc::decodeRequest($requestXml); list($module, $action) = explode(':', $nom, 2); if (count($vars) == 1 && is_array($vars[0])) { $this->params = $vars[0]; } $this->params['params'] = $vars; $this->params['module'] = $module; $this->params['action'] = $action; }