| @@ 130-144 (lines=15) @@ | ||
| 127 | /** |
|
| 128 | * @param IOutput $output |
|
| 129 | */ |
|
| 130 | public function run(IOutput $output) { |
|
| 131 | $ocVersionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0'); |
|
| 132 | if (version_compare($ocVersionFromBeforeUpdate, '9.2.0.2', '<')) { |
|
| 133 | $function = function(IUser $user) use ($output) { |
|
| 134 | $this->moveAvatars($output, $user); |
|
| 135 | $output->advance(); |
|
| 136 | }; |
|
| 137 | ||
| 138 | $output->startProgress($this->userManager->countSeenUsers()); |
|
| 139 | ||
| 140 | $this->userManager->callForSeenUsers($function); |
|
| 141 | ||
| 142 | $output->finishProgress(); |
|
| 143 | } |
|
| 144 | } |
|
| 145 | } |
|
| 146 | ||
| 147 | ||
| @@ 338-356 (lines=19) @@ | ||
| 335 | } |
|
| 336 | } |
|
| 337 | ||
| 338 | public function run(IOutput $output) { |
|
| 339 | $ocVersionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0'); |
|
| 340 | if (version_compare($ocVersionFromBeforeUpdate, '9.2.0.1', '<')) { |
|
| 341 | // this situation was only possible between 9.0.0 and 9.0.3 included |
|
| 342 | ||
| 343 | $function = function(IUser $user) use ($output) { |
|
| 344 | $this->fixUnmergedShares($output, $user); |
|
| 345 | $output->advance(); |
|
| 346 | }; |
|
| 347 | ||
| 348 | $this->buildPreparedQueries(); |
|
| 349 | ||
| 350 | $output->startProgress($this->userManager->countUsers()); |
|
| 351 | ||
| 352 | $this->userManager->callForAllUsers($function); |
|
| 353 | ||
| 354 | $output->finishProgress(); |
|
| 355 | } |
|
| 356 | } |
|
| 357 | } |
|
| 358 | ||