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

Fixed problems with CLI controllers.

parent fb65e006
No related merge requests found
This diff is collapsed.
......@@ -2,10 +2,11 @@
// Set up modules:
$modules = [
'Zend\Router', 'ZfcRbac', 'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin',
'VuFindApi'
'Zend\Router', 'ZfcRbac',
'VuFindTheme', 'VuFindSearch', 'VuFind', 'VuFindAdmin', 'VuFindApi'
];
if (PHP_SAPI == 'cli' && !defined('VUFIND_PHPUNIT_RUNNING')) {
$modules[] = 'Zend\Mvc\Console';
$modules[] = 'VuFindConsole';
}
if (APPLICATION_ENV == 'development') {
......
......@@ -56,7 +56,7 @@ class AbstractBase extends AbstractActionController
throw new \Exception('Access denied to command line tools.');
}
$this->setServiceLocator($sm);
$this->serviceLocator = $sm;
// Switch the context back to the original working directory so that
// relative paths work as expected. (This constant is set in
......
......@@ -39,7 +39,7 @@ use Zend\Mvc\Application;
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link https://vufind.org/wiki/development:plugins:controllers Wiki
*/
class RedirectController extends \Zend\Mvc\Controller\AbstractActionController
class RedirectController extends AbstractBase
{
/**
* Get a usage message with the help of the RouteNotFoundStrategy.
......
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