Merge pull request #1289 from nextcloud/backport-1284-allow-status.php-before-install-9
[stable9] Allow to call status.php before the instance is installed
This commit is contained in:
commit
afc928d133
|
@ -38,11 +38,13 @@ class Status extends Base {
|
|||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -287,7 +287,7 @@ class OC {
|
|||
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 {
|
||||
|
|
|
@ -40,7 +40,7 @@ try {
|
|||
'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 {
|
||||
|
|
Loading…
Reference in New Issue