Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-09-30 18:45:22 +0300
committerGitHub <noreply@github.com>2021-09-30 18:45:22 +0300
commit59174cfa7c87a515306094239355171873f81ecf (patch)
tree5325023c32bbc7d7c164557aa860e69a27c88437 /core/Command
parenteea3d7d47d9753937058428e3c627cef193ee8a6 (diff)
parent3b6be677191f3ee34b86b4c06c3c13931edc099f (diff)
Merge pull request #28492 from nextcloud/bugfix/occ-status
Align occ status with status.php
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Status.php28
1 files changed, 24 insertions, 4 deletions
diff --git a/core/Command/Status.php b/core/Command/Status.php
index 5bcf23dfbca..ad42c253c2c 100644
--- a/core/Command/Status.php
+++ b/core/Command/Status.php
@@ -24,25 +24,45 @@
*/
namespace OC\Core\Command;
+use OC_Util;
+use OCP\Defaults;
+use OCP\IConfig;
+use OCP\Util;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class Status extends Base {
+
+ /** @var IConfig */
+ private $config;
+ /** @var Defaults */
+ private $themingDefaults;
+
+ public function __construct(IConfig $config, Defaults $themingDefaults) {
+ parent::__construct('status');
+
+ $this->config = $config;
+ $this->themingDefaults = $themingDefaults;
+ }
+
protected function configure() {
parent::configure();
$this
- ->setName('status')
->setDescription('show some status information')
;
}
protected function execute(InputInterface $input, OutputInterface $output): int {
$values = [
- 'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
- 'version' => implode('.', \OCP\Util::getVersion()),
- 'versionstring' => \OC_Util::getVersionString(),
+ 'installed' => $this->config->getSystemValueBool('installed', false),
+ 'version' => implode('.', Util::getVersion()),
+ 'versionstring' => OC_Util::getVersionString(),
'edition' => '',
+ 'maintenance' => $this->config->getSystemValueBool('maintenance', false),
+ 'needsDbUpgrade' => Util::needUpgrade(),
+ 'productname' => $this->themingDefaults->getProductName(),
+ 'extendedSupport' => Util::hasExtendedSupport()
];
$this->writeArrayInOutputFormat($input, $output, $values);