| @@ 354-373 (lines=20) @@ | ||
| 351 | return $totalCount; |
|
| 352 | } |
|
| 353 | ||
| 354 | public function run(IOutput $output) { |
|
| 355 | $ocVersionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0'); |
|
| 356 | if (version_compare($ocVersionFromBeforeUpdate, '9.2.0.1', '<')) { |
|
| 357 | // this situation was only possible between 9.0.0 and 9.0.3 included |
|
| 358 | ||
| 359 | $function = function(IUser $user) use ($output) { |
|
| 360 | $this->fixUnmergedShares($output, $user); |
|
| 361 | $output->advance(); |
|
| 362 | }; |
|
| 363 | ||
| 364 | $this->buildPreparedQueries(); |
|
| 365 | ||
| 366 | $userCount = $this->countUsers(); |
|
| 367 | $output->startProgress($userCount); |
|
| 368 | ||
| 369 | $this->userManager->callForAllUsers($function); |
|
| 370 | ||
| 371 | $output->finishProgress(); |
|
| 372 | } |
|
| 373 | } |
|
| 374 | } |
|
| 375 | ||
| @@ 146-161 (lines=16) @@ | ||
| 143 | /** |
|
| 144 | * @param IOutput $output |
|
| 145 | */ |
|
| 146 | public function run(IOutput $output) { |
|
| 147 | $ocVersionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0'); |
|
| 148 | if (version_compare($ocVersionFromBeforeUpdate, '9.2.0.2', '<')) { |
|
| 149 | $function = function(IUser $user) use ($output) { |
|
| 150 | $this->moveAvatars($output, $user); |
|
| 151 | $output->advance(); |
|
| 152 | }; |
|
| 153 | ||
| 154 | $userCount = $this->countUsers(); |
|
| 155 | $output->startProgress($userCount); |
|
| 156 | ||
| 157 | $this->userManager->callForAllUsers($function); |
|
| 158 | ||
| 159 | $output->finishProgress(); |
|
| 160 | } |
|
| 161 | } |
|
| 162 | } |
|
| 163 | ||
| 164 | ||