@@ -38,116 +38,116 @@ |
||
| 38 | 38 | use Symfony\Component\EventDispatcher\GenericEvent; |
| 39 | 39 | |
| 40 | 40 | class Repair extends Command { |
| 41 | - /** @var \OC\Repair $repair */ |
|
| 42 | - protected $repair; |
|
| 43 | - /** @var IConfig */ |
|
| 44 | - protected $config; |
|
| 45 | - /** @var EventDispatcherInterface */ |
|
| 46 | - private $dispatcher; |
|
| 47 | - /** @var ProgressBar */ |
|
| 48 | - private $progress; |
|
| 49 | - /** @var OutputInterface */ |
|
| 50 | - private $output; |
|
| 51 | - /** @var IAppManager */ |
|
| 52 | - private $appManager; |
|
| 41 | + /** @var \OC\Repair $repair */ |
|
| 42 | + protected $repair; |
|
| 43 | + /** @var IConfig */ |
|
| 44 | + protected $config; |
|
| 45 | + /** @var EventDispatcherInterface */ |
|
| 46 | + private $dispatcher; |
|
| 47 | + /** @var ProgressBar */ |
|
| 48 | + private $progress; |
|
| 49 | + /** @var OutputInterface */ |
|
| 50 | + private $output; |
|
| 51 | + /** @var IAppManager */ |
|
| 52 | + private $appManager; |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @param \OC\Repair $repair |
|
| 56 | - * @param IConfig $config |
|
| 57 | - * @param EventDispatcherInterface $dispatcher |
|
| 58 | - * @param IAppManager $appManager |
|
| 59 | - */ |
|
| 60 | - public function __construct(\OC\Repair $repair, IConfig $config, EventDispatcherInterface $dispatcher, IAppManager $appManager) { |
|
| 61 | - $this->repair = $repair; |
|
| 62 | - $this->config = $config; |
|
| 63 | - $this->dispatcher = $dispatcher; |
|
| 64 | - $this->appManager = $appManager; |
|
| 65 | - parent::__construct(); |
|
| 66 | - } |
|
| 54 | + /** |
|
| 55 | + * @param \OC\Repair $repair |
|
| 56 | + * @param IConfig $config |
|
| 57 | + * @param EventDispatcherInterface $dispatcher |
|
| 58 | + * @param IAppManager $appManager |
|
| 59 | + */ |
|
| 60 | + public function __construct(\OC\Repair $repair, IConfig $config, EventDispatcherInterface $dispatcher, IAppManager $appManager) { |
|
| 61 | + $this->repair = $repair; |
|
| 62 | + $this->config = $config; |
|
| 63 | + $this->dispatcher = $dispatcher; |
|
| 64 | + $this->appManager = $appManager; |
|
| 65 | + parent::__construct(); |
|
| 66 | + } |
|
| 67 | 67 | |
| 68 | - protected function configure() { |
|
| 69 | - $this |
|
| 70 | - ->setName('maintenance:repair') |
|
| 71 | - ->setDescription('repair this installation') |
|
| 72 | - ->addOption( |
|
| 73 | - 'include-expensive', |
|
| 74 | - null, |
|
| 75 | - InputOption::VALUE_NONE, |
|
| 76 | - 'Use this option when you want to include resource and load expensive tasks'); |
|
| 77 | - } |
|
| 68 | + protected function configure() { |
|
| 69 | + $this |
|
| 70 | + ->setName('maintenance:repair') |
|
| 71 | + ->setDescription('repair this installation') |
|
| 72 | + ->addOption( |
|
| 73 | + 'include-expensive', |
|
| 74 | + null, |
|
| 75 | + InputOption::VALUE_NONE, |
|
| 76 | + 'Use this option when you want to include resource and load expensive tasks'); |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | - protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 80 | - $includeExpensive = $input->getOption('include-expensive'); |
|
| 81 | - if ($includeExpensive) { |
|
| 82 | - foreach ($this->repair->getExpensiveRepairSteps() as $step) { |
|
| 83 | - $this->repair->addStep($step); |
|
| 84 | - } |
|
| 85 | - } |
|
| 79 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 80 | + $includeExpensive = $input->getOption('include-expensive'); |
|
| 81 | + if ($includeExpensive) { |
|
| 82 | + foreach ($this->repair->getExpensiveRepairSteps() as $step) { |
|
| 83 | + $this->repair->addStep($step); |
|
| 84 | + } |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - $apps = $this->appManager->getInstalledApps(); |
|
| 88 | - foreach ($apps as $app) { |
|
| 89 | - if (!$appManager->isEnabledForUser($app)) { |
|
| 90 | - continue; |
|
| 91 | - } |
|
| 92 | - $info = \OC_App::getAppInfo($app); |
|
| 93 | - if (!is_array($info)) { |
|
| 94 | - continue; |
|
| 95 | - } |
|
| 96 | - $steps = $info['repair-steps']['post-migration']; |
|
| 97 | - foreach ($steps as $step) { |
|
| 98 | - try { |
|
| 99 | - $this->repair->addStep($step); |
|
| 100 | - } catch (Exception $ex) { |
|
| 101 | - $output->writeln("<error>Failed to load repair step for $app: {$ex->getMessage()}</error>"); |
|
| 102 | - } |
|
| 103 | - } |
|
| 104 | - } |
|
| 87 | + $apps = $this->appManager->getInstalledApps(); |
|
| 88 | + foreach ($apps as $app) { |
|
| 89 | + if (!$appManager->isEnabledForUser($app)) { |
|
| 90 | + continue; |
|
| 91 | + } |
|
| 92 | + $info = \OC_App::getAppInfo($app); |
|
| 93 | + if (!is_array($info)) { |
|
| 94 | + continue; |
|
| 95 | + } |
|
| 96 | + $steps = $info['repair-steps']['post-migration']; |
|
| 97 | + foreach ($steps as $step) { |
|
| 98 | + try { |
|
| 99 | + $this->repair->addStep($step); |
|
| 100 | + } catch (Exception $ex) { |
|
| 101 | + $output->writeln("<error>Failed to load repair step for $app: {$ex->getMessage()}</error>"); |
|
| 102 | + } |
|
| 103 | + } |
|
| 104 | + } |
|
| 105 | 105 | |
| 106 | - $maintenanceMode = $this->config->getSystemValue('maintenance', false); |
|
| 107 | - $this->config->setSystemValue('maintenance', true); |
|
| 106 | + $maintenanceMode = $this->config->getSystemValue('maintenance', false); |
|
| 107 | + $this->config->setSystemValue('maintenance', true); |
|
| 108 | 108 | |
| 109 | - $this->progress = new ProgressBar($output); |
|
| 110 | - $this->output = $output; |
|
| 111 | - $this->dispatcher->addListener('\OC\Repair::startProgress', [$this, 'handleRepairFeedBack']); |
|
| 112 | - $this->dispatcher->addListener('\OC\Repair::advance', [$this, 'handleRepairFeedBack']); |
|
| 113 | - $this->dispatcher->addListener('\OC\Repair::finishProgress', [$this, 'handleRepairFeedBack']); |
|
| 114 | - $this->dispatcher->addListener('\OC\Repair::step', [$this, 'handleRepairFeedBack']); |
|
| 115 | - $this->dispatcher->addListener('\OC\Repair::info', [$this, 'handleRepairFeedBack']); |
|
| 116 | - $this->dispatcher->addListener('\OC\Repair::warning', [$this, 'handleRepairFeedBack']); |
|
| 117 | - $this->dispatcher->addListener('\OC\Repair::error', [$this, 'handleRepairFeedBack']); |
|
| 109 | + $this->progress = new ProgressBar($output); |
|
| 110 | + $this->output = $output; |
|
| 111 | + $this->dispatcher->addListener('\OC\Repair::startProgress', [$this, 'handleRepairFeedBack']); |
|
| 112 | + $this->dispatcher->addListener('\OC\Repair::advance', [$this, 'handleRepairFeedBack']); |
|
| 113 | + $this->dispatcher->addListener('\OC\Repair::finishProgress', [$this, 'handleRepairFeedBack']); |
|
| 114 | + $this->dispatcher->addListener('\OC\Repair::step', [$this, 'handleRepairFeedBack']); |
|
| 115 | + $this->dispatcher->addListener('\OC\Repair::info', [$this, 'handleRepairFeedBack']); |
|
| 116 | + $this->dispatcher->addListener('\OC\Repair::warning', [$this, 'handleRepairFeedBack']); |
|
| 117 | + $this->dispatcher->addListener('\OC\Repair::error', [$this, 'handleRepairFeedBack']); |
|
| 118 | 118 | |
| 119 | - $this->repair->run(); |
|
| 119 | + $this->repair->run(); |
|
| 120 | 120 | |
| 121 | - $this->config->setSystemValue('maintenance', $maintenanceMode); |
|
| 122 | - } |
|
| 121 | + $this->config->setSystemValue('maintenance', $maintenanceMode); |
|
| 122 | + } |
|
| 123 | 123 | |
| 124 | - public function handleRepairFeedBack($event) { |
|
| 125 | - if (!$event instanceof GenericEvent) { |
|
| 126 | - return; |
|
| 127 | - } |
|
| 128 | - switch ($event->getSubject()) { |
|
| 129 | - case '\OC\Repair::startProgress': |
|
| 130 | - $this->progress->start($event->getArgument(0)); |
|
| 131 | - break; |
|
| 132 | - case '\OC\Repair::advance': |
|
| 133 | - $this->progress->advance($event->getArgument(0)); |
|
| 134 | - break; |
|
| 135 | - case '\OC\Repair::finishProgress': |
|
| 136 | - $this->progress->finish(); |
|
| 137 | - $this->output->writeln(''); |
|
| 138 | - break; |
|
| 139 | - case '\OC\Repair::step': |
|
| 140 | - $this->output->writeln(' - ' . $event->getArgument(0)); |
|
| 141 | - break; |
|
| 142 | - case '\OC\Repair::info': |
|
| 143 | - $this->output->writeln(' - ' . $event->getArgument(0)); |
|
| 144 | - break; |
|
| 145 | - case '\OC\Repair::warning': |
|
| 146 | - $this->output->writeln(' - WARNING: ' . $event->getArgument(0)); |
|
| 147 | - break; |
|
| 148 | - case '\OC\Repair::error': |
|
| 149 | - $this->output->writeln(' - ERROR: ' . $event->getArgument(0)); |
|
| 150 | - break; |
|
| 151 | - } |
|
| 152 | - } |
|
| 124 | + public function handleRepairFeedBack($event) { |
|
| 125 | + if (!$event instanceof GenericEvent) { |
|
| 126 | + return; |
|
| 127 | + } |
|
| 128 | + switch ($event->getSubject()) { |
|
| 129 | + case '\OC\Repair::startProgress': |
|
| 130 | + $this->progress->start($event->getArgument(0)); |
|
| 131 | + break; |
|
| 132 | + case '\OC\Repair::advance': |
|
| 133 | + $this->progress->advance($event->getArgument(0)); |
|
| 134 | + break; |
|
| 135 | + case '\OC\Repair::finishProgress': |
|
| 136 | + $this->progress->finish(); |
|
| 137 | + $this->output->writeln(''); |
|
| 138 | + break; |
|
| 139 | + case '\OC\Repair::step': |
|
| 140 | + $this->output->writeln(' - ' . $event->getArgument(0)); |
|
| 141 | + break; |
|
| 142 | + case '\OC\Repair::info': |
|
| 143 | + $this->output->writeln(' - ' . $event->getArgument(0)); |
|
| 144 | + break; |
|
| 145 | + case '\OC\Repair::warning': |
|
| 146 | + $this->output->writeln(' - WARNING: ' . $event->getArgument(0)); |
|
| 147 | + break; |
|
| 148 | + case '\OC\Repair::error': |
|
| 149 | + $this->output->writeln(' - ERROR: ' . $event->getArgument(0)); |
|
| 150 | + break; |
|
| 151 | + } |
|
| 152 | + } |
|
| 153 | 153 | } |
@@ -40,122 +40,122 @@ |
||
| 40 | 40 | $application->add(new OC\Core\Command\App\CheckCode($infoParser)); |
| 41 | 41 | $application->add(new OC\Core\Command\L10n\CreateJs()); |
| 42 | 42 | $application->add(new \OC\Core\Command\Integrity\SignApp( |
| 43 | - \OC::$server->getIntegrityCodeChecker(), |
|
| 44 | - new \OC\IntegrityCheck\Helpers\FileAccessHelper(), |
|
| 45 | - \OC::$server->getURLGenerator() |
|
| 43 | + \OC::$server->getIntegrityCodeChecker(), |
|
| 44 | + new \OC\IntegrityCheck\Helpers\FileAccessHelper(), |
|
| 45 | + \OC::$server->getURLGenerator() |
|
| 46 | 46 | )); |
| 47 | 47 | $application->add(new \OC\Core\Command\Integrity\SignCore( |
| 48 | - \OC::$server->getIntegrityCodeChecker(), |
|
| 49 | - new \OC\IntegrityCheck\Helpers\FileAccessHelper() |
|
| 48 | + \OC::$server->getIntegrityCodeChecker(), |
|
| 49 | + new \OC\IntegrityCheck\Helpers\FileAccessHelper() |
|
| 50 | 50 | )); |
| 51 | 51 | $application->add(new \OC\Core\Command\Integrity\CheckApp( |
| 52 | - \OC::$server->getIntegrityCodeChecker() |
|
| 52 | + \OC::$server->getIntegrityCodeChecker() |
|
| 53 | 53 | )); |
| 54 | 54 | $application->add(new \OC\Core\Command\Integrity\CheckCore( |
| 55 | - \OC::$server->getIntegrityCodeChecker() |
|
| 55 | + \OC::$server->getIntegrityCodeChecker() |
|
| 56 | 56 | )); |
| 57 | 57 | |
| 58 | 58 | |
| 59 | 59 | if (\OC::$server->getConfig()->getSystemValue('installed', false)) { |
| 60 | - $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager())); |
|
| 61 | - $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager())); |
|
| 62 | - $application->add(new OC\Core\Command\App\Install()); |
|
| 63 | - $application->add(new OC\Core\Command\App\GetPath()); |
|
| 64 | - $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager())); |
|
| 60 | + $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager())); |
|
| 61 | + $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager())); |
|
| 62 | + $application->add(new OC\Core\Command\App\Install()); |
|
| 63 | + $application->add(new OC\Core\Command\App\GetPath()); |
|
| 64 | + $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager())); |
|
| 65 | 65 | |
| 66 | - $application->add(new OC\Core\Command\TwoFactorAuth\Enable( |
|
| 67 | - \OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager() |
|
| 68 | - )); |
|
| 69 | - $application->add(new OC\Core\Command\TwoFactorAuth\Disable( |
|
| 70 | - \OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager() |
|
| 71 | - )); |
|
| 66 | + $application->add(new OC\Core\Command\TwoFactorAuth\Enable( |
|
| 67 | + \OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager() |
|
| 68 | + )); |
|
| 69 | + $application->add(new OC\Core\Command\TwoFactorAuth\Disable( |
|
| 70 | + \OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager() |
|
| 71 | + )); |
|
| 72 | 72 | |
| 73 | - $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig())); |
|
| 74 | - $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig())); |
|
| 75 | - $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig())); |
|
| 73 | + $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig())); |
|
| 74 | + $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig())); |
|
| 75 | + $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig())); |
|
| 76 | 76 | |
| 77 | - $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig())); |
|
| 78 | - $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); |
|
| 79 | - $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); |
|
| 80 | - $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); |
|
| 81 | - $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); |
|
| 82 | - $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); |
|
| 83 | - $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); |
|
| 84 | - $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); |
|
| 77 | + $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig())); |
|
| 78 | + $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); |
|
| 79 | + $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); |
|
| 80 | + $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); |
|
| 81 | + $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); |
|
| 82 | + $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); |
|
| 83 | + $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); |
|
| 84 | + $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); |
|
| 85 | 85 | |
| 86 | - $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig()))); |
|
| 87 | - $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger())); |
|
| 88 | - $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection())); |
|
| 89 | - $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection())); |
|
| 90 | - $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection())); |
|
| 91 | - $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection())); |
|
| 92 | - $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection())); |
|
| 93 | - $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig())); |
|
| 86 | + $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig()))); |
|
| 87 | + $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger())); |
|
| 88 | + $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection())); |
|
| 89 | + $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection())); |
|
| 90 | + $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection())); |
|
| 91 | + $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection())); |
|
| 92 | + $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection())); |
|
| 93 | + $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig())); |
|
| 94 | 94 | |
| 95 | - $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); |
|
| 96 | - $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |
|
| 97 | - $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager())); |
|
| 98 | - $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager())); |
|
| 99 | - $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager())); |
|
| 100 | - $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper())); |
|
| 101 | - $application->add(new OC\Core\Command\Encryption\DecryptAll( |
|
| 102 | - \OC::$server->getEncryptionManager(), |
|
| 103 | - \OC::$server->getAppManager(), |
|
| 104 | - \OC::$server->getConfig(), |
|
| 105 | - new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()), |
|
| 106 | - new \Symfony\Component\Console\Helper\QuestionHelper()) |
|
| 107 | - ); |
|
| 95 | + $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); |
|
| 96 | + $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |
|
| 97 | + $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager())); |
|
| 98 | + $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager())); |
|
| 99 | + $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager())); |
|
| 100 | + $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper())); |
|
| 101 | + $application->add(new OC\Core\Command\Encryption\DecryptAll( |
|
| 102 | + \OC::$server->getEncryptionManager(), |
|
| 103 | + \OC::$server->getAppManager(), |
|
| 104 | + \OC::$server->getConfig(), |
|
| 105 | + new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()), |
|
| 106 | + new \Symfony\Component\Console\Helper\QuestionHelper()) |
|
| 107 | + ); |
|
| 108 | 108 | |
| 109 | - $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig())); |
|
| 110 | - $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig())); |
|
| 109 | + $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig())); |
|
| 110 | + $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig())); |
|
| 111 | 111 | |
| 112 | - $view = new \OC\Files\View(); |
|
| 113 | - $util = new \OC\Encryption\Util( |
|
| 114 | - $view, |
|
| 115 | - \OC::$server->getUserManager(), |
|
| 116 | - \OC::$server->getGroupManager(), |
|
| 117 | - \OC::$server->getConfig() |
|
| 118 | - ); |
|
| 119 | - $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot( |
|
| 120 | - $view, |
|
| 121 | - \OC::$server->getUserManager(), |
|
| 122 | - \OC::$server->getConfig(), |
|
| 123 | - $util, |
|
| 124 | - new \Symfony\Component\Console\Helper\QuestionHelper() |
|
| 125 | - ) |
|
| 126 | - ); |
|
| 127 | - $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util)); |
|
| 112 | + $view = new \OC\Files\View(); |
|
| 113 | + $util = new \OC\Encryption\Util( |
|
| 114 | + $view, |
|
| 115 | + \OC::$server->getUserManager(), |
|
| 116 | + \OC::$server->getGroupManager(), |
|
| 117 | + \OC::$server->getConfig() |
|
| 118 | + ); |
|
| 119 | + $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot( |
|
| 120 | + $view, |
|
| 121 | + \OC::$server->getUserManager(), |
|
| 122 | + \OC::$server->getConfig(), |
|
| 123 | + $util, |
|
| 124 | + new \Symfony\Component\Console\Helper\QuestionHelper() |
|
| 125 | + ) |
|
| 126 | + ); |
|
| 127 | + $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util)); |
|
| 128 | 128 | |
| 129 | - $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory())); |
|
| 130 | - $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); |
|
| 131 | - $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); |
|
| 132 | - $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); |
|
| 133 | - $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); |
|
| 134 | - $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); |
|
| 129 | + $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory())); |
|
| 130 | + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); |
|
| 131 | + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); |
|
| 132 | + $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); |
|
| 133 | + $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); |
|
| 134 | + $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); |
|
| 135 | 135 | |
| 136 | - $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger())); |
|
| 137 | - $application->add(new OC\Core\Command\Maintenance\Repair( |
|
| 138 | - new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(), |
|
| 139 | - \OC::$server->getEventDispatcher(), \OC::$server->getAppManager())); |
|
| 136 | + $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger())); |
|
| 137 | + $application->add(new OC\Core\Command\Maintenance\Repair( |
|
| 138 | + new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(), |
|
| 139 | + \OC::$server->getEventDispatcher(), \OC::$server->getAppManager())); |
|
| 140 | 140 | |
| 141 | - $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 142 | - $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager())); |
|
| 143 | - $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager())); |
|
| 144 | - $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager())); |
|
| 145 | - $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager())); |
|
| 146 | - $application->add(new OC\Core\Command\User\Report(\OC::$server->getUserManager())); |
|
| 147 | - $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager())); |
|
| 148 | - $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection())); |
|
| 149 | - $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager())); |
|
| 150 | - $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 141 | + $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 142 | + $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager())); |
|
| 143 | + $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager())); |
|
| 144 | + $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager())); |
|
| 145 | + $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager())); |
|
| 146 | + $application->add(new OC\Core\Command\User\Report(\OC::$server->getUserManager())); |
|
| 147 | + $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager())); |
|
| 148 | + $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection())); |
|
| 149 | + $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager())); |
|
| 150 | + $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 151 | 151 | |
| 152 | - $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager())); |
|
| 153 | - $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 154 | - $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 152 | + $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager())); |
|
| 153 | + $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 154 | + $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 155 | 155 | |
| 156 | - $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core'))); |
|
| 157 | - $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); |
|
| 158 | - $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); |
|
| 156 | + $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core'))); |
|
| 157 | + $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); |
|
| 158 | + $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); |
|
| 159 | 159 | } else { |
| 160 | - $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig())); |
|
| 160 | + $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig())); |
|
| 161 | 161 | } |