Skip to content
Snippets Groups Projects
Commit 134aae31 authored by Demian Katz's avatar Demian Katz
Browse files

Bug fix: $method was not used, incoming param values were wrong.

- Now the parameter IS used, and the values passed are correct.
parent b8a8acb6
Branches
Tags
No related merge requests found
...@@ -147,7 +147,7 @@ class Connector ...@@ -147,7 +147,7 @@ class Connector
$params->set('numrec', $limit); $params->set('numrec', $limit);
$params->set('prof', $this->prof); $params->set('prof', $this->prof);
$params->set('pwd', $this->pwd); $params->set('pwd', $this->pwd);
$response = $this->call('POST', $params->getArrayCopy(), false); $response = $this->call('GET', $params->getArrayCopy(), false);
$xml = simplexml_load_string($response); $xml = simplexml_load_string($response);
$docs = isset($xml->SearchResults->records) $docs = isset($xml->SearchResults->records)
? $xml->SearchResults->record : array(); ? $xml->SearchResults->record : array();
...@@ -216,7 +216,7 @@ class Connector ...@@ -216,7 +216,7 @@ class Connector
// Send Request // Send Request
$this->client->resetParameters(); $this->client->resetParameters();
$this->client->setUri($this->base . '?' . $queryString . $dblist); $this->client->setUri($this->base . '?' . $queryString . $dblist);
$result = $this->client->send(); $result = $this->client->setMethod($method)->send();
$body = $result->getBody(); $body = $result->getBody();
$xml = simplexml_load_string($body); $xml = simplexml_load_string($body);
$this->debug(print_r($xml, true)); $this->debug(print_r($xml, true));
...@@ -240,7 +240,7 @@ class Connector ...@@ -240,7 +240,7 @@ class Connector
$params->set('pwd', $this->pwd); $params->set('pwd', $this->pwd);
$params->set('query', $query); $params->set('query', $query);
$this->client->resetParameters(); $this->client->resetParameters();
$response = $this->call('POST', $params->getArrayCopy(), false); $response = $this->call('GET', $params->getArrayCopy(), false);
$xml = simplexml_load_string($response); $xml = simplexml_load_string($response);
$docs = isset($xml->SearchResults->records) $docs = isset($xml->SearchResults->records)
? $xml->SearchResults->record : array(); ? $xml->SearchResults->record : array();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment