@@ -32,94 +32,94 @@ |
||
32 | 32 | |
33 | 33 | class Update extends Command { |
34 | 34 | |
35 | - /** @var IAppManager */ |
|
36 | - protected $manager; |
|
37 | - /** @var Installer */ |
|
38 | - private $installer; |
|
39 | - /** @var ILogger */ |
|
40 | - private $logger; |
|
35 | + /** @var IAppManager */ |
|
36 | + protected $manager; |
|
37 | + /** @var Installer */ |
|
38 | + private $installer; |
|
39 | + /** @var ILogger */ |
|
40 | + private $logger; |
|
41 | 41 | |
42 | - /** |
|
43 | - * @param IAppManager $manager |
|
44 | - * @param Installer $installer |
|
45 | - */ |
|
46 | - public function __construct(IAppManager $manager, Installer $installer, ILogger $logger) { |
|
47 | - parent::__construct(); |
|
48 | - $this->manager = $manager; |
|
49 | - $this->installer = $installer; |
|
50 | - $this->logger = $logger; |
|
51 | - } |
|
42 | + /** |
|
43 | + * @param IAppManager $manager |
|
44 | + * @param Installer $installer |
|
45 | + */ |
|
46 | + public function __construct(IAppManager $manager, Installer $installer, ILogger $logger) { |
|
47 | + parent::__construct(); |
|
48 | + $this->manager = $manager; |
|
49 | + $this->installer = $installer; |
|
50 | + $this->logger = $logger; |
|
51 | + } |
|
52 | 52 | |
53 | - protected function configure() { |
|
54 | - $this |
|
55 | - ->setName('app:update') |
|
56 | - ->setDescription('update an app or all apps') |
|
57 | - ->addArgument( |
|
58 | - 'app-id', |
|
59 | - InputArgument::OPTIONAL, |
|
60 | - 'update the specified app' |
|
61 | - ) |
|
62 | - ->addOption( |
|
63 | - 'all', |
|
64 | - null, |
|
65 | - InputOption::VALUE_NONE, |
|
66 | - 'update all updatable apps' |
|
67 | - ) |
|
68 | - ->addOption( |
|
69 | - 'showonly', |
|
70 | - null, |
|
71 | - InputOption::VALUE_NONE, |
|
72 | - 'show update(s) without updating' |
|
73 | - ) |
|
53 | + protected function configure() { |
|
54 | + $this |
|
55 | + ->setName('app:update') |
|
56 | + ->setDescription('update an app or all apps') |
|
57 | + ->addArgument( |
|
58 | + 'app-id', |
|
59 | + InputArgument::OPTIONAL, |
|
60 | + 'update the specified app' |
|
61 | + ) |
|
62 | + ->addOption( |
|
63 | + 'all', |
|
64 | + null, |
|
65 | + InputOption::VALUE_NONE, |
|
66 | + 'update all updatable apps' |
|
67 | + ) |
|
68 | + ->addOption( |
|
69 | + 'showonly', |
|
70 | + null, |
|
71 | + InputOption::VALUE_NONE, |
|
72 | + 'show update(s) without updating' |
|
73 | + ) |
|
74 | 74 | |
75 | - ; |
|
76 | - } |
|
75 | + ; |
|
76 | + } |
|
77 | 77 | |
78 | - protected function execute(InputInterface $input, OutputInterface $output) { |
|
79 | - $singleAppId = $input->getArgument('app-id'); |
|
78 | + protected function execute(InputInterface $input, OutputInterface $output) { |
|
79 | + $singleAppId = $input->getArgument('app-id'); |
|
80 | 80 | |
81 | - if ($singleAppId) { |
|
82 | - $apps = array($singleAppId); |
|
83 | - try { |
|
84 | - $this->manager->getAppPath($singleAppId); |
|
85 | - } catch (\OCP\App\AppPathNotFoundException $e) { |
|
86 | - $output->writeln($singleAppId . ' not installed'); |
|
87 | - return 1; |
|
88 | - } |
|
81 | + if ($singleAppId) { |
|
82 | + $apps = array($singleAppId); |
|
83 | + try { |
|
84 | + $this->manager->getAppPath($singleAppId); |
|
85 | + } catch (\OCP\App\AppPathNotFoundException $e) { |
|
86 | + $output->writeln($singleAppId . ' not installed'); |
|
87 | + return 1; |
|
88 | + } |
|
89 | 89 | |
90 | - } else if ($input->getOption('all') || $input->getOption('showonly')) { |
|
91 | - $apps = \OC_App::getAllApps(); |
|
92 | - } else { |
|
93 | - $output->writeln("<error>Please specify an app to update or \"--all\" to update all updatable apps\"</error>"); |
|
94 | - return 1; |
|
95 | - } |
|
90 | + } else if ($input->getOption('all') || $input->getOption('showonly')) { |
|
91 | + $apps = \OC_App::getAllApps(); |
|
92 | + } else { |
|
93 | + $output->writeln("<error>Please specify an app to update or \"--all\" to update all updatable apps\"</error>"); |
|
94 | + return 1; |
|
95 | + } |
|
96 | 96 | |
97 | - $return = 0; |
|
98 | - foreach ($apps as $appId) { |
|
99 | - $newVersion = $this->installer->isUpdateAvailable($appId); |
|
100 | - if ($newVersion) { |
|
101 | - $output->writeln($appId . ' new version available: ' . $newVersion); |
|
97 | + $return = 0; |
|
98 | + foreach ($apps as $appId) { |
|
99 | + $newVersion = $this->installer->isUpdateAvailable($appId); |
|
100 | + if ($newVersion) { |
|
101 | + $output->writeln($appId . ' new version available: ' . $newVersion); |
|
102 | 102 | |
103 | - if (!$input->getOption('showonly')) { |
|
104 | - try { |
|
105 | - $result = $this->installer->updateAppstoreApp($appId); |
|
106 | - } catch(\Exception $e) { |
|
107 | - $this->logger->logException($e, ['message' => 'Failure during update of app "' . $appId . '"','app' => 'app:update']); |
|
108 | - $output->writeln('Error: ' . $e->getMessage()); |
|
109 | - $return = 1; |
|
110 | - } |
|
103 | + if (!$input->getOption('showonly')) { |
|
104 | + try { |
|
105 | + $result = $this->installer->updateAppstoreApp($appId); |
|
106 | + } catch(\Exception $e) { |
|
107 | + $this->logger->logException($e, ['message' => 'Failure during update of app "' . $appId . '"','app' => 'app:update']); |
|
108 | + $output->writeln('Error: ' . $e->getMessage()); |
|
109 | + $return = 1; |
|
110 | + } |
|
111 | 111 | |
112 | - if ($result === false) { |
|
113 | - $output->writeln($appId . ' couldn\'t be updated'); |
|
114 | - $return = 1; |
|
115 | - } else if($result === true) { |
|
116 | - $output->writeln($appId . ' updated'); |
|
117 | - } |
|
118 | - } |
|
119 | - } |
|
120 | - } |
|
112 | + if ($result === false) { |
|
113 | + $output->writeln($appId . ' couldn\'t be updated'); |
|
114 | + $return = 1; |
|
115 | + } else if($result === true) { |
|
116 | + $output->writeln($appId . ' updated'); |
|
117 | + } |
|
118 | + } |
|
119 | + } |
|
120 | + } |
|
121 | 121 | |
122 | - return $return; |
|
123 | - } |
|
122 | + return $return; |
|
123 | + } |
|
124 | 124 | } |
125 | 125 |
@@ -43,126 +43,126 @@ |
||
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())); |
|
69 | - $application->add(\OC::$server->query(\OC\Core\Command\App\Update::class)); |
|
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 | + $application->add(\OC::$server->query(\OC\Core\Command\App\Update::class)); |
|
70 | 70 | |
71 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class)); |
|
72 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class)); |
|
73 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class)); |
|
74 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class)); |
|
75 | - $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class)); |
|
71 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class)); |
|
72 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class)); |
|
73 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class)); |
|
74 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class)); |
|
75 | + $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class)); |
|
76 | 76 | |
77 | - $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig())); |
|
78 | - $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig())); |
|
79 | - $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig())); |
|
77 | + $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig())); |
|
78 | + $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig())); |
|
79 | + $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig())); |
|
80 | 80 | |
81 | - $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig())); |
|
82 | - $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); |
|
83 | - $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); |
|
84 | - $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); |
|
85 | - $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); |
|
86 | - $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); |
|
87 | - $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); |
|
88 | - $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); |
|
81 | + $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig())); |
|
82 | + $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); |
|
83 | + $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); |
|
84 | + $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); |
|
85 | + $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); |
|
86 | + $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); |
|
87 | + $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); |
|
88 | + $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); |
|
89 | 89 | |
90 | - $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig()))); |
|
91 | - $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger())); |
|
92 | - $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection())); |
|
93 | - $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher())); |
|
94 | - $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection())); |
|
95 | - $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection())); |
|
96 | - $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager())); |
|
97 | - $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection())); |
|
98 | - $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager(), \OC::$server->getConfig())); |
|
90 | + $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig()))); |
|
91 | + $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger())); |
|
92 | + $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection())); |
|
93 | + $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher())); |
|
94 | + $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection())); |
|
95 | + $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection())); |
|
96 | + $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager())); |
|
97 | + $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection())); |
|
98 | + $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager(), \OC::$server->getConfig())); |
|
99 | 99 | |
100 | - $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); |
|
101 | - $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |
|
102 | - $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager())); |
|
103 | - $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager())); |
|
104 | - $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager())); |
|
105 | - $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper())); |
|
106 | - $application->add(new OC\Core\Command\Encryption\DecryptAll( |
|
107 | - \OC::$server->getEncryptionManager(), |
|
108 | - \OC::$server->getAppManager(), |
|
109 | - \OC::$server->getConfig(), |
|
110 | - new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()), |
|
111 | - new \Symfony\Component\Console\Helper\QuestionHelper()) |
|
112 | - ); |
|
100 | + $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig())); |
|
101 | + $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager())); |
|
102 | + $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager())); |
|
103 | + $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager())); |
|
104 | + $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager())); |
|
105 | + $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper())); |
|
106 | + $application->add(new OC\Core\Command\Encryption\DecryptAll( |
|
107 | + \OC::$server->getEncryptionManager(), |
|
108 | + \OC::$server->getAppManager(), |
|
109 | + \OC::$server->getConfig(), |
|
110 | + new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()), |
|
111 | + new \Symfony\Component\Console\Helper\QuestionHelper()) |
|
112 | + ); |
|
113 | 113 | |
114 | - $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig())); |
|
115 | - $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig())); |
|
114 | + $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig())); |
|
115 | + $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig())); |
|
116 | 116 | |
117 | - $view = new \OC\Files\View(); |
|
118 | - $util = new \OC\Encryption\Util( |
|
119 | - $view, |
|
120 | - \OC::$server->getUserManager(), |
|
121 | - \OC::$server->getGroupManager(), |
|
122 | - \OC::$server->getConfig() |
|
123 | - ); |
|
124 | - $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot( |
|
125 | - $view, |
|
126 | - \OC::$server->getUserManager(), |
|
127 | - \OC::$server->getConfig(), |
|
128 | - $util, |
|
129 | - new \Symfony\Component\Console\Helper\QuestionHelper() |
|
130 | - ) |
|
131 | - ); |
|
132 | - $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util)); |
|
117 | + $view = new \OC\Files\View(); |
|
118 | + $util = new \OC\Encryption\Util( |
|
119 | + $view, |
|
120 | + \OC::$server->getUserManager(), |
|
121 | + \OC::$server->getGroupManager(), |
|
122 | + \OC::$server->getConfig() |
|
123 | + ); |
|
124 | + $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot( |
|
125 | + $view, |
|
126 | + \OC::$server->getUserManager(), |
|
127 | + \OC::$server->getConfig(), |
|
128 | + $util, |
|
129 | + new \Symfony\Component\Console\Helper\QuestionHelper() |
|
130 | + ) |
|
131 | + ); |
|
132 | + $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util)); |
|
133 | 133 | |
134 | - $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory())); |
|
135 | - $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); |
|
136 | - $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); |
|
137 | - $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); |
|
138 | - $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); |
|
139 | - $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); |
|
134 | + $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory())); |
|
135 | + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader())); |
|
136 | + $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector())); |
|
137 | + $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig())); |
|
138 | + $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess()); |
|
139 | + $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory())); |
|
140 | 140 | |
141 | - $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class))); |
|
142 | - $application->add(new OC\Core\Command\Maintenance\Repair( |
|
143 | - new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(), |
|
144 | - \OC::$server->getEventDispatcher(), \OC::$server->getAppManager())); |
|
141 | + $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class))); |
|
142 | + $application->add(new OC\Core\Command\Maintenance\Repair( |
|
143 | + new \OC\Repair(\OC\Repair::getRepairSteps(), \OC::$server->getEventDispatcher()), \OC::$server->getConfig(), |
|
144 | + \OC::$server->getEventDispatcher(), \OC::$server->getAppManager())); |
|
145 | 145 | |
146 | - $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
147 | - $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager())); |
|
148 | - $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager())); |
|
149 | - $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager())); |
|
150 | - $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager())); |
|
151 | - $application->add(new OC\Core\Command\User\Report(\OC::$server->getUserManager())); |
|
152 | - $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager())); |
|
153 | - $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection())); |
|
154 | - $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager())); |
|
155 | - $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
146 | + $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
147 | + $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager())); |
|
148 | + $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager())); |
|
149 | + $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager())); |
|
150 | + $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager())); |
|
151 | + $application->add(new OC\Core\Command\User\Report(\OC::$server->getUserManager())); |
|
152 | + $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager())); |
|
153 | + $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection())); |
|
154 | + $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager())); |
|
155 | + $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
156 | 156 | |
157 | - $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager())); |
|
158 | - $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager())); |
|
159 | - $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager())); |
|
160 | - $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
161 | - $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
157 | + $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager())); |
|
158 | + $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager())); |
|
159 | + $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager())); |
|
160 | + $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
161 | + $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager())); |
|
162 | 162 | |
163 | - $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core'))); |
|
164 | - $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); |
|
165 | - $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); |
|
163 | + $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core'))); |
|
164 | + $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null))); |
|
165 | + $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null))); |
|
166 | 166 | } else { |
167 | - $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig())); |
|
167 | + $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig())); |
|
168 | 168 | } |