Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/register_command.php')
-rw-r--r--core/register_command.php37
1 files changed, 21 insertions, 16 deletions
diff --git a/core/register_command.php b/core/register_command.php
index 4af423054d7..c62282c084c 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -24,23 +24,28 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-$repair = new \OC\Repair(\OC\Repair::getRepairSteps());
/** @var $application Symfony\Component\Console\Application */
$application->add(new OC\Core\Command\Status);
-$application->add(new OC\Core\Command\Db\GenerateChangeScript());
-$application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory()));
-$application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig()));
-$application->add(new OC\Core\Command\Maintenance\SingleUser());
-$application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
-$application->add(new OC\Core\Command\App\CheckCode());
-$application->add(new OC\Core\Command\App\Disable());
-$application->add(new OC\Core\Command\App\Enable());
-$application->add(new OC\Core\Command\App\ListApps());
-$application->add(new OC\Core\Command\Maintenance\Repair($repair, \OC::$server->getConfig()));
-$application->add(new OC\Core\Command\User\Report());
-$application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
-$application->add(new OC\Core\Command\User\LastSeen());
-$application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
-$application->add(new OC\Core\Command\L10n\CreateJs());
+if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
+ $repair = new \OC\Repair(\OC\Repair::getRepairSteps());
+
+ $application->add(new OC\Core\Command\Db\GenerateChangeScript());
+ $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory()));
+ $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig()));
+ $application->add(new OC\Core\Command\Maintenance\SingleUser());
+ $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
+ $application->add(new OC\Core\Command\App\CheckCode());
+ $application->add(new OC\Core\Command\App\Disable());
+ $application->add(new OC\Core\Command\App\Enable());
+ $application->add(new OC\Core\Command\App\ListApps());
+ $application->add(new OC\Core\Command\Maintenance\Repair($repair, \OC::$server->getConfig()));
+ $application->add(new OC\Core\Command\User\Report());
+ $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
+ $application->add(new OC\Core\Command\User\LastSeen());
+ $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
+ $application->add(new OC\Core\Command\L10n\CreateJs());
+} else {
+ $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getConfig()));
+}