diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2016-10-19 10:03:29 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-28 08:44:05 +0200 |
commit | f8352fcb8dfb5284520396bdc624b6bf62d18219 (patch) | |
tree | 34cc43159586b971e325efd30f6f16b328f607d7 /lib/private/Repair/RemoveRootShares.php | |
parent | ad597d498d9298643338df2df0170159b736c12c (diff) | |
download | nextcloud-server-f8352fcb8dfb5284520396bdc624b6bf62d18219.tar.gz nextcloud-server-f8352fcb8dfb5284520396bdc624b6bf62d18219.zip |
introduce callForSeenUsers and countSeenUsers (#26361)
* introduce callForSeenUsers and countSeenUsers
* add tests
* oracle should support not null on clob
* since 9.2.0
Diffstat (limited to 'lib/private/Repair/RemoveRootShares.php')
-rw-r--r-- | lib/private/Repair/RemoveRootShares.php | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/private/Repair/RemoveRootShares.php b/lib/private/Repair/RemoveRootShares.php index 1fd7d8d7dae..69fcb1b4492 100644 --- a/lib/private/Repair/RemoveRootShares.php +++ b/lib/private/Repair/RemoveRootShares.php @@ -96,31 +96,14 @@ class RemoveRootShares implements IRepairStep { $output->advance(); }; - $userCount = $this->countUsers(); - $output->startProgress($userCount); + $output->startProgress($this->userManager->countSeenUsers()); - $this->userManager->callForAllUsers($function); + $this->userManager->callForSeenUsers($function); $output->finishProgress(); } /** - * Count all the users - * - * @return int - */ - private function countUsers() { - $allCount = $this->userManager->countUsers(); - - $totalCount = 0; - foreach ($allCount as $backend => $count) { - $totalCount += $count; - } - - return $totalCount; - } - - /** * Verify if this repair steps is required * It *should* not be necessary in most cases and it can be very * costly. |