From f4a3d421dcc7ae062ad2a759bf1aa5f6f96dbdec Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 5 Nov 2013 11:07:33 -0500 Subject: [PATCH] Eliminated unused variables. --- module/VuFind/src/VuFind/Config/PluginFactory.php | 2 +- module/VuFind/src/VuFind/ILS/Logic/Holds.php | 1 - module/VuFind/src/VuFind/OAI/Server.php | 3 --- module/VuFind/src/VuFind/Recommend/SwitchQuery.php | 1 - 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/module/VuFind/src/VuFind/Config/PluginFactory.php b/module/VuFind/src/VuFind/Config/PluginFactory.php index 240569cdce2..58ddb24632e 100644 --- a/module/VuFind/src/VuFind/Config/PluginFactory.php +++ b/module/VuFind/src/VuFind/Config/PluginFactory.php @@ -111,7 +111,7 @@ class PluginFactory implements AbstractFactoryInterface ) { $config->$section = $child->$section; } else { - foreach ($contents as $key => $value) { + foreach (array_keys($contents->toArray()) as $key) { $config->$section->$key = $child->$section->$key; } } diff --git a/module/VuFind/src/VuFind/ILS/Logic/Holds.php b/module/VuFind/src/VuFind/ILS/Logic/Holds.php index 2bba2879427..2368a5c851f 100644 --- a/module/VuFind/src/VuFind/ILS/Logic/Holds.php +++ b/module/VuFind/src/VuFind/ILS/Logic/Holds.php @@ -312,7 +312,6 @@ class Holds ? ($addlink && $copy['is_holdable']) : $addlink; if ($addlink) { - $holdLink = ""; if ($checkHolds['function'] == "getHoldLink") { /* Build opac link */ $holdings[$location_key][$copy_key]['link'] diff --git a/module/VuFind/src/VuFind/OAI/Server.php b/module/VuFind/src/VuFind/OAI/Server.php index 2efe60f0f61..b1aa70c2b69 100644 --- a/module/VuFind/src/VuFind/OAI/Server.php +++ b/module/VuFind/src/VuFind/OAI/Server.php @@ -512,9 +512,6 @@ class Server return; } - // Initialize the array of XML chunks to include in our response: - $xmlParts = array(); - // Copy the cursor from the parameters so we can track our current position // separately from our initial position! $currentCursor = $params['cursor']; diff --git a/module/VuFind/src/VuFind/Recommend/SwitchQuery.php b/module/VuFind/src/VuFind/Recommend/SwitchQuery.php index 816f8012390..eec349f56ee 100644 --- a/module/VuFind/src/VuFind/Recommend/SwitchQuery.php +++ b/module/VuFind/src/VuFind/Recommend/SwitchQuery.php @@ -151,7 +151,6 @@ class SwitchQuery implements RecommendInterface // Perform all checks (based on naming convention): $methods = get_class_methods($this); - $checks = array(); foreach ($methods as $method) { if (substr($method, 0, 5) == 'check') { $currentCheck = strtolower(substr($method, 5)); -- GitLab