Merge pull request #1284 from nextcloud/allow-status.php-before-install
Allow status.php before install
This commit is contained in:
commit
9854705f63
|
@ -38,11 +38,13 @@ class Status extends Base {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output) {
|
protected function execute(InputInterface $input, OutputInterface $output) {
|
||||||
|
$installed = (bool) \OC::$server->getConfig()->getSystemValue('installed', false);
|
||||||
|
|
||||||
$values = array(
|
$values = array(
|
||||||
'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
|
'installed' => $installed,
|
||||||
'version' => implode('.', \OCP\Util::getVersion()),
|
'version' => implode('.', \OCP\Util::getVersion()),
|
||||||
'versionstring' => \OC_Util::getVersionString(),
|
'versionstring' => \OC_Util::getVersionString(),
|
||||||
'edition' => \OC_Util::getEditionString(),
|
'edition' => $installed ? \OC_Util::getEditionString() : '',
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->writeArrayInOutputFormat($input, $output, $values);
|
$this->writeArrayInOutputFormat($input, $output, $values);
|
||||||
|
|
|
@ -264,7 +264,7 @@ class OC {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Redirect to installer if not installed
|
// 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) {
|
if (OC::$CLI) {
|
||||||
throw new Exception('Not installed');
|
throw new Exception('Not installed');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -43,7 +43,7 @@ try {
|
||||||
'maintenance' => $maintenance,
|
'maintenance' => $maintenance,
|
||||||
'version'=>implode('.', \OCP\Util::getVersion()),
|
'version'=>implode('.', \OCP\Util::getVersion()),
|
||||||
'versionstring'=>OC_Util::getVersionString(),
|
'versionstring'=>OC_Util::getVersionString(),
|
||||||
'edition'=>OC_Util::getEditionString(),
|
'edition'=> $installed ? OC_Util::getEditionString() : '',
|
||||||
'productname'=>$defaults->getName());
|
'productname'=>$defaults->getName());
|
||||||
if (OC::$CLI) {
|
if (OC::$CLI) {
|
||||||
print_r($values);
|
print_r($values);
|
||||||
|
|
Loading…
Reference in New Issue