@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | // need to send an initial message to force-init the event source, |
45 | 45 | // which will then trigger its own CSRF check and produces its own CSRF error |
46 | 46 | // message |
47 | -$eventSource->send('success', (string)$l->t('Preparing update')); |
|
47 | +$eventSource->send('success', (string) $l->t('Preparing update')); |
|
48 | 48 | |
49 | 49 | class FeedBackHandler { |
50 | 50 | /** @var integer */ |
@@ -80,21 +80,21 @@ discard block |
||
80 | 80 | if (empty($desc)) { |
81 | 81 | $desc = $this->currentStep; |
82 | 82 | } |
83 | - $this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc])); |
|
83 | + $this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc])); |
|
84 | 84 | break; |
85 | 85 | case '\OC\Repair::finishProgress': |
86 | 86 | $this->progressStateMax = $this->progressStateStep; |
87 | - $this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep])); |
|
87 | + $this->eventSource->send('success', (string) $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep])); |
|
88 | 88 | break; |
89 | 89 | case '\OC\Repair::step': |
90 | 90 | break; |
91 | 91 | case '\OC\Repair::info': |
92 | 92 | break; |
93 | 93 | case '\OC\Repair::warning': |
94 | - $this->eventSource->send('notice', (string)$this->l10n->t('Repair warning: ') . $event->getArgument(0)); |
|
94 | + $this->eventSource->send('notice', (string) $this->l10n->t('Repair warning: ').$event->getArgument(0)); |
|
95 | 95 | break; |
96 | 96 | case '\OC\Repair::error': |
97 | - $this->eventSource->send('notice', (string)$this->l10n->t('Repair error: ') . $event->getArgument(0)); |
|
97 | + $this->eventSource->send('notice', (string) $this->l10n->t('Repair error: ').$event->getArgument(0)); |
|
98 | 98 | break; |
99 | 99 | } |
100 | 100 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | $config = \OC::$server->getSystemConfig(); |
106 | 106 | if ($config->getValue('upgrade.disable-web', false)) { |
107 | - $eventSource->send('failure', (string)$l->t('Please use the command line updater because automatic updating is disabled in the config.php.')); |
|
107 | + $eventSource->send('failure', (string) $l->t('Please use the command line updater because automatic updating is disabled in the config.php.')); |
|
108 | 108 | $eventSource->close(); |
109 | 109 | exit(); |
110 | 110 | } |
@@ -127,12 +127,12 @@ discard block |
||
127 | 127 | $dispatcher = \OC::$server->getEventDispatcher(); |
128 | 128 | $dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) { |
129 | 129 | if ($event instanceof GenericEvent) { |
130 | - $eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()])); |
|
130 | + $eventSource->send('success', (string) $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()])); |
|
131 | 131 | } |
132 | 132 | }); |
133 | 133 | $dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($eventSource, $l) { |
134 | 134 | if ($event instanceof GenericEvent) { |
135 | - $eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()])); |
|
135 | + $eventSource->send('success', (string) $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()])); |
|
136 | 136 | } |
137 | 137 | }); |
138 | 138 | $feedBack = new FeedBackHandler($eventSource, $l); |
@@ -144,70 +144,70 @@ discard block |
||
144 | 144 | $dispatcher->addListener('\OC\Repair::warning', [$feedBack, 'handleRepairFeedback']); |
145 | 145 | $dispatcher->addListener('\OC\Repair::error', [$feedBack, 'handleRepairFeedback']); |
146 | 146 | |
147 | - $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) { |
|
148 | - $eventSource->send('success', (string)$l->t('Turned on maintenance mode')); |
|
147 | + $updater->listen('\OC\Updater', 'maintenanceEnabled', function() use ($eventSource, $l) { |
|
148 | + $eventSource->send('success', (string) $l->t('Turned on maintenance mode')); |
|
149 | 149 | }); |
150 | - $updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($eventSource, $l) { |
|
151 | - $eventSource->send('success', (string)$l->t('Turned off maintenance mode')); |
|
150 | + $updater->listen('\OC\Updater', 'maintenanceDisabled', function() use ($eventSource, $l) { |
|
151 | + $eventSource->send('success', (string) $l->t('Turned off maintenance mode')); |
|
152 | 152 | }); |
153 | - $updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) { |
|
154 | - $eventSource->send('success', (string)$l->t('Maintenance mode is kept active')); |
|
153 | + $updater->listen('\OC\Updater', 'maintenanceActive', function() use ($eventSource, $l) { |
|
154 | + $eventSource->send('success', (string) $l->t('Maintenance mode is kept active')); |
|
155 | 155 | }); |
156 | - $updater->listen('\OC\Updater', 'waitForCronToFinish', function () use ($eventSource, $l) { |
|
157 | - $eventSource->send('success', (string)$l->t('Waiting for cron to finish (checks again in 5 seconds) …')); |
|
156 | + $updater->listen('\OC\Updater', 'waitForCronToFinish', function() use ($eventSource, $l) { |
|
157 | + $eventSource->send('success', (string) $l->t('Waiting for cron to finish (checks again in 5 seconds) …')); |
|
158 | 158 | }); |
159 | - $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($eventSource, $l) { |
|
160 | - $eventSource->send('success', (string)$l->t('Updating database schema')); |
|
159 | + $updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($eventSource, $l) { |
|
160 | + $eventSource->send('success', (string) $l->t('Updating database schema')); |
|
161 | 161 | }); |
162 | - $updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) { |
|
163 | - $eventSource->send('success', (string)$l->t('Updated database')); |
|
162 | + $updater->listen('\OC\Updater', 'dbUpgrade', function() use ($eventSource, $l) { |
|
163 | + $eventSource->send('success', (string) $l->t('Updated database')); |
|
164 | 164 | }); |
165 | - $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($eventSource, $l) { |
|
166 | - $eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)')); |
|
165 | + $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($eventSource, $l) { |
|
166 | + $eventSource->send('success', (string) $l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)')); |
|
167 | 167 | }); |
168 | - $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) { |
|
169 | - $eventSource->send('success', (string)$l->t('Checked database schema update')); |
|
168 | + $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use ($eventSource, $l) { |
|
169 | + $eventSource->send('success', (string) $l->t('Checked database schema update')); |
|
170 | 170 | }); |
171 | - $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) { |
|
172 | - $eventSource->send('success', (string)$l->t('Checking updates of apps')); |
|
171 | + $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($eventSource, $l) { |
|
172 | + $eventSource->send('success', (string) $l->t('Checking updates of apps')); |
|
173 | 173 | }); |
174 | - $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) { |
|
175 | - $eventSource->send('success', (string)$l->t('Checking for update of app "%s" in appstore', [$app])); |
|
174 | + $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use ($eventSource, $l) { |
|
175 | + $eventSource->send('success', (string) $l->t('Checking for update of app "%s" in appstore', [$app])); |
|
176 | 176 | }); |
177 | - $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) { |
|
178 | - $eventSource->send('success', (string)$l->t('Update app "%s" from appstore', [$app])); |
|
177 | + $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use ($eventSource, $l) { |
|
178 | + $eventSource->send('success', (string) $l->t('Update app "%s" from appstore', [$app])); |
|
179 | 179 | }); |
180 | - $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) { |
|
181 | - $eventSource->send('success', (string)$l->t('Checked for update of app "%s" in appstore', [$app])); |
|
180 | + $updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use ($eventSource, $l) { |
|
181 | + $eventSource->send('success', (string) $l->t('Checked for update of app "%s" in appstore', [$app])); |
|
182 | 182 | }); |
183 | - $updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) { |
|
184 | - $eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app])); |
|
183 | + $updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($eventSource, $l) { |
|
184 | + $eventSource->send('success', (string) $l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app])); |
|
185 | 185 | }); |
186 | - $updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) { |
|
187 | - $eventSource->send('success', (string)$l->t('Checked database schema update for apps')); |
|
186 | + $updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($eventSource, $l) { |
|
187 | + $eventSource->send('success', (string) $l->t('Checked database schema update for apps')); |
|
188 | 188 | }); |
189 | - $updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) { |
|
190 | - $eventSource->send('success', (string)$l->t('Updated "%s" to %s', array($app, $version))); |
|
189 | + $updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($eventSource, $l) { |
|
190 | + $eventSource->send('success', (string) $l->t('Updated "%s" to %s', array($app, $version))); |
|
191 | 191 | }); |
192 | - $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) { |
|
193 | - $incompatibleApps[]= $app; |
|
192 | + $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use (&$incompatibleApps) { |
|
193 | + $incompatibleApps[] = $app; |
|
194 | 194 | }); |
195 | - $updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) { |
|
195 | + $updater->listen('\OC\Updater', 'failure', function($message) use ($eventSource, $config) { |
|
196 | 196 | $eventSource->send('failure', $message); |
197 | 197 | $eventSource->close(); |
198 | 198 | $config->setSystemValue('maintenance', false); |
199 | 199 | }); |
200 | - $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { |
|
201 | - $eventSource->send('success', (string)$l->t('Set log level to debug')); |
|
200 | + $updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) { |
|
201 | + $eventSource->send('success', (string) $l->t('Set log level to debug')); |
|
202 | 202 | }); |
203 | - $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) { |
|
204 | - $eventSource->send('success', (string)$l->t('Reset log level')); |
|
203 | + $updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($eventSource, $l) { |
|
204 | + $eventSource->send('success', (string) $l->t('Reset log level')); |
|
205 | 205 | }); |
206 | - $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($eventSource, $l) { |
|
207 | - $eventSource->send('success', (string)$l->t('Starting code integrity check')); |
|
206 | + $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($eventSource, $l) { |
|
207 | + $eventSource->send('success', (string) $l->t('Starting code integrity check')); |
|
208 | 208 | }); |
209 | - $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($eventSource, $l) { |
|
210 | - $eventSource->send('success', (string)$l->t('Finished code integrity check')); |
|
209 | + $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($eventSource, $l) { |
|
210 | + $eventSource->send('success', (string) $l->t('Finished code integrity check')); |
|
211 | 211 | }); |
212 | 212 | |
213 | 213 | try { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | 'level' => ILogger::ERROR, |
218 | 218 | 'app' => 'update', |
219 | 219 | ]); |
220 | - $eventSource->send('failure', get_class($e) . ': ' . $e->getMessage()); |
|
220 | + $eventSource->send('failure', get_class($e).': '.$e->getMessage()); |
|
221 | 221 | $eventSource->close(); |
222 | 222 | exit(); |
223 | 223 | } |
@@ -229,10 +229,10 @@ discard block |
||
229 | 229 | |
230 | 230 | if (!empty($disabledApps)) { |
231 | 231 | $eventSource->send('notice', |
232 | - (string)$l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)])); |
|
232 | + (string) $l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)])); |
|
233 | 233 | } |
234 | 234 | } else { |
235 | - $eventSource->send('notice', (string)$l->t('Already up to date')); |
|
235 | + $eventSource->send('notice', (string) $l->t('Already up to date')); |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | $eventSource->send('done', ''); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | protected function execute(InputInterface $input, OutputInterface $output) { |
89 | 89 | |
90 | - if(Util::needUpgrade()) { |
|
90 | + if (Util::needUpgrade()) { |
|
91 | 91 | if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
92 | 92 | // Prepend each line with a little timestamp |
93 | 93 | $timestampFormatter = new TimestampFormatter($this->config, $output->getFormatter()); |
@@ -110,10 +110,10 @@ discard block |
||
110 | 110 | if ($event instanceof GenericEvent) { |
111 | 111 | $message = $event->getSubject(); |
112 | 112 | if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
113 | - $output->writeln(' Checking table ' . $message); |
|
113 | + $output->writeln(' Checking table '.$message); |
|
114 | 114 | } else { |
115 | 115 | if (strlen($message) > 60) { |
116 | - $message = substr($message, 0, 57) . '...'; |
|
116 | + $message = substr($message, 0, 57).'...'; |
|
117 | 117 | } |
118 | 118 | $progress->setMessage($message); |
119 | 119 | if ($event[0] === 1) { |
@@ -154,20 +154,20 @@ discard block |
||
154 | 154 | $output->writeln(''); |
155 | 155 | break; |
156 | 156 | case '\OC\Repair::step': |
157 | - if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
|
158 | - $output->writeln('<info>Repair step: ' . $event->getArgument(0) . '</info>'); |
|
157 | + if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
|
158 | + $output->writeln('<info>Repair step: '.$event->getArgument(0).'</info>'); |
|
159 | 159 | } |
160 | 160 | break; |
161 | 161 | case '\OC\Repair::info': |
162 | - if(OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
|
163 | - $output->writeln('<info>Repair info: ' . $event->getArgument(0) . '</info>'); |
|
162 | + if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { |
|
163 | + $output->writeln('<info>Repair info: '.$event->getArgument(0).'</info>'); |
|
164 | 164 | } |
165 | 165 | break; |
166 | 166 | case '\OC\Repair::warning': |
167 | - $output->writeln('<error>Repair warning: ' . $event->getArgument(0) . '</error>'); |
|
167 | + $output->writeln('<error>Repair warning: '.$event->getArgument(0).'</error>'); |
|
168 | 168 | break; |
169 | 169 | case '\OC\Repair::error': |
170 | - $output->writeln('<error>Repair error: ' . $event->getArgument(0) . '</error>'); |
|
170 | + $output->writeln('<error>Repair error: '.$event->getArgument(0).'</error>'); |
|
171 | 171 | break; |
172 | 172 | } |
173 | 173 | }; |
@@ -183,20 +183,20 @@ discard block |
||
183 | 183 | $dispatcher->addListener('\OC\Repair::error', $repairListener); |
184 | 184 | |
185 | 185 | |
186 | - $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use($output) { |
|
186 | + $updater->listen('\OC\Updater', 'maintenanceEnabled', function() use($output) { |
|
187 | 187 | $output->writeln('<info>Turned on maintenance mode</info>'); |
188 | 188 | }); |
189 | - $updater->listen('\OC\Updater', 'maintenanceDisabled', function () use($output) { |
|
189 | + $updater->listen('\OC\Updater', 'maintenanceDisabled', function() use($output) { |
|
190 | 190 | $output->writeln('<info>Turned off maintenance mode</info>'); |
191 | 191 | }); |
192 | - $updater->listen('\OC\Updater', 'maintenanceActive', function () use($output) { |
|
192 | + $updater->listen('\OC\Updater', 'maintenanceActive', function() use($output) { |
|
193 | 193 | $output->writeln('<info>Maintenance mode is kept active</info>'); |
194 | 194 | }); |
195 | - $updater->listen('\OC\Updater', 'waitForCronToFinish', function () use($output) { |
|
195 | + $updater->listen('\OC\Updater', 'waitForCronToFinish', function() use($output) { |
|
196 | 196 | $output->writeln('<info>Waiting for cron to finish (checks again in 5 seconds) …</info>'); |
197 | 197 | }); |
198 | 198 | $updater->listen('\OC\Updater', 'updateEnd', |
199 | - function ($success) use($output, $self) { |
|
199 | + function($success) use($output, $self) { |
|
200 | 200 | if ($success) { |
201 | 201 | $message = "<info>Update successful</info>"; |
202 | 202 | } else { |
@@ -204,58 +204,58 @@ discard block |
||
204 | 204 | } |
205 | 205 | $output->writeln($message); |
206 | 206 | }); |
207 | - $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($output) { |
|
207 | + $updater->listen('\OC\Updater', 'dbUpgradeBefore', function() use($output) { |
|
208 | 208 | $output->writeln('<info>Updating database schema</info>'); |
209 | 209 | }); |
210 | - $updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) { |
|
210 | + $updater->listen('\OC\Updater', 'dbUpgrade', function() use($output) { |
|
211 | 211 | $output->writeln('<info>Updated database</info>'); |
212 | 212 | }); |
213 | - $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($output) { |
|
213 | + $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function() use($output) { |
|
214 | 214 | $output->writeln('<info>Checking whether the database schema can be updated (this can take a long time depending on the database size)</info>'); |
215 | 215 | }); |
216 | - $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($output) { |
|
216 | + $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function() use($output) { |
|
217 | 217 | $output->writeln('<info>Checked database schema update</info>'); |
218 | 218 | }); |
219 | - $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use($output) { |
|
220 | - $output->writeln('<comment>Disabled incompatible app: ' . $app . '</comment>'); |
|
219 | + $updater->listen('\OC\Updater', 'incompatibleAppDisabled', function($app) use($output) { |
|
220 | + $output->writeln('<comment>Disabled incompatible app: '.$app.'</comment>'); |
|
221 | 221 | }); |
222 | - $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use($output) { |
|
223 | - $output->writeln('<info>Checking for update of app ' . $app . ' in appstore</info>'); |
|
222 | + $updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function($app) use($output) { |
|
223 | + $output->writeln('<info>Checking for update of app '.$app.' in appstore</info>'); |
|
224 | 224 | }); |
225 | - $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use($output) { |
|
226 | - $output->writeln('<info>Update app ' . $app . ' from appstore</info>'); |
|
225 | + $updater->listen('\OC\Updater', 'upgradeAppStoreApp', function($app) use($output) { |
|
226 | + $output->writeln('<info>Update app '.$app.' from appstore</info>'); |
|
227 | 227 | }); |
228 | - $updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use($output) { |
|
229 | - $output->writeln('<info>Checked for update of app "' . $app . '" in appstore </info>'); |
|
228 | + $updater->listen('\OC\Updater', 'checkAppStoreApp', function($app) use($output) { |
|
229 | + $output->writeln('<info>Checked for update of app "'.$app.'" in appstore </info>'); |
|
230 | 230 | }); |
231 | - $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($output) { |
|
231 | + $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function() use ($output) { |
|
232 | 232 | $output->writeln('<info>Checking updates of apps</info>'); |
233 | 233 | }); |
234 | - $updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($output) { |
|
234 | + $updater->listen('\OC\Updater', 'appSimulateUpdate', function($app) use ($output) { |
|
235 | 235 | $output->writeln("<info>Checking whether the database schema for <$app> can be updated (this can take a long time depending on the database size)</info>"); |
236 | 236 | }); |
237 | - $updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($output) { |
|
237 | + $updater->listen('\OC\Updater', 'appUpgradeCheck', function() use ($output) { |
|
238 | 238 | $output->writeln('<info>Checked database schema update for apps</info>'); |
239 | 239 | }); |
240 | - $updater->listen('\OC\Updater', 'appUpgradeStarted', function ($app, $version) use ($output) { |
|
240 | + $updater->listen('\OC\Updater', 'appUpgradeStarted', function($app, $version) use ($output) { |
|
241 | 241 | $output->writeln("<info>Updating <$app> ...</info>"); |
242 | 242 | }); |
243 | - $updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($output) { |
|
243 | + $updater->listen('\OC\Updater', 'appUpgrade', function($app, $version) use ($output) { |
|
244 | 244 | $output->writeln("<info>Updated <$app> to $version</info>"); |
245 | 245 | }); |
246 | - $updater->listen('\OC\Updater', 'failure', function ($message) use($output, $self) { |
|
246 | + $updater->listen('\OC\Updater', 'failure', function($message) use($output, $self) { |
|
247 | 247 | $output->writeln("<error>$message</error>"); |
248 | 248 | }); |
249 | - $updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($output) { |
|
249 | + $updater->listen('\OC\Updater', 'setDebugLogLevel', function($logLevel, $logLevelName) use($output) { |
|
250 | 250 | $output->writeln("<info>Set log level to debug</info>"); |
251 | 251 | }); |
252 | - $updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use($output) { |
|
252 | + $updater->listen('\OC\Updater', 'resetLogLevel', function($logLevel, $logLevelName) use($output) { |
|
253 | 253 | $output->writeln("<info>Reset log level</info>"); |
254 | 254 | }); |
255 | - $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use($output) { |
|
255 | + $updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function() use($output) { |
|
256 | 256 | $output->writeln("<info>Starting code integrity check...</info>"); |
257 | 257 | }); |
258 | - $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use($output) { |
|
258 | + $updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function() use($output) { |
|
259 | 259 | $output->writeln("<info>Finished code integrity check</info>"); |
260 | 260 | }); |
261 | 261 | |
@@ -263,12 +263,12 @@ discard block |
||
263 | 263 | |
264 | 264 | $this->postUpgradeCheck($input, $output); |
265 | 265 | |
266 | - if(!$success) { |
|
266 | + if (!$success) { |
|
267 | 267 | return self::ERROR_FAILURE; |
268 | 268 | } |
269 | 269 | |
270 | 270 | return self::ERROR_SUCCESS; |
271 | - } else if($this->config->getSystemValue('maintenance', false)) { |
|
271 | + } else if ($this->config->getSystemValue('maintenance', false)) { |
|
272 | 272 | //Possible scenario: Nextcloud core is updated but an app failed |
273 | 273 | $output->writeln('<warning>Nextcloud is in maintenance mode</warning>'); |
274 | 274 | $output->write('<comment>Maybe an upgrade is already in process. Please check the ' |
@@ -293,8 +293,8 @@ discard block |
||
293 | 293 | $trustedDomains = $this->config->getSystemValue('trusted_domains', array()); |
294 | 294 | if (empty($trustedDomains)) { |
295 | 295 | $output->write( |
296 | - '<warning>The setting "trusted_domains" could not be ' . |
|
297 | - 'set automatically by the upgrade script, ' . |
|
296 | + '<warning>The setting "trusted_domains" could not be '. |
|
297 | + 'set automatically by the upgrade script, '. |
|
298 | 298 | 'please set it manually</warning>' |
299 | 299 | ); |
300 | 300 | } |