From a9a43e9384d7ce731a091640b0a6db5c6b9ade16 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 2a96f5142e7dd..da035687ad98f 100644 --- a/lib/base.php +++ b/lib/base.php @@ -287,7 +287,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 8ada5e6ca767db4ff2ebcbae8e2c025394e67e56 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 0d7c22856794c..a24bb30456e4c 100644 --- a/status.php +++ b/status.php @@ -40,7 +40,7 @@ 'maintenance' => $maintenance, 'version'=>implode('.', \OCP\Util::getVersion()), 'versionstring'=>OC_Util::getVersionString(), - 'edition'=>OC_Util::getEditionString()); + 'edition'=> $installed ? OC_Util::getEditionString() : ''); if (OC::$CLI) { print_r($values); } else { From 930fd6fb568b46ff37e3b8c43be28a2db9a933eb 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);