Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
reverts changes in targetproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
edelm committed Feb 7, 2018
1 parent e3b182b commit 2e8763c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions module/Swissbib/src/Swissbib/TargetsProxy/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class Factory
*/
public static function getTargetsProxy(ServiceManager $sm)
{
$config = $sm->get('VuFind\Config')->get('TargetsProxy');
$configPluginManager = $sm->get('VuFind\Config');

return new TargetsProxy(
$config,
$configPluginManager,
$sm->get('Swissbib\Logger'),
$sm->get('Request')
);
Expand Down
6 changes: 3 additions & 3 deletions module/Swissbib/src/Swissbib/TargetsProxy/TargetsProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function __construct(Config $config,
$this->logger = $logger;
$trustedProxies = explode(
',',
$this->config->get('TrustedProxy')->get('loadbalancer')
$this->config->get('TargetsProxy')->get('TrustedProxy')->get('loadbalancer')
);

// Populate client info properties from request
Expand Down Expand Up @@ -224,7 +224,7 @@ public function detectTarget($overrideIP = '', $overrideHost = '')

$targetKeys = explode(
',',
$this->config->get('TargetsProxy')
$this->config->get('TargetsProxy')->get('TargetsProxy')
->get('targetKeys' . $this->searchClass)
);

Expand All @@ -251,7 +251,7 @@ public function detectTarget($overrideIP = '', $overrideHost = '')
*
* @var \Zend\Config\Config $targetConfig
*/
$targetConfig = $this->config->get($targetKey);
$targetConfig = $this->config->get('TargetsProxy')->get($targetKey);
$patternsIP = '';
$patternsURL = '';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ public function initialize($configFile)
$config = new Config($iniReader->fromFile($configFile));
$serviceLocator = new ServiceManager();
$serviceLocator->setService('VuFind\Config', $config);
//$configPluginManager = $serviceLocator->get('VuFind\Config');

$this->targetsProxy = new TargetsProxy($config, new Logger(), new Request());
$this->targetsProxy->setSearchClass('Summon');
$this->targetsProxy->setServiceLocator($serviceLocator);
Expand Down

0 comments on commit 2e8763c

Please sign in to comment.