Skip to content

Commit

Permalink
Merge pull request #1289 from nextcloud/backport-1284-allow-status.ph…
Browse files Browse the repository at this point in the history
…p-before-install-9

[stable9] Allow to call status.php before the instance is installed
  • Loading branch information
rullzer committed Sep 7, 2016
2 parents b627eca + 930fd6f commit afc928d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions core/command/status.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion status.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit afc928d

Please sign in to comment.