The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

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

Run all console actions through standard router.

- Enabled by upgrade to latest Zend_Console library featuring catch-all parameters.
parent 22041d6d
No related merge requests found
......@@ -59,7 +59,7 @@ $routes = [
'generate/staticroute' => 'generate staticroute [<name>] [<module>]',
'generate/theme' => 'generate theme [<themename>]',
'generate/thememixin' => 'generate thememixin [<name>]',
// harvest/harvest_oai is too complex to represent here; we need to rely on default-route
'harvest/harvest_oai' => 'harvest harvest_oai [...params]',
'harvest/merge-marc' => 'harvest merge-marc [<dir>]',
'import/import-xsl' => 'import import-xsl [--test-only] [--index=] [<xml>] [<properties>]',
'import/webcrawl' => 'import webcrawl [--test-only] [--index=]',
......@@ -70,7 +70,7 @@ $routes = [
'util/cleanup_record_cache' => 'util (cleanuprecordcache|cleanup_record_cache) [--help|-h]',
'util/commit' => 'util commit [<core>]',
'util/createHierarchyTrees' => 'util createHierarchyTrees [--skip-xml|-sx] [--skip-json|-sj] [--help|-h]',
// util/cssBuilder relies on default-route because it has an arbitrary number of parameters
'util/cssBuilder' => 'util cssBuilder [...themes]',
'util/deletes' => 'util deletes [--verbose] [<filename>] [<format>] [<index>]',
'util/expire_external_sessions' => 'util expire_external_sessions [--help|-h] [--batch=] [--sleep=] [<daysOld>]',
'util/expire_searches' => 'util expire_searches [--help|-h] [--batch=] [--sleep=] [<daysOld>]',
......
......@@ -77,6 +77,7 @@ class HarvestController extends AbstractBase
// Get default options, add the default --ini setting if missing:
$opts = HarvesterConsoleRunner::getDefaultOptions();
$opts->setArguments($this->getRequest()->getParam('params'));
if (!$opts->getOption('ini')) {
$ini = \VuFind\Config\Locator::getConfigPath('oai.ini', 'harvest');
$opts->addArguments(['--ini=' . $ini]);
......
......@@ -665,12 +665,11 @@ class UtilController extends AbstractBase
*/
public function cssbuilderAction()
{
$opts = new \Zend\Console\Getopt([]);
$compiler = new \VuFindTheme\LessCompiler(true);
$cacheManager = $this->serviceLocator->get('VuFind\Cache\Manager');
$cacheDir = $cacheManager->getCacheDir() . 'less/';
$compiler->setTempPath($cacheDir);
$compiler->compile(array_unique($opts->getRemainingArgs()));
$compiler->compile(array_unique($this->getRequest()->getParam('themes')));
return $this->getSuccessResponse();
}
......
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