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

Don't try to attach ILS if service is undefined.

- Fixes broken test.
parent 9da7417a
No related merge requests found
...@@ -166,11 +166,13 @@ class Factory ...@@ -166,11 +166,13 @@ class Factory
null, null,
$sm->get('VuFind\Config\PluginManager')->get('searches') $sm->get('VuFind\Config\PluginManager')->get('searches')
); );
$driver->attachILS( if ($sm->has('VuFind\ILS\Connection')) {
$sm->get('VuFind\ILS\Connection'), $driver->attachILS(
$sm->get('VuFind\ILS\Logic\Holds'), $sm->get('VuFind\ILS\Connection'),
$sm->get('VuFind\ILS\Logic\TitleHolds') $sm->get('VuFind\ILS\Logic\Holds'),
); $sm->get('VuFind\ILS\Logic\TitleHolds')
);
}
$driver->attachSearchService($sm->get('VuFindSearch\Service')); $driver->attachSearchService($sm->get('VuFindSearch\Service'));
return $driver; return $driver;
} }
...@@ -189,11 +191,13 @@ class Factory ...@@ -189,11 +191,13 @@ class Factory
null, null,
$sm->get('VuFind\Config\PluginManager')->get('searches') $sm->get('VuFind\Config\PluginManager')->get('searches')
); );
$driver->attachILS( if ($sm->has('VuFind\ILS\Connection')) {
$sm->get('VuFind\ILS\Connection'), $driver->attachILS(
$sm->get('VuFind\ILS\Logic\Holds'), $sm->get('VuFind\ILS\Connection'),
$sm->get('VuFind\ILS\Logic\TitleHolds') $sm->get('VuFind\ILS\Logic\Holds'),
); $sm->get('VuFind\ILS\Logic\TitleHolds')
);
}
$driver->attachSearchService($sm->get('VuFindSearch\Service')); $driver->attachSearchService($sm->get('VuFindSearch\Service'));
return $driver; return $driver;
} }
......
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