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

Use plugin manager instead of Config\Reader.

parent 29ca4f24
No related merge requests found
......@@ -26,8 +26,7 @@
* @link http://www.vufind.org Main Page
*/
namespace VuFind\Search\Base;
use VuFind\Config\Reader as ConfigReader,
Zend\ServiceManager\ServiceLocatorAwareInterface,
use Zend\ServiceManager\ServiceLocatorAwareInterface,
Zend\ServiceManager\ServiceLocatorInterface;
/**
......@@ -727,8 +726,8 @@ class Params implements ServiceLocatorAwareInterface
// Load the necessary settings to determine the appropriate recommendations
// module:
$searchSettings
= ConfigReader::getConfig($this->getOptions()->getSearchIni());
$searchSettings = $this->getServiceLocator()->get('VuFind\Config')
->get($this->getOptions()->getSearchIni());
// If we have a search type set, save it so we can try to load a
// type-specific recommendations module:
......
......@@ -26,8 +26,7 @@
* @link http://www.vufind.org Main Page
*/
namespace VuFind\Search\Solr;
use VuFind\Config\Reader as ConfigReader,
VuFind\Connection\Manager as ConnectionManager,
use VuFind\Connection\Manager as ConnectionManager,
VuFind\Exception\RecordMissing as RecordMissingException,
VuFind\Search\Base\Results as BaseResults;
......@@ -339,7 +338,7 @@ class Results extends BaseResults
protected function doSpellingReplace($term, $targetTerm, $inToken, $details,
$returnArray
) {
$config = ConfigReader::getConfig();
$config = $this->getServiceLocator()->get('VuFind\Config')->get('config');
$returnArray[$targetTerm]['freq'] = $details['freq'];
foreach ($details['suggestions'] as $word => $freq) {
......
......@@ -26,7 +26,7 @@
* @link http://vufind.org Main Site
*/
namespace VuFind\Search\SolrAuthor;
use VuFind\Config\Reader as ConfigReader, VuFind\Search\Solr\Params as SolrParams;
use VuFind\Search\Solr\Params as SolrParams;
/**
* Author Search Options
......@@ -89,7 +89,8 @@ class Params extends SolrParams
{
// Load the necessary settings to determine the appropriate recommendations
// module:
$ss = ConfigReader::getConfig($this->getOptions()->getSearchIni());
$ss = $this->getServiceLocator()->get('VuFind\Config')
->get($this->getOptions()->getSearchIni());
// Load the AuthorModuleRecommendations configuration if available, use
// standard defaults otherwise:
......
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