diff --git a/module/VuFind/config/module.config.php b/module/VuFind/config/module.config.php index 83fa798885bcaa018bec6dc5f1dcfd43cda38df6..88060b31fa28cf116586b8bfd95ba7bceccac932 100644 --- a/module/VuFind/config/module.config.php +++ b/module/VuFind/config/module.config.php @@ -320,7 +320,7 @@ $config = array( 'VuFind\Mailer' => 'VuFind\Mailer', 'VuFind\RecordLoader' => 'VuFind\Record\Loader', 'VuFind\SearchSpecsReader' => 'VuFind\Config\SearchSpecsReader', - 'sessionmanager' => 'Zend\Session\SessionManager', + 'VuFind\SessionManager' => 'Zend\Session\SessionManager', 'sms' => 'VuFind\Mailer\SMS', 'worldcatconnection' => 'VuFind\Connection\WorldCat', 'worldcatutils' => 'VuFind\Connection\WorldCatUtils', diff --git a/module/VuFind/src/VuFind/Auth/Manager.php b/module/VuFind/src/VuFind/Auth/Manager.php index 19c02cda52d2b0584c803ec10bffa1b8db76c552..86ea1e4f109c5626a4f9b37da92e8bb676cf1fab 100644 --- a/module/VuFind/src/VuFind/Auth/Manager.php +++ b/module/VuFind/src/VuFind/Auth/Manager.php @@ -171,7 +171,7 @@ class Manager implements ServiceLocatorAwareInterface // Destroy the session for good measure, if requested. if ($destroy) { - $this->getServiceLocator()->get('SessionManager')->destroy(); + $this->getServiceLocator()->get('VuFind\SessionManager')->destroy(); } else { // If we don't want to destroy the session, we still need to empty it. // There should be a way to do this through Zend\Session, but there diff --git a/module/VuFind/src/VuFind/Bootstrap.php b/module/VuFind/src/VuFind/Bootstrap.php index 30af544ad12b7983d99cd4362878e08bfe2ed647..674c692044db62d25c44eb959ae4d92044429112 100644 --- a/module/VuFind/src/VuFind/Bootstrap.php +++ b/module/VuFind/src/VuFind/Bootstrap.php @@ -137,7 +137,7 @@ class Bootstrap // Set up the session handler by retrieving all the pieces from the service // manager and injecting appropriate dependencies: $serviceManager = $this->event->getApplication()->getServiceManager(); - $sessionManager = $serviceManager->get('SessionManager'); + $sessionManager = $serviceManager->get('VuFind\SessionManager'); $sessionPluginManager = $serviceManager->get('VuFind\SessionPluginManager'); $sessionHandler = $sessionPluginManager->get($this->config->Session->type); $sessionHandler->setConfig($this->config->Session); diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index 2b27af3b7c3c40547dddc9a47390da70dc8b39eb..0fc54cb31cf7b3b79f8f69bcc9bc0cedbad2d98c 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -108,7 +108,7 @@ class AbstractSearch extends AbstractBase $search = $table->getRowById($id); // Found, make sure the user has the rights to view this search - $sessId = $this->getServiceLocator()->get('SessionManager')->getId(); + $sessId = $this->getServiceLocator()->get('VuFind\SessionManager')->getId(); $user = $this->getUser(); $userId = $user ? $user->id : false; if ($search->session_id == $sessId || $search->user_id == $userId) { @@ -192,7 +192,8 @@ class AbstractSearch extends AbstractBase // Add to search history: if ($this->saveToHistory) { $user = $this->getUser(); - $sessId = $this->getServiceLocator()->get('SessionManager')->getId(); + $sessId = $this->getServiceLocator()->get('VuFind\SessionManager') + ->getId(); $history = $this->getTable('Search'); $history->saveSearch( $this->getSearchManager(), $results, $sessId, @@ -291,7 +292,7 @@ class AbstractSearch extends AbstractBase // Fail if user has no permission to view this search: $user = $this->getUser(); - $sessId = $this->getServiceLocator()->get('SessionManager')->getId(); + $sessId = $this->getServiceLocator()->get('VuFind\SessionManager')->getId(); if ($search->session_id != $sessId && $search->user_id != $user->id) { $this->flashMessenger()->setNamespace('error') ->addMessage('advSearchError_noRights'); diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php index cac7dec2498171efc03d36d814b9e30a517515db..3ebbcf1b8d063468aa83d5ed2cd74224ae3b8d24 100644 --- a/module/VuFind/src/VuFind/Controller/SearchController.php +++ b/module/VuFind/src/VuFind/Controller/SearchController.php @@ -234,7 +234,7 @@ class SearchController extends AbstractSearch // Retrieve search history $search = $this->getTable('Search'); $searchHistory = $search->getSearches( - $this->getServiceLocator()->get('SessionManager')->getId(), + $this->getServiceLocator()->get('VuFind\SessionManager')->getId(), is_object($user) ? $user->id : null ); diff --git a/module/VuFind/src/VuFind/Statistics/AbstractBase.php b/module/VuFind/src/VuFind/Statistics/AbstractBase.php index 0683f1d7e8a571bf3bb108a4244ee76ecd9e70e2..fdb9c9ac3c0e6c430de7aa7d49dfffdb12d52c72 100644 --- a/module/VuFind/src/VuFind/Statistics/AbstractBase.php +++ b/module/VuFind/src/VuFind/Statistics/AbstractBase.php @@ -205,7 +205,7 @@ abstract class AbstractBase implements ServiceLocatorAwareInterface : $server->get('HTTP_REFERER'), 'url' => $server->get('REQUEST_URI'), 'session' => - $this->getServiceLocator()->get('SessionManager')->getId() + $this->getServiceLocator()->get('VuFind\SessionManager')->getId() ); }