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

Update XML API driver to match parent class.

parent 1da9a0a6
No related merge requests found
......@@ -220,9 +220,9 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
$sql = $this->buildSqlFromArray($sqlArray);
try {
$sqlStmt = mssql_query($sql);
$sqlStmt = $this->db->query($sql);
while ($row = mssql_fetch_assoc($sqlStmt)) {
foreach ($sqlStmt as $row) {
$pickresponse[] = [
'locationID' => $row['LOCATIONID'],
'locationDisplay' => $row['LOCATIONDISPLAY']
......@@ -284,15 +284,14 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
$sql = $this->buildSqlFromArray($sqlArray);
try {
$sqlStmt = mssql_query($sql);
$sqlStmt = $this->db->query($sql);
$row = mssql_fetch_assoc($sqlStmt);
if ($row) {
foreach ($sqlStmt as $row) {
$defaultPickUpLocation = $row['LOCATION'];
return $defaultPickUpLocation;
} else {
return null;
}
// If we didn't return above, there were no values.
return null;
} catch (\Exception $e) {
throw new ILSException($e->getMessage());
}
......
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