register_command.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * @author Bart Visscher <bartv@thisnet.nl>
  4. * @author Christian Kampka <christian@kampka.net>
  5. * @author Joas Schilling <nickvergessen@owncloud.com>
  6. * @author Morris Jobke <hey@morrisjobke.de>
  7. * @author Thomas Müller <thomas.mueller@tmit.eu>
  8. * @author Vincent Petry <pvince81@owncloud.com>
  9. *
  10. * @copyright Copyright (c) 2015, ownCloud, Inc.
  11. * @license AGPL-3.0
  12. *
  13. * This code is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License, version 3,
  15. * as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License, version 3,
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>
  24. *
  25. */
  26. /** @var $application Symfony\Component\Console\Application */
  27. $application->add(new OC\Core\Command\Status);
  28. $application->add(new OC\Core\Command\App\CheckCode());
  29. $application->add(new OC\Core\Command\L10n\CreateJs());
  30. if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
  31. $repair = new \OC\Repair(\OC\Repair::getRepairSteps());
  32. $application->add(new OC\Core\Command\Db\GenerateChangeScript());
  33. $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory()));
  34. $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig()));
  35. $application->add(new OC\Core\Command\Maintenance\SingleUser());
  36. $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
  37. $application->add(new OC\Core\Command\App\Disable());
  38. $application->add(new OC\Core\Command\App\Enable());
  39. $application->add(new OC\Core\Command\App\ListApps());
  40. $application->add(new OC\Core\Command\Maintenance\Repair($repair, \OC::$server->getConfig()));
  41. $application->add(new OC\Core\Command\User\Report());
  42. $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
  43. $application->add(new OC\Core\Command\User\LastSeen());
  44. $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
  45. $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
  46. $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig()));
  47. $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig()));
  48. $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig()));
  49. } else {
  50. $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getConfig()));
  51. }