From 928d09a7d086a2feb47a08fe3fadc1ca6589cbc7 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 7 Sep 2012 12:05:26 -0400
Subject: [PATCH] Eliminated unnecessary static method.

---
 module/VuFind/src/VuFind/Search/Solr/Results.php         | 8 ++++----
 module/VuFind/src/VuFind/Search/SolrAuth/Results.php     | 2 +-
 module/VuFind/src/VuFind/Search/SolrReserves/Results.php | 5 ++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/module/VuFind/src/VuFind/Search/Solr/Results.php b/module/VuFind/src/VuFind/Search/Solr/Results.php
index 3ccb0434996..06b9a0a1df0 100644
--- a/module/VuFind/src/VuFind/Search/Solr/Results.php
+++ b/module/VuFind/src/VuFind/Search/Solr/Results.php
@@ -57,7 +57,7 @@ class Results extends BaseResults
      *
      * @return \VuFind\Connection\Solr
      */
-    public static function getSolrConnection($shards = null, $index = 'Solr')
+    public function getSolrConnection($shards = null, $index = 'Solr')
     {
         // Turn on all shards by default if none are specified (we need to be sure
         // that any given ID will yield results, even if not all shards are on by
@@ -91,7 +91,7 @@ class Results extends BaseResults
      */
     protected function performSearch()
     {
-        $solr = static::getSolrConnection($this->getParams()->getSelectedShards());
+        $solr = $this->getSolrConnection($this->getParams()->getSelectedShards());
 
         // Collect the search parameters:
         $overrideQuery = $this->getParams()->getOverrideQuery();
@@ -455,7 +455,7 @@ class Results extends BaseResults
      */
     public function getRecord($id)
     {
-        $solr = static::getSolrConnection();
+        $solr = $this->getSolrConnection();
 
         // Check if we need to apply hidden filters:
         $options = SearchOptions::getInstance(
@@ -513,7 +513,7 @@ class Results extends BaseResults
      */
     public function getSimilarRecords($id)
     {
-        $solr = static::getSolrConnection($this->getParams()->getSelectedShards());
+        $solr = $this->getSolrConnection($this->getParams()->getSelectedShards());
         $filters = $this->getOptions()->getHiddenFilters();
         $extras = empty($filters) ? array() : array('fq' => $filters);
         $rawResponse = $solr->getMoreLikeThis($id, $extras);
diff --git a/module/VuFind/src/VuFind/Search/SolrAuth/Results.php b/module/VuFind/src/VuFind/Search/SolrAuth/Results.php
index 239caa23a74..c27ffc2073a 100644
--- a/module/VuFind/src/VuFind/Search/SolrAuth/Results.php
+++ b/module/VuFind/src/VuFind/Search/SolrAuth/Results.php
@@ -61,7 +61,7 @@ class Results extends SolrResults
      *
      * @return \VuFind\Connection\Solr
      */
-    public static function getSolrConnection($shards = null, $index = 'SolrAuth')
+    public function getSolrConnection($shards = null, $index = 'SolrAuth')
     {
         return parent::getSolrConnection($shards, $index);
     }
diff --git a/module/VuFind/src/VuFind/Search/SolrReserves/Results.php b/module/VuFind/src/VuFind/Search/SolrReserves/Results.php
index cc41c406ba1..f4115e5c802 100644
--- a/module/VuFind/src/VuFind/Search/SolrReserves/Results.php
+++ b/module/VuFind/src/VuFind/Search/SolrReserves/Results.php
@@ -50,9 +50,8 @@ class Results extends \VuFind\Search\Solr\Results
      *
      * @return \VuFind\Connection\Solr
      */
-    public static function getSolrConnection($shards = null,
-        $index = 'SolrReserves'
-    ) {
+    public function getSolrConnection($shards = null, $index = 'SolrReserves')
+    {
         return parent::getSolrConnection($shards, $index);
     }
 
-- 
GitLab