From 7bfc698ae4a83ea8fd358f042f4cdb78bbf7bec3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 6 Sep 2016 13:59:45 +0200 Subject: [PATCH 1/3] Allow to call status.php before the instance is installed --- lib/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index fe7419e6ff321..08fa229e570ca 100644 --- a/lib/base.php +++ b/lib/base.php @@ -264,7 +264,7 @@ public static function checkInstalled() { return; } // Redirect to installer if not installed - if (!\OC::$server->getSystemConfig()->getValue('installed', false) && OC::$SUBURI != '/index.php') { + if (!\OC::$server->getSystemConfig()->getValue('installed', false) && OC::$SUBURI !== '/index.php' && OC::$SUBURI !== '/status.php') { if (OC::$CLI) { throw new Exception('Not installed'); } else { From bbc5fbe8c4764d565506de75733284400e2d3a28 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 6 Sep 2016 14:00:54 +0200 Subject: [PATCH 2/3] Don't throw 500 when not installed --- status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/status.php b/status.php index 5b4b950139bb4..ed7287cb3173f 100644 --- a/status.php +++ b/status.php @@ -43,7 +43,7 @@ 'maintenance' => $maintenance, 'version'=>implode('.', \OCP\Util::getVersion()), 'versionstring'=>OC_Util::getVersionString(), - 'edition'=>OC_Util::getEditionString(), + 'edition'=> $installed ? OC_Util::getEditionString() : '', 'productname'=>$defaults->getName()); if (OC::$CLI) { print_r($values); From 20b636f38229e55c8c6ad5861d4f7b938e41ba2a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 6 Sep 2016 14:13:28 +0200 Subject: [PATCH 3/3] Also fix "occ status" --- core/Command/Status.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/Command/Status.php b/core/Command/Status.php index 2f7173341b4f6..91c79d276700c 100644 --- a/core/Command/Status.php +++ b/core/Command/Status.php @@ -38,11 +38,13 @@ protected function configure() { } protected function execute(InputInterface $input, OutputInterface $output) { + $installed = (bool) \OC::$server->getConfig()->getSystemValue('installed', false); + $values = array( - 'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false), + 'installed' => $installed, 'version' => implode('.', \OCP\Util::getVersion()), 'versionstring' => \OC_Util::getVersionString(), - 'edition' => \OC_Util::getEditionString(), + 'edition' => $installed ? \OC_Util::getEditionString() : '', ); $this->writeArrayInOutputFormat($input, $output, $values);