@@ -36,114 +36,114 @@ |
||
| 36 | 36 | |
| 37 | 37 | class Remove extends Command implements CompletionAwareInterface { |
| 38 | 38 | |
| 39 | - /** @var IAppManager */ |
|
| 40 | - protected $manager; |
|
| 41 | - /** @var Installer */ |
|
| 42 | - private $installer; |
|
| 43 | - /** @var ILogger */ |
|
| 44 | - private $logger; |
|
| 45 | - |
|
| 46 | - /** |
|
| 47 | - * @param IAppManager $manager |
|
| 48 | - * @param Installer $installer |
|
| 49 | - * @param ILogger $logger |
|
| 50 | - */ |
|
| 51 | - public function __construct(IAppManager $manager, Installer $installer, ILogger $logger) { |
|
| 52 | - parent::__construct(); |
|
| 53 | - $this->manager = $manager; |
|
| 54 | - $this->installer = $installer; |
|
| 55 | - $this->logger = $logger; |
|
| 56 | - } |
|
| 57 | - |
|
| 58 | - protected function configure() { |
|
| 59 | - $this |
|
| 60 | - ->setName('app:remove') |
|
| 61 | - ->setDescription('remove an app') |
|
| 62 | - ->addArgument( |
|
| 63 | - 'app-id', |
|
| 64 | - InputArgument::REQUIRED, |
|
| 65 | - 'remove the specified app' |
|
| 66 | - ) |
|
| 67 | - ->addOption( |
|
| 68 | - 'keep-data', |
|
| 69 | - null, |
|
| 70 | - InputOption::VALUE_NONE, |
|
| 71 | - 'keep app data and do not remove them' |
|
| 72 | - ); |
|
| 73 | - } |
|
| 74 | - |
|
| 75 | - protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 76 | - $appId = $input->getArgument('app-id'); |
|
| 77 | - |
|
| 78 | - // Check if the app is installed |
|
| 79 | - if (!\OC_App::getAppPath($appId)) { |
|
| 80 | - $output->writeln($appId . ' is not installed'); |
|
| 81 | - return 1; |
|
| 82 | - } |
|
| 83 | - |
|
| 84 | - // Removing shipped apps is not possible, therefore we pre-check that |
|
| 85 | - // before trying to remove it |
|
| 86 | - if ($this->manager->isShipped($appId)) { |
|
| 87 | - $output->writeln($appId . ' could not be removed as it is a shipped app'); |
|
| 88 | - return 1; |
|
| 89 | - } |
|
| 90 | - |
|
| 91 | - // If we want to keep the data of the app, we simply don't disable it here. |
|
| 92 | - // App uninstall tasks are being executed when disabled. More info: PR #11627. |
|
| 93 | - if (!$input->getOption('keep-data')) { |
|
| 94 | - try { |
|
| 95 | - $this->manager->disableApp($appId); |
|
| 96 | - $output->writeln($appId . ' disabled'); |
|
| 97 | - } catch(Throwable $e) { |
|
| 98 | - $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
|
| 99 | - $this->logger->logException($e, [ |
|
| 100 | - 'app' => 'CLI', |
|
| 101 | - 'level' => ILogger::ERROR |
|
| 102 | - ]); |
|
| 103 | - return 1; |
|
| 104 | - } |
|
| 105 | - } |
|
| 106 | - |
|
| 107 | - // Let's try to remove the app... |
|
| 108 | - try { |
|
| 109 | - $result = $this->installer->removeApp($appId); |
|
| 110 | - } catch(Throwable $e) { |
|
| 111 | - $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
|
| 112 | - $this->logger->logException($e, [ |
|
| 113 | - 'app' => 'CLI', |
|
| 114 | - 'level' => ILogger::ERROR |
|
| 115 | - ]); |
|
| 116 | - return 1; |
|
| 117 | - } |
|
| 118 | - |
|
| 119 | - if($result === false) { |
|
| 120 | - $output->writeln($appId . ' could not be removed'); |
|
| 121 | - return 1; |
|
| 122 | - } |
|
| 123 | - |
|
| 124 | - $output->writeln($appId . ' removed'); |
|
| 125 | - |
|
| 126 | - return 0; |
|
| 127 | - } |
|
| 128 | - |
|
| 129 | - /** |
|
| 130 | - * @param string $optionName |
|
| 131 | - * @param CompletionContext $context |
|
| 132 | - * @return string[] |
|
| 133 | - */ |
|
| 134 | - public function completeOptionValues($optionName, CompletionContext $context) { |
|
| 135 | - return []; |
|
| 136 | - } |
|
| 137 | - |
|
| 138 | - /** |
|
| 139 | - * @param string $argumentName |
|
| 140 | - * @param CompletionContext $context |
|
| 141 | - * @return string[] |
|
| 142 | - */ |
|
| 143 | - public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
| 144 | - if ($argumentName === 'app-id') { |
|
| 145 | - return \OC_App::getAllApps(); |
|
| 146 | - } |
|
| 147 | - return []; |
|
| 148 | - } |
|
| 39 | + /** @var IAppManager */ |
|
| 40 | + protected $manager; |
|
| 41 | + /** @var Installer */ |
|
| 42 | + private $installer; |
|
| 43 | + /** @var ILogger */ |
|
| 44 | + private $logger; |
|
| 45 | + |
|
| 46 | + /** |
|
| 47 | + * @param IAppManager $manager |
|
| 48 | + * @param Installer $installer |
|
| 49 | + * @param ILogger $logger |
|
| 50 | + */ |
|
| 51 | + public function __construct(IAppManager $manager, Installer $installer, ILogger $logger) { |
|
| 52 | + parent::__construct(); |
|
| 53 | + $this->manager = $manager; |
|
| 54 | + $this->installer = $installer; |
|
| 55 | + $this->logger = $logger; |
|
| 56 | + } |
|
| 57 | + |
|
| 58 | + protected function configure() { |
|
| 59 | + $this |
|
| 60 | + ->setName('app:remove') |
|
| 61 | + ->setDescription('remove an app') |
|
| 62 | + ->addArgument( |
|
| 63 | + 'app-id', |
|
| 64 | + InputArgument::REQUIRED, |
|
| 65 | + 'remove the specified app' |
|
| 66 | + ) |
|
| 67 | + ->addOption( |
|
| 68 | + 'keep-data', |
|
| 69 | + null, |
|
| 70 | + InputOption::VALUE_NONE, |
|
| 71 | + 'keep app data and do not remove them' |
|
| 72 | + ); |
|
| 73 | + } |
|
| 74 | + |
|
| 75 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
| 76 | + $appId = $input->getArgument('app-id'); |
|
| 77 | + |
|
| 78 | + // Check if the app is installed |
|
| 79 | + if (!\OC_App::getAppPath($appId)) { |
|
| 80 | + $output->writeln($appId . ' is not installed'); |
|
| 81 | + return 1; |
|
| 82 | + } |
|
| 83 | + |
|
| 84 | + // Removing shipped apps is not possible, therefore we pre-check that |
|
| 85 | + // before trying to remove it |
|
| 86 | + if ($this->manager->isShipped($appId)) { |
|
| 87 | + $output->writeln($appId . ' could not be removed as it is a shipped app'); |
|
| 88 | + return 1; |
|
| 89 | + } |
|
| 90 | + |
|
| 91 | + // If we want to keep the data of the app, we simply don't disable it here. |
|
| 92 | + // App uninstall tasks are being executed when disabled. More info: PR #11627. |
|
| 93 | + if (!$input->getOption('keep-data')) { |
|
| 94 | + try { |
|
| 95 | + $this->manager->disableApp($appId); |
|
| 96 | + $output->writeln($appId . ' disabled'); |
|
| 97 | + } catch(Throwable $e) { |
|
| 98 | + $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
|
| 99 | + $this->logger->logException($e, [ |
|
| 100 | + 'app' => 'CLI', |
|
| 101 | + 'level' => ILogger::ERROR |
|
| 102 | + ]); |
|
| 103 | + return 1; |
|
| 104 | + } |
|
| 105 | + } |
|
| 106 | + |
|
| 107 | + // Let's try to remove the app... |
|
| 108 | + try { |
|
| 109 | + $result = $this->installer->removeApp($appId); |
|
| 110 | + } catch(Throwable $e) { |
|
| 111 | + $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
|
| 112 | + $this->logger->logException($e, [ |
|
| 113 | + 'app' => 'CLI', |
|
| 114 | + 'level' => ILogger::ERROR |
|
| 115 | + ]); |
|
| 116 | + return 1; |
|
| 117 | + } |
|
| 118 | + |
|
| 119 | + if($result === false) { |
|
| 120 | + $output->writeln($appId . ' could not be removed'); |
|
| 121 | + return 1; |
|
| 122 | + } |
|
| 123 | + |
|
| 124 | + $output->writeln($appId . ' removed'); |
|
| 125 | + |
|
| 126 | + return 0; |
|
| 127 | + } |
|
| 128 | + |
|
| 129 | + /** |
|
| 130 | + * @param string $optionName |
|
| 131 | + * @param CompletionContext $context |
|
| 132 | + * @return string[] |
|
| 133 | + */ |
|
| 134 | + public function completeOptionValues($optionName, CompletionContext $context) { |
|
| 135 | + return []; |
|
| 136 | + } |
|
| 137 | + |
|
| 138 | + /** |
|
| 139 | + * @param string $argumentName |
|
| 140 | + * @param CompletionContext $context |
|
| 141 | + * @return string[] |
|
| 142 | + */ |
|
| 143 | + public function completeArgumentValues($argumentName, CompletionContext $context) { |
|
| 144 | + if ($argumentName === 'app-id') { |
|
| 145 | + return \OC_App::getAllApps(); |
|
| 146 | + } |
|
| 147 | + return []; |
|
| 148 | + } |
|
| 149 | 149 | } |
@@ -77,14 +77,14 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | // Check if the app is installed |
| 79 | 79 | if (!\OC_App::getAppPath($appId)) { |
| 80 | - $output->writeln($appId . ' is not installed'); |
|
| 80 | + $output->writeln($appId.' is not installed'); |
|
| 81 | 81 | return 1; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // Removing shipped apps is not possible, therefore we pre-check that |
| 85 | 85 | // before trying to remove it |
| 86 | 86 | if ($this->manager->isShipped($appId)) { |
| 87 | - $output->writeln($appId . ' could not be removed as it is a shipped app'); |
|
| 87 | + $output->writeln($appId.' could not be removed as it is a shipped app'); |
|
| 88 | 88 | return 1; |
| 89 | 89 | } |
| 90 | 90 | |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | if (!$input->getOption('keep-data')) { |
| 94 | 94 | try { |
| 95 | 95 | $this->manager->disableApp($appId); |
| 96 | - $output->writeln($appId . ' disabled'); |
|
| 97 | - } catch(Throwable $e) { |
|
| 98 | - $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
|
| 96 | + $output->writeln($appId.' disabled'); |
|
| 97 | + } catch (Throwable $e) { |
|
| 98 | + $output->writeln('<error>Error: '.$e->getMessage().'</error>'); |
|
| 99 | 99 | $this->logger->logException($e, [ |
| 100 | 100 | 'app' => 'CLI', |
| 101 | 101 | 'level' => ILogger::ERROR |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | // Let's try to remove the app... |
| 108 | 108 | try { |
| 109 | 109 | $result = $this->installer->removeApp($appId); |
| 110 | - } catch(Throwable $e) { |
|
| 111 | - $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
|
| 110 | + } catch (Throwable $e) { |
|
| 111 | + $output->writeln('<error>Error: '.$e->getMessage().'</error>'); |
|
| 112 | 112 | $this->logger->logException($e, [ |
| 113 | 113 | 'app' => 'CLI', |
| 114 | 114 | 'level' => ILogger::ERROR |
@@ -116,12 +116,12 @@ discard block |
||
| 116 | 116 | return 1; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - if($result === false) { |
|
| 120 | - $output->writeln($appId . ' could not be removed'); |
|
| 119 | + if ($result === false) { |
|
| 120 | + $output->writeln($appId.' could not be removed'); |
|
| 121 | 121 | return 1; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - $output->writeln($appId . ' removed'); |
|
| 124 | + $output->writeln($appId.' removed'); |
|
| 125 | 125 | |
| 126 | 126 | return 0; |
| 127 | 127 | } |
@@ -43,125 +43,125 @@ |
||
| 43 | 43 | $application->add(new OC\Core\Command\App\CheckCode()); |
| 44 | 44 | $application->add(new OC\Core\Command\L10n\CreateJs()); |
| 45 | 45 | $application->add(new \OC\Core\Command\Integrity\SignApp( |
| 46 | - \OC::$server->getIntegrityCodeChecker(), |
|
| 47 | - new \OC\IntegrityCheck\Helpers\FileAccessHelper(), |
|
| 48 | - \OC::$server->getURLGenerator() |
|
| 46 | + \OC::$server->getIntegrityCodeChecker(), |
|
| 47 | + new \OC\IntegrityCheck\Helpers\FileAccessHelper(), |
|
| 48 | + \OC::$server->getURLGenerator() |
|
| 49 | 49 | )); |
| 50 | 50 | $application->add(new \OC\Core\Command\Integrity\SignCore( |
| 51 | - \OC::$server->getIntegrityCodeChecker(), |
|
| 52 | - new \OC\IntegrityCheck\Helpers\FileAccessHelper() |
|
| 51 | + \OC::$server->getIntegrityCodeChecker(), |
|
| 52 | + new \OC\IntegrityCheck\Helpers\FileAccessHelper() |
|
| 53 | 53 | )); |
| 54 | 54 | $application->add(new \OC\Core\Command\Integrity\CheckApp( |
| 55 | - \OC::$server->getIntegrityCodeChecker() |
|
| 55 | + \OC::$server->getIntegrityCodeChecker() |
|
| 56 | 56 | )); |
| 57 | 57 | $application->add(new \OC\Core\Command\Integrity\CheckCore( |
| 58 | - \OC::$server->getIntegrityCodeChecker() |
|
| 58 | + \OC::$server->getIntegrityCodeChecker() |
|
| 59 | 59 | )); |
| 60 | 60 | |
| 61 | 61 | |
| 62 | 62 | if (\OC::$server->getConfig()->getSystemValue('installed', false)) { |
| 63 | - $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager())); |
|
| 64 | - $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager())); |
|
| 65 | - $application->add(new OC\Core\Command\App\Install()); |
|
| 66 | - $application->add(new OC\Core\Command\App\GetPath()); |
|
| 67 | - $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager())); |
|
| 68 | - $application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->getLogger())); |
|
| 63 | + $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager())); |
|
| 64 | + $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager())); |
|
| 65 | + $application->add(new OC\Core\Command\App\Install()); |
|
| 66 | + $application->add(new OC\Core\Command\App\GetPath()); |
|
| 67 | + $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager())); |
|
| 68 | + $application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->getLogger())); |
|
| 69 | 69 | |
| 70 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class)); |
|
| 71 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class)); |
|
| 72 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class)); |
|
| 73 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class)); |
|
| 74 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class)); |
|
| 70 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class)); |
|
| 71 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class)); |
|
| 72 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class)); |
|
| 73 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class)); |
|
| 74 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class)); |
|
| 75 | 75 | |
| 76 | - $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig())); |
|
| 77 | - $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig())); |
|
| 78 | - $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig())); |
|
| 76 | + $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig())); |
|
| 77 | + $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig())); |
|
| 78 | + $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig())); |
|
| 79 | 79 | |
| 80 | - $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig())); |
|
| 81 | - $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); |
|
| 82 | - $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); |
|
| 83 | - $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); |
|
| 84 | - $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); |
|
| 85 | - $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); |
|
| 86 | - $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); |
|
| 87 | - $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); |
|
| 80 | + $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig())); |
|
| 81 | + $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); |
|
| 82 | + $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); |
|
| 83 | + $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); |
|
| 84 | + $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); |
|
| 85 | + $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); |
|
| 86 | + $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); |
|
| 87 | + $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); |
|
| 88 | 88 | |
| 89 | - $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig()))); |
|
| 90 | - $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger())); |
|
| 91 | - $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection())); |
|
| 92 | - $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher())); |
|
| 93 | - $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection())); |
|
| 94 | - $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection())); |
|
| 95 | - $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager())); |
|
| 96 | - $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection())); |
|
| 97 | - $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager(), \OC::$server->getConfig())); |
|
| 89 | + $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig()))); |
|
| 90 | + $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger())); |
|
| 91 | + $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection())); |
|
| 92 | + $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher())); |
|
| 93 | + $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection())); |
|
| 94 | + $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection())); |
|
| 95 | + $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager())); |
|
| 96 | + $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection())); |
|
| 97 | + $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager(), \OC::$server->getConfig())); |
|
| 98 | 98 | |
| 99 | - $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); |
|
| 100 | - $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |
|
| 101 | - $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager())); |
|
| 102 | - $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager())); |
|
| 103 | - $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager())); |
|
| 104 | - $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper())); |
|
| 105 | - $application->add(new OC\Core\Command\Encryption\DecryptAll( |
|
| 106 | - \OC::$server->getEncryptionManager(), |
|
| 107 | - \OC::$server->getAppManager(), |
|
| 108 | - \OC::$server->getConfig(), |
|
| 109 | - new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()), |
|
| 110 | - new \Symfony\Component\Console\Helper\QuestionHelper()) |
|
| 111 | - ); |
|
| 99 | + $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); |
|
| 100 | + $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |
|
| 101 | + $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager())); |
|
| 102 | + $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager())); |
|
| 103 | + $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager())); |
|
| 104 | + $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper())); |
|
| 105 | + $application->add(new OC\Core\Command\Encryption\DecryptAll( |
|
| 106 | + \OC::$server->getEncryptionManager(), |
|
| 107 | + \OC::$server->getAppManager(), |
|
| 108 | + \OC::$server->getConfig(), |
|
| 109 | + new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()), |
|
| 110 | + new \Symfony\Component\Console\Helper\QuestionHelper()) |
|
| 111 | + ); |
|
| 112 | 112 | |
| 113 | - $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig())); |
|
| 114 | - $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig())); |
|
| 113 | + $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig())); |
|
| 114 | + $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig())); |
|
| 115 | 115 | |
| 116 | - $view = new \OC\Files\View(); |
|
| 117 | - $util = new \OC\Encryption\Util( |
|
| 118 | - $view, |
|
| 119 | - \OC::$server->getUserManager(), |
|
| 120 | - \OC::$server->getGroupManager(), |
|
| 121 | - \OC::$server->getConfig() |
|
| 122 | - ); |
|
| 123 | - $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot( |
|
| 124 | - $view, |
|
| 125 | - \OC::$server->getUserManager(), |
|
| 126 | - \OC::$server->getConfig(), |
|
| 127 | - $util, |
|
| 128 | - new \Symfony\Component\Console\Helper\QuestionHelper() |
|
| 129 | - ) |
|
| 130 | - ); |
|
| 131 | - $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util)); |
|
| 116 | + $view = new \OC\Files\View(); |
|
| 117 | + $util = new \OC\Encryption\Util( |
|
| 118 | + $view, |
|
| 119 | + \OC::$server->getUserManager(), |
|
| 120 | + \OC::$server->getGroupManager(), |
|
| 121 | + \OC::$server->getConfig() |
|
| 122 | + ); |
|
| 123 | + $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot( |
|
| 124 | + $view, |
|
| 125 | + \OC::$server->getUserManager(), |
|
| 126 | + \OC::$server->getConfig(), |
|
| 127 | + $util, |
|
| 128 | + new \Symfony\Component\Console\Helper\QuestionHelper() |
|
| 129 | + ) |
|
| 130 | + ); |
|
| 131 | + $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util)); |
|
| 132 | 132 | |
| 133 | - $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory())); |
|
| 134 | - $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); |
|
| 135 | - $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); |
|
| 136 | - $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); |
|
| 137 | - $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); |
|
| 138 | - $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); |
|
| 133 | + $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory())); |
|
| 134 | + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); |
|
| 135 | + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); |
|
| 136 | + $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); |
|
| 137 | + $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); |
|
| 138 | + $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); |
|
| 139 | 139 | |
| 140 | - $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class))); |
|
| 141 | - $application->add(new OC\Core\Command\Maintenance\Repair( |
|
| 142 | - new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(), |
|
| 143 | - \OC::$server->getEventDispatcher(), \OC::$server->getAppManager())); |
|
| 140 | + $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class))); |
|
| 141 | + $application->add(new OC\Core\Command\Maintenance\Repair( |
|
| 142 | + new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(), |
|
| 143 | + \OC::$server->getEventDispatcher(), \OC::$server->getAppManager())); |
|
| 144 | 144 | |
| 145 | - $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 146 | - $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager())); |
|
| 147 | - $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager())); |
|
| 148 | - $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager())); |
|
| 149 | - $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager())); |
|
| 150 | - $application->add(new OC\Core\Command\User\Report(\OC::$server->getUserManager())); |
|
| 151 | - $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager())); |
|
| 152 | - $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection())); |
|
| 153 | - $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager())); |
|
| 154 | - $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 145 | + $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 146 | + $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager())); |
|
| 147 | + $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager())); |
|
| 148 | + $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager())); |
|
| 149 | + $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager())); |
|
| 150 | + $application->add(new OC\Core\Command\User\Report(\OC::$server->getUserManager())); |
|
| 151 | + $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager())); |
|
| 152 | + $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection())); |
|
| 153 | + $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager())); |
|
| 154 | + $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 155 | 155 | |
| 156 | - $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager())); |
|
| 157 | - $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager())); |
|
| 158 | - $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager())); |
|
| 159 | - $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 160 | - $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 156 | + $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager())); |
|
| 157 | + $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager())); |
|
| 158 | + $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager())); |
|
| 159 | + $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 160 | + $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
| 161 | 161 | |
| 162 | - $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core'))); |
|
| 163 | - $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); |
|
| 164 | - $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); |
|
| 162 | + $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core'))); |
|
| 163 | + $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); |
|
| 164 | + $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); |
|
| 165 | 165 | } else { |
| 166 | - $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig())); |
|
| 166 | + $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig())); |
|
| 167 | 167 | } |