From 2f3a33b12d9b8b6aab00539e5b8f73e1bf3564f7 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 22 Sep 2014 16:04:49 -0400 Subject: [PATCH] Cleaned up unused/mistyped variables. --- module/VuFind/src/VuFind/Recommend/SideFacets.php | 2 +- module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php | 2 -- .../VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php | 6 +----- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/module/VuFind/src/VuFind/Recommend/SideFacets.php b/module/VuFind/src/VuFind/Recommend/SideFacets.php index 96fca96f5eb..cc7faa10d52 100644 --- a/module/VuFind/src/VuFind/Recommend/SideFacets.php +++ b/module/VuFind/src/VuFind/Recommend/SideFacets.php @@ -271,7 +271,7 @@ class SideFacets extends AbstractFacets $final = array(); foreach ($filterList as $field => $filters) { $current = array(); - foreach ($filters as $i => $filter) { + foreach ($filters as $filter) { if (!isset($filter['suppressDisplay']) || !$filter['suppressDisplay'] ) { diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php b/module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php index 4e6d4a4e98f..159a860a69e 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php @@ -104,8 +104,6 @@ class Recaptcha extends AbstractHelper $errorPart = '&error=' . urlencode($params['error']); } - $reCaptchaOptions = ''; - $options = $this->recaptcha->getOptions(); if (!empty($options)) { $encoded = \Zend\Json\Json::encode($options); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php index 8406f718a72..46c96e17ddb 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php @@ -149,8 +149,6 @@ class Connector $params->set('pwd', $this->pwd); $response = $this->call('GET', $params->getArrayCopy(), false); $xml = simplexml_load_string($response); - $docs = isset($xml->SearchResults->records) - ? $xml->SearchResults->record : array(); $finalDocs = array(); foreach ($xml->SearchResults->records->rec as $doc) { $finalDocs[] = simplexml_load_string($doc->asXML()); @@ -173,7 +171,7 @@ class Connector public function checkForHttpError($result) { if (!$result->isSuccess()) { - throw HttpErrorException::createFromResponse($response); + throw HttpErrorException::createFromResponse($result); } } @@ -242,8 +240,6 @@ class Connector $this->client->resetParameters(); $response = $this->call('GET', $params->getArrayCopy(), false); $xml = simplexml_load_string($response); - $docs = isset($xml->SearchResults->records) - ? $xml->SearchResults->record : array(); $finalDocs = array(); foreach ($xml->SearchResults->records->rec as $doc) { $finalDocs[] = simplexml_load_string($doc->asXML()); -- GitLab