diff --git a/module/VuFindConsole/config/module.config.php b/module/VuFindConsole/config/module.config.php index fe5e16a76245aacfe254390d10c0c5a93710e54c..bdadb5389c7d8d86c9fe590e9cffd7c5d693e39e 100644 --- a/module/VuFindConsole/config/module.config.php +++ b/module/VuFindConsole/config/module.config.php @@ -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>]', diff --git a/module/VuFindConsole/src/VuFindConsole/Controller/HarvestController.php b/module/VuFindConsole/src/VuFindConsole/Controller/HarvestController.php index 93d7aa2b3ee0dd144e088560c2b241ee75d4c91a..777eeb12a6009eb9bee33eabe3f7710494f15040 100644 --- a/module/VuFindConsole/src/VuFindConsole/Controller/HarvestController.php +++ b/module/VuFindConsole/src/VuFindConsole/Controller/HarvestController.php @@ -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]); diff --git a/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php b/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php index 2fbfb153865811dbb00f8fa462faa5f0771f21b5..3380a7fb3405d75daefdcc8e7a9222587bb443d5 100644 --- a/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php +++ b/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php @@ -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(); }