diff options
author | daita <maxence@pontapreta.net> | 2016-11-17 21:45:51 +0300 |
---|---|---|
committer | daita <maxence@pontapreta.net> | 2016-11-17 21:45:51 +0300 |
commit | 3fab53a706ad387b33e8ecf068d30dcc453f0604 (patch) | |
tree | 91d1376f2895d0e7bb7ccd9000036b72f171058b | |
parent | ef46e5fe538e12f7af196e7a35351f3679e361f5 (diff) |
getCloudVersion()
-rw-r--r-- | appinfo/register_command.php | 2 | ||||
-rw-r--r-- | lib/Service/ConfigService.php | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/appinfo/register_command.php b/appinfo/register_command.php index 21ba034..2219c4f 100644 --- a/appinfo/register_command.php +++ b/appinfo/register_command.php @@ -27,7 +27,7 @@ $app = new \OCA\Nextant\AppInfo\Application(); $c = $app->getContainer(); -$application->add(new OCA\Nextant\Command\Check($c->query('SolrService'), $c->query('SolrToolsService'), $c->query('SolrAdminService'), $c->query('SettingsController'))); +$application->add(new OCA\Nextant\Command\Check($c->query('ConfigService'), $c->query('SolrService'), $c->query('SolrToolsService'), $c->query('SolrAdminService'), $c->query('SettingsController'))); $application->add(new OCA\Nextant\Command\Clear($c->query('ConfigService'), $c->query('SolrService'), $c->query('SolrAdminService'))); $application->add(new OCA\Nextant\Command\Index(OC::$server->getUserManager(), $c->query('RootFolder'), $c->query('IndexService'), $c->query('QueueService'), $c->query('SolrService'), $c->query('SolrToolsService'), $c->query('SolrAdminService'), $c->query('ConfigService'), $c->query('FileService'), $c->query('BookmarkService'), $c->query('MiscService'))); $application->add(new OCA\Nextant\Command\Optimize($c->query('ConfigService'), $c->query('SolrService'), $c->query('SolrToolsService'))); diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index e04defb..644857f 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -233,6 +233,16 @@ class ConfigService return $this->fileFilters; } + public function getCloudVersion($complete = false) + { + $ver = \OCP\Util::getVersion(); + + if ($complete) + return implode('.', $ver); + + return $ver[0]; + } + /** * generate an array to pass config to Solarium * |