summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2016-10-19 10:03:29 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-10-28 08:44:05 +0200
commitf8352fcb8dfb5284520396bdc624b6bf62d18219 (patch)
tree34cc43159586b971e325efd30f6f16b328f607d7 /apps/files_versions
parentad597d498d9298643338df2df0170159b736c12c (diff)
downloadnextcloud-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 'apps/files_versions')
-rw-r--r--apps/files_versions/lib/BackgroundJob/ExpireVersions.php4
-rw-r--r--apps/files_versions/lib/Command/ExpireVersions.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php
index 8e1f02cdfbf..89b8a966137 100644
--- a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php
+++ b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php
@@ -67,9 +67,9 @@ class ExpireVersions extends \OC\BackgroundJob\TimedJob {
return;
}
- $this->userManager->callForAllUsers(function(IUser $user) {
+ $this->userManager->callForSeenUsers(function(IUser $user) {
$uid = $user->getUID();
- if ($user->getLastLogin() === 0 || !$this->setupFS($uid)) {
+ if (!$this->setupFS($uid)) {
return;
}
Storage::expireOlderThanMaxForUser($uid);
diff --git a/apps/files_versions/lib/Command/ExpireVersions.php b/apps/files_versions/lib/Command/ExpireVersions.php
index f384420f22f..e88ea1f7a02 100644
--- a/apps/files_versions/lib/Command/ExpireVersions.php
+++ b/apps/files_versions/lib/Command/ExpireVersions.php
@@ -88,7 +88,7 @@ class ExpireVersions extends Command {
} else {
$p = new ProgressBar($output);
$p->start();
- $this->userManager->callForAllUsers(function(IUser $user) use ($p) {
+ $this->userManager->callForSeenUsers(function(IUser $user) use ($p) {
$p->advance();
$this->expireVersionsForUser($user);
});
@@ -99,7 +99,7 @@ class ExpireVersions extends Command {
function expireVersionsForUser(IUser $user) {
$uid = $user->getUID();
- if ($user->getLastLogin() === 0 || !$this->setupFS($uid)) {
+ if (!$this->setupFS($uid)) {
return;
}
Storage::expireOlderThanMaxForUser($uid);